Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  OpenAL crunchy noise when playing wav files  (Read 3079 times)
0 Members and 1 Guest are viewing this topic.
Offline Aramaz

Junior Member




Java Games Rock!


« Posted 2005-08-30 10:02:39 »

I get an annoying crunchy sound at the end of a sound when playing some wav files. I don't notice the same crunchy noise when playing in mediaplayer or other players (Audacity). And I don't see anything weird going on on the waveform...

what could be the problem?

I've tried running in different sampling frequencies (22050 and 44100... same thing)

any help would be apprecieated.

Play XSW: www.xsw.se
Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2005-08-31 05:13:00 »

Hmm.  "Cunching" sounds like bad data at the end of the wave form,

Im not an OpenAL expert so someone else maybe able to help you better.
Soem thigns to check thopugh are: (1) Does OpenAL expect your wave form to be of a size that is an even multipel of some number (often 2K in other audio systems Ive worked with)? If so you might need to pad the end. (2) Are you sure al lthe data is getting laoded and loaded proeprly before you play it?
(3) Are there any sample JOAL apps that you can play your data through to see if they play it correctly?


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline kevglass

JGO Kernel


Medals: 163
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #2 - Posted 2005-08-31 09:34:33 »

Is it possible to post the wav file and/or the code you're using?

Kev

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Aramaz

Junior Member




Java Games Rock!


« Reply #3 - Posted 2005-08-31 19:34:54 »

Link to a sound that you hear noticable "crunch" (listen carefully)... don't get crunch in media player... only from playing in lwjgl/OpenAl..

http://hem.bredband.net/rashog/shockwave_spawn%20org.wav

Just playing it in one of the tutorials on the OpenAL in enough.

My code is with some small modifications (to allow for many sounds using the same buffers) pretty much the same...

A link to the tutrials... just modify to load my sound... (or rename my sound...)

http://lwjgl.org/documentation_openal_01.php

I notice this "crunching" on most sounds... even those in the tutorial... but not when playing in media player... listen carefully... (when you know it's there it's pretty noticeable and annoying...)

Play XSW: www.xsw.se
Offline Aramaz

Junior Member




Java Games Rock!


« Reply #4 - Posted 2005-09-03 07:00:40 »

My friend says that on his computer he cannot hear the crunshy (or it's more like clicks) sound... and he's been here and listen to how it sounds here... so he knows what he's listening for.

So maybe (and hopefully) it's just my computer. Just think it's weird that I get it from playing the files with openAl and not in mediaplayer and stuff...

Play XSW: www.xsw.se
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #5 - Posted 2005-09-03 07:08:05 »

I know you can get a 'click' at the end of playing a waveform, if it doesn't fade to zero.  Media players tend to implement a fade out which hides this.  Load up the waveform in Audacity & check the end of the waveform.

Also, if you've used Audacity to convert file formats, sometimes it tags a large blank bit on the end, which needs to be trimmed off.

Lastly you can get crappy sound if you've got a big-endian problem, although that it noticeable throughout the sample.

Time flies like a bird. Fruit flies like a banana.
Offline Aramaz

Junior Member




Java Games Rock!


« Reply #6 - Posted 2005-09-07 08:28:28 »

the waveform does fade out to zero... so that shouldn't be a problem.

This big endian problem... how much would that affect the sound? Is there away to check if big endian problem is the case?

Play XSW: www.xsw.se
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #7 - Posted 2005-09-12 14:13:55 »

It could be related to how you are playing back the sound.. what happens in the code after the sound plays?  Is there any reseting of audio lines or some such thing that might account for a "pop" ?

Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #8 - Posted 2005-09-12 19:55:33 »

the waveform does fade out to zero... so that shouldn't be a problem.

This big endian problem... how much would that affect the sound? Is there away to check if big endian problem is the case?

I only got endian problems when synthesising my own sounds and streaming the bytes into a Clip.  So this could only really happen if you are fiddling about with streaming the sound yourself.  The sound was ghastly.

Time flies like a bird. Fruit flies like a banana.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (19 views)
2014-09-12 09:08:26

Norakomi (54 views)
2014-09-10 13:57:51

TehJavaDev (63 views)
2014-09-10 06:39:09

Tekkerue (31 views)
2014-09-09 02:24:56

mitcheeb (53 views)
2014-09-08 06:06:29

BurntPizza (37 views)
2014-09-07 01:13:42

Longarmx (23 views)
2014-09-07 01:12:14

Longarmx (27 views)
2014-09-07 01:11:22

Longarmx (27 views)
2014-09-07 01:10:19

mitcheeb (35 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!