AWS SDK for C++  1.9.47
AWS SDK for C++
Public Member Functions | List of all members
Aws::TextToSpeech::PCMOutputDriver Class Referenceabstract

#include <PCMOutputDriver.h>

+ Inheritance diagram for Aws::TextToSpeech::PCMOutputDriver:

Public Member Functions

virtual ~PCMOutputDriver ()
 
virtual bool WriteBufferToDevice (const unsigned char *, size_t)=0
 
virtual Aws::Vector< DeviceInfoEnumerateDevices () const =0
 
virtual void SetActiveDevice (const DeviceInfo &, const CapabilityInfo &)=0
 
virtual const char * GetName () const =0
 
virtual void Prime ()
 
virtual void Flush ()
 

Detailed Description

Abstract class for configuring and sending linear pcm data to a sound card.

Definition at line 42 of file PCMOutputDriver.h.

Constructor & Destructor Documentation

◆ ~PCMOutputDriver()

virtual Aws::TextToSpeech::PCMOutputDriver::~PCMOutputDriver ( )
virtual

Member Function Documentation

◆ EnumerateDevices()

virtual Aws::Vector<DeviceInfo> Aws::TextToSpeech::PCMOutputDriver::EnumerateDevices ( ) const
pure virtual

Enumerate all devices and their capabilities. The device id and the capability will be returned to you when a user calls SetActiveDevice();

Implemented in Aws::TextToSpeech::WaveOutPCMOutputDriver, Aws::TextToSpeech::PulseAudioPCMOutputDriver, and Aws::TextToSpeech::CoreAudioPCMOutputDriver.

◆ Flush()

virtual void Aws::TextToSpeech::PCMOutputDriver::Flush ( )
inlinevirtual

Not used for most implementations. Some operating systems however, expect a constant stream of data to the device. Since playing will be batchy, Flush will be called after each batch of audio so that you can pause or reset the audio device.

Reimplemented in Aws::TextToSpeech::CoreAudioPCMOutputDriver.

Definition at line 79 of file PCMOutputDriver.h.

◆ GetName()

virtual const char* Aws::TextToSpeech::PCMOutputDriver::GetName ( ) const
pure virtual

◆ Prime()

virtual void Aws::TextToSpeech::PCMOutputDriver::Prime ( )
inlinevirtual

Not used for most implementations. Some operating systems however, expect a constant stream of data to the device. Since playing will be batchy, Prime() will be called before each new batch of audio data. This is the chance to reset the device so it can play the audio.

Reimplemented in Aws::TextToSpeech::CoreAudioPCMOutputDriver.

Definition at line 73 of file PCMOutputDriver.h.

◆ SetActiveDevice()

virtual void Aws::TextToSpeech::PCMOutputDriver::SetActiveDevice ( const DeviceInfo ,
const CapabilityInfo  
)
pure virtual

Set the device and format that this driver should use. After this call, you should expect all calls to WriteBufferToDevice() to be for the specified device and format.

Implemented in Aws::TextToSpeech::WaveOutPCMOutputDriver, Aws::TextToSpeech::CoreAudioPCMOutputDriver, and Aws::TextToSpeech::PulseAudioPCMOutputDriver.

◆ WriteBufferToDevice()

virtual bool Aws::TextToSpeech::PCMOutputDriver::WriteBufferToDevice ( const unsigned char *  ,
size_t   
)
pure virtual

Write a buffer of audio data to a device. The format of this data will be set in the SetActiveDevice function. returns true if audio was successfully written to the device, false otherwise.

Implemented in Aws::TextToSpeech::WaveOutPCMOutputDriver, Aws::TextToSpeech::PulseAudioPCMOutputDriver, and Aws::TextToSpeech::CoreAudioPCMOutputDriver.


The documentation for this class was generated from the following file: