GP32 Cant Hear Sound


solarice

Member
Joined
Jan 29, 2004
Messages
120
Location
UK
Website
Visit site
Hi,

im trying to put some sound into my game im busy with using gamparks info in the api docs:

GpPcmInit ( PCM_CM_SR sr ) to initialize
GpPcmPla GpPcmPlay y ( unsigned short * src, int size, int repeatflag ) to play

im sure its setup right cos its playing the sound, but the problem is its to quiet through the normal speakers, if headphones are inserted the sound it fine.

What id like to know is how do i go about increasing the volume so you can hear it clearly through the gp32 speakers.

Ive already looked at the following post:

changing the volume of a sample

but dont fully understand it, if i have to go about it the way its described in that post can you explain to me exactly what i have to do.

Thanks again for any help you can provide.
 
Last edited by a moderator:
The gamepark's sdk sound functions can't modify the output volume of the sound, so the only way is to increase the volume before you include your sound into your program.

Another way would be simply triggering 2 or more times the same sound at once, as it should increase the volume also.
 
ive just tried both it both ways..

if i play the same sample 3 times at the same time i just get increased popping between different noises in the track.

and ive checked, and my sample has been normalized, still no difference.

also ive noticed its only playing half the length of the sample, i.e repeating to start when it reaches half way. any ideas why this is and could that be causing the lower volume output ?. i wouldnt think so, but im not really a coder :)

my samples about 19secs long and a 16bit 11khz pcm, if that helps at all. Although this will change as its making the fxe about 3x's bigger.
 
solarice posted on May 26 2004 at 04:50 PM said:
also ive noticed its only playing half the length of the sample, i.e repeating to start when it reaches half way. any ideas why this is
Possibly you've declared your buffer length in 16-bit samples, and forgot to multiply by 2 when telling GpPcmPlay how many bytes to play?
 
Last edited by a moderator:
thats what i first thought maybe the problem but the volume on the unit works fine for everything else....

sixxie that may well be the problem cant remember doing that bit...i'll investigate further.

Update:

my sound cutting out problem was because i had the following:

GpPcmPlay((unsigned short *)IntroMusic, IntroMusic_length), 1);

where IntroMusic_length was the define in the header file to make it play the whole sample i had to write it as follows:

GpPcmPlay((unsigned short *)IntroMusic, sizeof(IntroMusic), 1);

i see it as saying the same thing but anyway at least that now works, just the volume to sort out.
 
Back
Top