Open ryancaicse opened 3 years ago
Hi, developers, thank you for your checking. It seems the lock mutex is not released correctly whennum_bytes>0 in the function ao_plugin_play? Should it be a bug or on purpose?
mutex
num_bytes>0
ao_plugin_play
int ao_plugin_play(ao_device *device, const char *output_samples, uint_32 num_bytes) { pthread_mutex_lock(&mutex); ...; if(num_bytes>0){ long wait = internal->buffersize*1000/(device->output_channels*device->bytewidth*device->rate); pthread_mutex_unlock(&mutex); wait = (wait/8)*1000; if(wait<1)wait=1; if(wait>500000)wait=500000; usleep(wait); pthread_mutex_lock(&mutex); }else{ pthread_mutex_unlock(&mutex); break; } } return 1; }
https://github.com/sahaRatul/sela/blob/ca09cbd80bd6084bca08288d980c7f6928571bbb/external/libao/src/plugins/arts/ao_arts.c#L313-L324
Best,
Hi, developers, any comments are highly appreciated! @sahaRatul
Hi, developers, thank you for your checking. It seems the lock
mutex
is not released correctly whennum_bytes>0
in the functionao_plugin_play
? Should it be a bug or on purpose?https://github.com/sahaRatul/sela/blob/ca09cbd80bd6084bca08288d980c7f6928571bbb/external/libao/src/plugins/arts/ao_arts.c#L313-L324
Best,