Re: OpenAL for voicechat

"Peter Soxberger" <[email protected]>
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
Thanks for your fast answers!

1) If I would use a while() than the I would fill all buffers (4) with the same 40ms recorded stream.
I'm filling a free buffer everytime I receive a packet. So this part is called everytime I receive a packet and fills one free buffer of the correct source:

//Code:
ALint processed, state;
alGetSourcei(soundsOut_current->source, AL_SOURCE_STATE, &state);
alGetSourcei(soundsOut_current->source, AL_BUFFERS_PROCESSED,
&processed);

if(processed > 0) //If there is a free buffer
{
   ALuint buffer;
   alSourceUnqueueBuffers(soundsOut_current->source, 1, &buffer);
    //Fill the buffer with the received data
    alBufferData(buffer, AL_FORMAT_MONO16, decoded_buffer,
 voice_Bufsize, voice_SamplesPerSecond);
         alSourceQueueBuffers(soundsOut_current->source, 1, &buffer);
}
// Restart in case we didn't get more data in time
if(state != AL_PLAYING) alSourcePlay(soundsOut_current->source);
//-------------------------------------------------------------------

2) Buffersize is 1280 Byte and samplerate is 16000 Samples/s.

3) No it doesn't!

It sounds like OpenAL doesn't mix the two sources but plays the received packets after each other.

Best regards,
Peter Soxberger

-- 
Nur noch bis 31.01.2010: DSL-Komplettpaket für 16,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl02

-- 
Nur noch bis 31.01.2010: DSL-Komplettpaket für 16,99 Euro/mtl.!*
http://portal.gmx.net/de/go/dsl02
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.