![]() |
Om
1.0.0
A universal framework for multimedia simulation
|
A class that wraps a function callback source of sound samples as a SoundInputStream. More...
#include <omSoundCallbackStream.h>
Public Member Functions | |
| SoundCallbackStream (const SoundCallback &newCallback) | |
| Create a new sound data input stream that wraps the specified sound stream and data stream. More... | |
| const SoundCallback & | getCallback () const |
| Return a reference to the function callback object that this stream is wrapping. More... | |
| void | setCallback (const SoundCallback &newCallback) |
| Set a reference to the function callback object that this stream is wrapping. More... | |
| virtual Bool | canSeek () const |
| Return whether or not seeking is allowed in this input stream. More... | |
| virtual Bool | canSeek (Int64 relativeSampleOffset) const |
| Return whether or not this stream's current position can be moved by the specified signed sample offset. More... | |
| virtual Int64 | seek (Int64 relativeSampleOffset) |
| Move the current sample frame position in the stream by the specified signed amount. More... | |
| virtual SoundSize | getSamplesRemaining () const |
| Return the number of samples remaining in the sound input stream. More... | |
| virtual SampleIndex | getPosition () const |
| Return the current position of the stream in samples relative to the start of the stream. More... | |
| virtual Size | getChannelCount () const |
| Return the number of channels that are in the sound input stream. More... | |
| virtual SampleRate | getSampleRate () const |
| Return the sample rate of the sound input stream's source audio data. More... | |
| virtual SampleType | getNativeSampleType () const |
| Return the actual sample type used in the stream. More... | |
| virtual Bool | isValid () const |
| Return whether or not the stream has a valid source of sound data. More... | |
Public Member Functions inherited from om::sound::base::SoundInputStream | |
| virtual | ~SoundInputStream () |
| Destroy this sound input stream and release any resources associated with it. More... | |
| SoundResult | read (SoundBuffer &buffer, Size numSamples) |
| Read the specified number of samples from the input stream into a sound buffer. More... | |
| Bool | hasSamplesRemaining () const |
| Return whether or not this sound input stream has any samples remaining in the stream. More... | |
Protected Member Functions | |
| virtual SoundResult | readSamples (SoundBuffer &inputBuffer, Size numSamples) |
| Read the specified number of samples from the callback into the output buffer. More... | |
A class that wraps a function callback source of sound samples as a SoundInputStream.
This class is provided so that external sound systems can easily interface with the SoundInputStream interface. The callback stream does not support seeking within the stream.
|
inline |
Create a new sound data input stream that wraps the specified sound stream and data stream.
|
inline |
Return a reference to the function callback object that this stream is wrapping.
|
inline |
Set a reference to the function callback object that this stream is wrapping.
|
virtual |
Return whether or not seeking is allowed in this input stream.
Reimplemented from om::sound::base::SoundInputStream.
|
virtual |
Return whether or not this stream's current position can be moved by the specified signed sample offset.
Reimplemented from om::sound::base::SoundInputStream.
Move the current sample frame position in the stream by the specified signed amount.
Reimplemented from om::sound::base::SoundInputStream.
|
virtual |
Return the number of samples remaining in the sound input stream.
Implements om::sound::base::SoundInputStream.
|
virtual |
Return the current position of the stream in samples relative to the start of the stream.
Implements om::sound::base::SoundInputStream.
|
virtual |
Return the number of channels that are in the sound input stream.
Implements om::sound::base::SoundInputStream.
|
virtual |
Return the sample rate of the sound input stream's source audio data.
Implements om::sound::base::SoundInputStream.
|
virtual |
Return the actual sample type used in the stream.
Implements om::sound::base::SoundInputStream.
|
virtual |
Return whether or not the stream has a valid source of sound data.
Implements om::sound::base::SoundInputStream.
|
protectedvirtual |
Read the specified number of samples from the callback into the output buffer.
Implements om::sound::base::SoundInputStream.
1.8.11