AudioQueue, Play Audio When Callback will get hit,
In my application, i will receive buffer from the Socket, and need to play it, App will receive buffer in approx every 50 ms,
The way i am doing is as follows,
1 -- Define the Audio Format, which is as given below,
FillOutASBDForLPCM (sRecordFormat,
16000,
1,
16,
16,
false,
false
);
2 -- Create & Allocate AudioQueue Buffer
3 -- Enqueue Buffer
4 -- Start the Queue,
Now i understanding is that, it should hit automa开发者_Python百科tically Callback as and when it played existing buffer and then ask for the new buffer, but in my case, its not hitting Callback automatically, as and when i am getting buffer , i am calling Callback explicitly , is this correct method
The problem was, i was starting AudioQueue from the one intermediate thread and after debugging i came to know, it needs to have Main Application thread. This is the reason, callback was not invoking by it self.
精彩评论