The definition of the IWebAudioPlayer interface.
More...
#include <IWebAudioPlayer.h>
The definition of the IWebAudioPlayer interface.
This interface defines the public API of Rialto for mixing PCM audio with current audio output. It should be implemented by both Rialto Client & Rialto Server.
◆ getBufferAvailable()
virtual bool firebolt::rialto::IWebAudioPlayer::getBufferAvailable |
( |
uint32_t & |
availableFrames, |
|
|
std::shared_ptr< WebAudioShmInfo > & |
webAudioShmInfo |
|
) |
| |
|
pure virtual |
Get the available frames.
Gets the available buffer space for sending more frames. Client should not write more than the number of frames returned by this API.
webAudioShmInfo is not required by the client application and can be ignored.
- Parameters
-
[out] | availableFrames | : Number of frames available to be written. |
[out] | webAudioShmInfo | : Location in shm to write the data (Server only). |
- Return values
-
◆ getBufferDelay()
virtual bool firebolt::rialto::IWebAudioPlayer::getBufferDelay |
( |
uint32_t & |
delayFrames | ) |
|
|
pure virtual |
Get the delay frames.
Gets the frame delay of the playback from Rialto. Frame delay is the number of frames left to play by the server.
- Parameters
-
[out] | delayFrames | : Number of frames to be played. |
- Return values
-
◆ getClient()
Returns the web audio player client.
- Return values
-
The | web audio player client. |
◆ getDeviceInfo()
virtual bool firebolt::rialto::IWebAudioPlayer::getDeviceInfo |
( |
uint32_t & |
preferredFrames, |
|
|
uint32_t & |
maximumFrames, |
|
|
bool & |
supportDeferredPlay |
|
) |
| |
|
pure virtual |
Get device information.
Gets information for the web audio playback. This information is used to determine the preferred buffer size to commit, the maximum buffer size an application can commit and whether buffers can be committed before a Play request.
- Parameters
-
[out] | preferredFrames | : preferred number of frames to be commited. |
[out] | maximumFrames | : Maximum number of frames that can be commited. |
[out] | supportDeferredPlay | : Whether defered play is supported. |
- Return values
-
◆ getVolume()
virtual bool firebolt::rialto::IWebAudioPlayer::getVolume |
( |
double & |
volume | ) |
|
|
pure virtual |
Get current audio level.
Fetches the current volume level for the pipeline.
- Parameters
-
[out] | volume | : Current volume level (range 0.0 - 1.0) |
- Return values
-
true | on success false otherwise |
◆ pause()
virtual bool firebolt::rialto::IWebAudioPlayer::pause |
( |
| ) |
|
|
pure virtual |
Pause the web audio.
Sets the player to the PAUSED state (it is IDLE when created).
- Return values
-
◆ play()
virtual bool firebolt::rialto::IWebAudioPlayer::play |
( |
| ) |
|
|
pure virtual |
Play the web audio.
Sets the player to the PLAYING state (it is IDLE when created).
- Return values
-
◆ setEos()
virtual bool firebolt::rialto::IWebAudioPlayer::setEos |
( |
| ) |
|
|
pure virtual |
Notify EOS.
Notifies the player that no further frames will be provided. When all buffered frames are played the player will enter the EOS state.
- Return values
-
◆ setVolume()
virtual bool firebolt::rialto::IWebAudioPlayer::setVolume |
( |
double |
volume | ) |
|
|
pure virtual |
Set level and transition of audio attenuation.
Sets the current volume for the pipeline (0.0 silent -> 1.0 full volume)
- Parameters
-
[in] | volume | : Target volume level (0.0 - 1.0) |
- Return values
-
true | on success false otherwise |
◆ writeBuffer()
virtual bool firebolt::rialto::IWebAudioPlayer::writeBuffer |
( |
const uint32_t |
numberOfFrames, |
|
|
void * |
data |
|
) |
| |
|
pure virtual |
Write audio frames.
Sends a buffer of audio data for playback
- Parameters
-
[in] | numberOfFrames | : Number of frames of audio in 'data'. |
[in] | data | : Pointer to the data, byte length = numberOfFrames*sampleSize |
- Return values
-
The documentation for this class was generated from the following file: