Problem with streaming playback of .ogg files
by Phoenix Online Studios · in Technical Issues · 10/07/2007 (12:19 pm) · 3 replies
I have an audio description that looks like this:
new AudioDescription(Unlooped2DSpeechDescription)
{
volume = 1.0;
isLooping = false;
isStreaming = true;
is3D = false;
type = $SpeechAudioType;
};
Audio profiles for playing oggs are then created using this description.
Playing them (with alxPlay) works fine, until the end of the sounds, where the last bit in the buffer gets stuck playing in a loop. Also, any new streaming sounds that are started after this will play for a second or two, then get stuck in a loop.
If a sound is stopped with alxStop before it has reached the end, everything works just fine though, as the stream seems to be freed properly.
I'm not sure if this is a bug in the OpenAL version I'm using (tried installing the latest version but then Torque wouldn't give me any audio at all) or if it's a bug in the audio code. Has anyone experienced similar problems with playback of streamed sounds? I haven't tested if .wav files give me the same problem yet, but I'm planning to check that next...
new AudioDescription(Unlooped2DSpeechDescription)
{
volume = 1.0;
isLooping = false;
isStreaming = true;
is3D = false;
type = $SpeechAudioType;
};
Audio profiles for playing oggs are then created using this description.
Playing them (with alxPlay) works fine, until the end of the sounds, where the last bit in the buffer gets stuck playing in a loop. Also, any new streaming sounds that are started after this will play for a second or two, then get stuck in a loop.
If a sound is stopped with alxStop before it has reached the end, everything works just fine though, as the stream seems to be freed properly.
I'm not sure if this is a bug in the OpenAL version I'm using (tried installing the latest version but then Torque wouldn't give me any audio at all) or if it's a bug in the audio code. Has anyone experienced similar problems with playback of streamed sounds? I haven't tested if .wav files give me the same problem yet, but I'm planning to check that next...
#2
By the way, it seems like streaming wav files works much better, but that's not much help because we need to stick to oggs.
10/08/2007 (10:48 am)
Right, non-streaming works fine here as well. The problem with that is first that the memory use becomes unacceptable, and we cannot simply turn OpenAL off and on to clear out old buffers, and secondly it causes delays in the rendering during the loading of sounds that are not particularly nice to have in the middle of the game. That's manageable though, while the memory problem isn't.By the way, it seems like streaming wav files works much better, but that's not much help because we need to stick to oggs.
#3
01/20/2010 (2:43 pm)
I have something that seems to work here [ http://www.torquepowered.com/community/forums/viewthread/68492 ] let me know your results!
Torque 3D Owner Sean H.
Edit: Oh I just read your other thread and i see why you're setting Streaming to true. Guess I can't help you much with this.