In the game I'm currently writing, I wish to play a sound effect, which could be played more than once at the same time, therefore I'm make use of the buffers% parameter of LOADSOUND, which is all well and good. When compiling for win32 this works fine, when the project is compiled on the iPod however, the sound is cut off, each new PLAYSOUND iteration stops the present iteration playing.
In the game I've used DEBUG/STDOUT statements to see what channel% number is generated from each PLAYSOUND, on win32 it correctly increments, on the iPod it always uses the same number, hence the sound cut off.
To test further and to demonstrate I've written a small program ...
Win32 output gives ...
... and the iPod gives ...
Does anyone else have experience with this, is it a bug or does iOS not support this sort of functionality? I've tried other GLB iPhone games and they seem to be playing the same sounds without cut off, so I'm just not sure what I'm doing wrong?
In the game I've used DEBUG/STDOUT statements to see what channel% number is generated from each PLAYSOUND, on win32 it correctly increments, on the iPod it always uses the same number, hence the sound cut off.
To test further and to demonstrate I've written a small program ...
Code (glbasic) Select
// --------------------------------- //
// Project: SoundTests
// Start: Wednesday, January 04, 2012
// IDE Version: 10.209
SETCURRENTDIR("Media") // go to media files
LOCAL channel%
LOADSOUND "smallSound.wav", 0, 4
FOR i = 0 TO 3
channel = PLAYSOUND(0, 0.0, 1.0)
STDOUT channel + "\n"
SLEEP 200
NEXT
SHOWSCREEN
MOUSEWAIT
END
Win32 output gives ...
Code (glbasic) Select
Channel number = 0
Channel number = 1
Channel number = 2
Channel number = 3
... and the iPod gives ...
Code (glbasic) Select
Channel number = 0
Channel number = 0
Channel number = 0
Channel number = 0
Does anyone else have experience with this, is it a bug or does iOS not support this sort of functionality? I've tried other GLB iPhone games and they seem to be playing the same sounds without cut off, so I'm just not sure what I'm doing wrong?