#include <AuxStream.h>
§ AuxStream()
§ eof()
bool gnash::sound::AuxStream::eof |
( |
| ) |
const |
|
inlinevirtual |
§ fetchSamples()
unsigned int gnash::sound::AuxStream::fetchSamples |
( |
std::int16_t * |
to, |
|
|
unsigned int |
nSamples |
|
) |
| |
|
inlinevirtual |
Fetch the given amount of samples, non-blocking and thread-safe.
- Parameters
-
to | Output buffer, must be at least nSamples*bytes. (or nSamples items sized, being a container of 16bit values). |
nSamples | Number of samples to fetch. It is expected that the fetcher fetches samples in multiples of 2, being each couple composed by a sample for the left channel and a sample for the right channel, in that order. |
- Returns
- number of samples actually written to the output buffer. If < nSamples this InputStream ran out of data, either temporarly or permanently. Use eof() to tell.
- Exceptions
-
a | SoundException (to be better defined a set of them) if unable to process this and further requests due to internal errors (not if it just happens to complete its source) |
Implements gnash::sound::InputStream.
§ samplesFetched()
unsigned int gnash::sound::AuxStream::samplesFetched |
( |
| ) |
const |
|
inlinevirtual |
Return number of samples fetched from this stream.
It is expected for the return to be always a multiple of 2, being each stereo sample unit composed by a sample for the left channel and a sample for the right channel, in that order.
Implements gnash::sound::InputStream.
The documentation for this class was generated from the following file: