input/alsa: rebase on AsyncInputStream
Use the snd_pcm_t only in the IOThread, and reuse code that is well-known to work.
This commit is contained in:
@@ -215,6 +215,17 @@ AsyncInputStream::Read(void *ptr, size_t read_size, Error &error)
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
void
|
||||
AsyncInputStream::CommitWriteBuffer(size_t nbytes)
|
||||
{
|
||||
buffer.Append(nbytes);
|
||||
|
||||
if (!IsReady())
|
||||
SetReady();
|
||||
else
|
||||
cond.broadcast();
|
||||
}
|
||||
|
||||
void
|
||||
AsyncInputStream::AppendToBuffer(const void *data, size_t append_size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user