#include <AuxStream.h>
List of all members.
Public Member Functions |
| AuxStream (aux_streamer_ptr cb, void *arg) |
unsigned int | fetchSamples (boost::int16_t *to, unsigned int nSamples) |
| Fetch the given amount of samples, non-blocking and thread-safe.
|
unsigned int | samplesFetched () const |
| Return number of samples fetched from this stream.
|
bool | eof () const |
| Return true if there'll be no more data to fetch.
|
virtual | ~InputStream () |
Constructor & Destructor Documentation
Member Function Documentation
bool gnash::sound::AuxStream::eof |
( |
| ) |
const |
|
inlinevirtual |
unsigned int gnash::sound::AuxStream::fetchSamples |
( |
boost::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.
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: