List of all members.
Detailed Description
Base class for (threaded) updating of stream buffers.
Constructor & Destructor Documentation
openalpp::StreamUpdater::StreamUpdater |
( |
ALuint |
buffer1, |
|
|
ALuint |
buffer2, |
|
|
ALenum |
format, |
|
|
unsigned int |
frequency | |
|
) |
| | |
Constructor.
- Parameters:
-
| buffer1 | and... |
| buffer2 | are the buffers used for double-buffered streaming. |
| format | is the (OpenAL) format of the sound. |
| frequency | is the frequency of the sound. |
virtual openalpp::StreamUpdater::~StreamUpdater |
( |
|
) |
[protected, virtual] |
Member Function Documentation
void openalpp::StreamUpdater::addSource |
( |
ALuint |
sourcename |
) |
|
Add a source to the stream.
- Parameters:
-
| sourcename | is the OpenAL name of the source. |
void openalpp::StreamUpdater::cancelCleanup |
( |
|
) |
|
Inherited from Thread. Is called after run() finishes, and deletes this.
void openalpp::StreamUpdater::hold |
( |
|
) |
[inline] |
Tell this StreamUpdater thread to wait until some thread call its release
void openalpp::StreamUpdater::processAddedSources |
( |
|
) |
[protected] |
Add any sources that the user has scheduled for adding.
void openalpp::StreamUpdater::processRemovedSources |
( |
|
) |
[protected] |
Remove any sources that the user has scheduled for removal.
void openalpp::StreamUpdater::release |
( |
|
) |
[inline] |
void openalpp::StreamUpdater::removeSource |
( |
ALuint |
sourcename |
) |
|
Remove a source from the stream.
- Parameters:
-
| sourcename | is the OpenAL name of the source. |
virtual void openalpp::StreamUpdater::seek |
( |
float |
time_s |
) |
[inline, virtual] |
void openalpp::StreamUpdater::setSleepTime |
( |
int |
mseconds |
) |
[inline] |
bool openalpp::StreamUpdater::shouldStop |
( |
|
) |
const [inline] |
- Returns:
- true if the stop method has been called
void openalpp::StreamUpdater::sleep |
( |
|
) |
[inline, protected] |
virtual void openalpp::StreamUpdater::stop |
( |
|
) |
[inline, virtual] |
Tell the thread to stop executing, also release it if its waiting to play.
- Returns:
- nothing
Reimplemented in openalpp::DeviceUpdater.
bool openalpp::StreamUpdater::update |
( |
void * |
buffer, |
|
|
unsigned int |
length | |
|
) |
| | |
Update the stream. I.e. add new data to play.
- Parameters:
-
| buffer | is a pointer to sound data. |
| length | is the length of the sound data (in bytes). |
- Returns:
- done flag. I.e. stoprunning_.
void openalpp::StreamUpdater::waitForPlay |
( |
|
) |
[inline, protected] |
Wait for someone to call release. This indicates that we should start playing a stream
Member Data Documentation
Names of the buffers to update.
OpenAL format of the sound data.
Frequency of the sound data.
Event signalling that source is playing
Time to sleep in run method, i.e. sleeptime to reduce CPU usage
Flag for when Run should stop running..
The documentation for this class was generated from the following file: