View Single Post
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#16
Originally Posted by Art-O View Post
But buffer seems to be completely empty (no audio data returned). Is that application-specific pointer important and is audio format correct or is problem with something else here?
When the AudioOutput gets created (NewObjectV), it gives you a long handle, the sample rate int, the number of channels int, the bitrate int and the buffer size int in the variable argument list. You need to use these, and especially pass the handle that you get as first parameter to the mixing function as third parameter. Also, there's no need to calloc/memcpy/free the buffer, you can directly provide the stream pointer to the mixing function.
 

The Following 6 Users Say Thank You to thp For This Useful Post: