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:
Max Kellermann
2016-06-17 17:34:47 +02:00
parent 5d11759f7d
commit 95e53ac0a0
3 changed files with 62 additions and 60 deletions

View File

@@ -133,6 +133,12 @@ protected:
return buffer.GetSpace();
}
CircularBuffer<uint8_t>::Range PrepareWriteBuffer() {
return buffer.Write();
}
void CommitWriteBuffer(size_t nbytes);
/**
* Append data to the buffer. The size must fit into the
* buffer; see GetBufferSpace().