Changes

Jump to navigation Jump to search
487 bytes added ,  20:15, 14 August 2012
no edit summary
Line 223: Line 223:     
:Hey, brand new question! I am working on a side project, and I have the need to allocate a lot of sound voices.... Of course, the default AESND_AllocateVoice quickly runs out of voices, so I wanted to try out your modified code with AESND_AllocateNextFreeVoice, so I grabbed libaesnd.a and aesndlib.h from your google code page and copied them to the right places (backed up my originals first). Well, when I use your sound libraries, it seems to chop off the first part of a sound (the standard aesnd libs don't do that for me).... Even if I change nothing else in my code (still use a static voice channel), if I compile with your libs the sound gets chopped, but with the standard libs it plays fine.... That's a problem for me, because I'm using some very small sound samples of like 1/10th of a second in length, so I'm losing like half of the sound or so.... Other than that, I can tell that AESND_AllocateNextFreeVoice is working just how I need it to.... Maybe your modified libs are based on an older version of aesnd or something? Any way to fix this? --[[User:Mr. Reaper|Mr. Reaper]] 02:48, 14 August 2012 (CEST)
 
:Hey, brand new question! I am working on a side project, and I have the need to allocate a lot of sound voices.... Of course, the default AESND_AllocateVoice quickly runs out of voices, so I wanted to try out your modified code with AESND_AllocateNextFreeVoice, so I grabbed libaesnd.a and aesndlib.h from your google code page and copied them to the right places (backed up my originals first). Well, when I use your sound libraries, it seems to chop off the first part of a sound (the standard aesnd libs don't do that for me).... Even if I change nothing else in my code (still use a static voice channel), if I compile with your libs the sound gets chopped, but with the standard libs it plays fine.... That's a problem for me, because I'm using some very small sound samples of like 1/10th of a second in length, so I'm losing like half of the sound or so.... Other than that, I can tell that AESND_AllocateNextFreeVoice is working just how I need it to.... Maybe your modified libs are based on an older version of aesnd or something? Any way to fix this? --[[User:Mr. Reaper|Mr. Reaper]] 02:48, 14 August 2012 (CEST)
 +
 +
 +
Take a look at SoundManager.cpp - SoundManager::LoadSound(...), this uses the StoreSoundFromWav and StoreSoundFromOgg this is how I load sound files from disk.  Not sure why but maybe the sample is seen as 8 bit instead of 16 bit so only half is played (or mono when stereo).  Well I’m kind of guessing as I've not had this issue.  As a quick test now will the code as it is, try seeing what happens if you play a test sample that’s ½ minute play time, how long does it play for?
391

edits

Navigation menu