| 8 | #endif |
| 9 | |
| 10 | int Abyss::Streams::AudioStream::streamRead(uint8_t *buffer, const int size) { |
| 11 | _stream.read(reinterpret_cast<char *>(buffer), size); |
| 12 | if (_stream) { |
| 13 | return static_cast<int>(_stream.gcount()); |
| 14 | } |
| 15 | return -1; |
| 16 | } |
| 17 | |
| 18 | int Abyss::Streams::AudioStream::streamReadCallback(void *opaque, uint8_t *buffer, const int size) { |
| 19 | return static_cast<AudioStream *>(opaque)->streamRead(buffer, size); |