Click to See Complete Forum and Search --> : Problems creating a good output buffer


CrazyPlaya
September 29th, 2008, 08:14 AM
Hi @ all,

in a call session I get Audio Output by frames of 152bytes. These Frames I put together to one big buffer. The buffer changed anytime even if application plays sound. Now my problem is how can I update the buffer all time and the playout works on at the same time?

My Playout Methods are set in an own class.
Using Windows Media Lib from Platform - SDK.

One Idea i have but i donīt know if it is good to make it so.

In one thread I get(recvfrom) the rtp packets and collect the packets in a sorted linked list.
At the same time another thread plays out the seperate packets data.
Before the first buffer played out in the playout thread I would set a Sleep with 100ms or more.
What do you think is it ok to go this way?

Greetings CrazyPlaya