[Openal] streaming reception, audio reminders and holes

gmail angelo70 at gmail.com
Fri Jul 31 00:33:17 PDT 2009


Hello all,

i am looking for some suggestions to solve the last issues i have in a 
streaming application.

As you probably remeber, i asked some help on this some time ago, then i 
left the task for a period an now i am back on it.
I am receiving a stream 8Khz PCM 16bit from a list of embedded devices. 
So basically i have a listview and 2 buttons, RX and OFF.
My PC sw side is basically as in the oal playstream sample, just reading 
from the network instead of file.

My first problem is that after listening from a device, pressing OFF, 
and start RX on another device, for about half of a second, or a little 
less, i hear a piece of the previous stream (previous device).
I tought my problem was in a bad "Stop", actually i try this way to stop 
the audio:

if (source)
{
   // stop audio and clear the buffers
   alSourceStop    (source);
   alSourcei       (source, AL_BUFFER, 0);

   // error cleaning
   alGetError      ();
}

But old audio still remain in the buffers at the next play. Should i 
delete the buffers and recreate them ? Is there a way to get the buffer 
pointer and memset to 0 ? If i close completely the audio device handle 
and reopen it, could it avoid definitely the problem ?

My second problem is that, just after i start to play, i hear some 
little "bouncing". I checked with wireshark, packets arrive with regular 
intervals (32msec, 512bytes per packet). I do a 8 packet preload and 
then start to play, so this is quite strange, but maybe it is a side 
effect of problem 1.

Thanks in advice,
Greetings,
Angelo







More information about the Openal mailing list