Ensure proper syncronization between codec2 decode thread and output stream when the former is started
This commit is contained in:
parent
0692bea269
commit
c6a40a9625
|
|
@ -295,6 +295,12 @@ static void *decodeFunc(void *arg)
|
|||
|
||||
codec2 = codec2_create(CODEC2_MODE_3200);
|
||||
|
||||
// Ensure that thread start is correctly synchronized with the output
|
||||
// stream to avoid having the decode function writing in a memory area
|
||||
// being read at the same time by the output stream system causing cracking
|
||||
// noises at speaker output. Behaviour observed on both Module17 and MD-UV380
|
||||
outputStream_sync(audioStream, false);
|
||||
|
||||
while(stopThread == false)
|
||||
{
|
||||
// Try popping data from the queue
|
||||
|
|
|
|||
Loading…
Reference in New Issue