20#ifndef FIREBOLT_RIALTO_I_WEB_AUDIO_PLAYER_H_
21#define FIREBOLT_RIALTO_I_WEB_AUDIO_PLAYER_H_
39namespace firebolt::rialto
77 const std::string &audioMimeType,
78 const uint32_t priority,
79 std::weak_ptr<const WebAudioConfig> config)
const = 0;
141 virtual bool getBufferAvailable(uint32_t &availableFrames, std::shared_ptr<WebAudioShmInfo> &webAudioShmInfo) = 0;
165 virtual bool writeBuffer(
const uint32_t numberOfFrames,
void *data) = 0;
181 virtual bool getDeviceInfo(uint32_t &preferredFrames, uint32_t &maximumFrames,
bool &supportDeferredPlay) = 0;
211 virtual std::weak_ptr<IWebAudioPlayerClient>
getClient() = 0;
IWebAudioPlayer factory class, returns a concrete implementation of IWebAudioPlayer.
Definition IWebAudioPlayer.h:47
static std::shared_ptr< IWebAudioPlayerFactory > createFactory()
Create a IWebAudioPlayerFactory instance.
virtual std::unique_ptr< IWebAudioPlayer > createWebAudioPlayer(std::weak_ptr< IWebAudioPlayerClient > client, const std::string &audioMimeType, const uint32_t priority, std::weak_ptr< const WebAudioConfig > config) const =0
IWebAudioPlayer factory method, returns a concrete implementation of IWebAudioPlayer for playback of ...
The definition of the IWebAudioPlayer interface.
Definition IWebAudioPlayer.h:90
virtual std::weak_ptr< IWebAudioPlayerClient > getClient()=0
Returns the web audio player client.
virtual bool play()=0
Play the web audio.
virtual bool pause()=0
Pause the web audio.
virtual bool getBufferAvailable(uint32_t &availableFrames, std::shared_ptr< WebAudioShmInfo > &webAudioShmInfo)=0
Get the available frames.
virtual bool setVolume(double volume)=0
Set level and transition of audio attenuation.
virtual bool setEos()=0
Notify EOS.
virtual bool writeBuffer(const uint32_t numberOfFrames, void *data)=0
Write audio frames.
virtual bool getBufferDelay(uint32_t &delayFrames)=0
Get the delay frames.
virtual bool getVolume(double &volume)=0
Get current audio level.
virtual bool getDeviceInfo(uint32_t &preferredFrames, uint32_t &maximumFrames, bool &supportDeferredPlay)=0
Get device information.