Apologies if this has been discussed, but I didn’t get any hits on a quick search of the forum.
For a VOIP application, we receive PCM data in packets over the network.
A streaming sound’s PCM_READCALLBACK will get triggered and ask for "more data" (the amount it needs being passed in the datalen argument). The usersound example is useful to show this in action.
However, with network packets, it’s possible that the callback could ask for 4K and only 3K is available at that moment. The way the callback is structured, it appears that there is no way to tell the caller that we can only supply 3K of the 4K request, and to go play that and come back later for more.
Am I missing something obvious in the callback or a seek call that would allow me to return "some" (or perhaps most of) the PCM data the callback requests, but not fulfill [i:pl3yjka6]all [/i:pl3yjka6]of the request?
Or is there a more elegant method to solve this problem? I’ve come up with some possible work-arounds, but it just feels like there is a straight-forward answer to be had.
Thanks in advance,
- billp asked 8 years ago
- You must login to post comments