AWS SDK for C++  1.9.44
AWS SDK for C++
PCMOutputDriver.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 #include <aws/core/utils/Array.h>
12 
13 namespace Aws
14 {
15  namespace TextToSpeech
16  {
17  static const unsigned BIT_WIDTH_16 = 16;
18  static const unsigned MONO = 1;
19  static const size_t KHZ_22_5 = 22050;
20  static const size_t KHZ_16 = 16000;
21  static const size_t KHZ_8 = 8000;
22 
24  {
26 
27  unsigned channels;
28  size_t sampleRate;
29  unsigned sampleWidthBits;
30  };
31 
32  struct DeviceInfo
33  {
37  };
38 
43  {
44  public:
45  virtual ~PCMOutputDriver();
46 
51  virtual bool WriteBufferToDevice(const unsigned char*, size_t) = 0;
61  virtual void SetActiveDevice(const DeviceInfo&, const CapabilityInfo&) = 0;
62 
66  virtual const char* GetName() const = 0;
67 
73  virtual void Prime() {};
74 
79  virtual void Flush() {};
80  };
81 
87  {
88  public:
89  virtual ~PCMOutputDriverFactory() = default;
90 
95  };
96 
103  AWS_TEXT_TO_SPEECH_API std::shared_ptr<PCMOutputDriverFactory> DefaultPCMOutputDriverFactoryInitFn();
104  }
105 }
Aws::TextToSpeech::DeviceInfo::capabilities
Aws::Vector< CapabilityInfo > capabilities
Definition: PCMOutputDriver.h:36
Aws::TextToSpeech::PCMOutputDriver::WriteBufferToDevice
virtual bool WriteBufferToDevice(const unsigned char *, size_t)=0
Aws::TextToSpeech::PCMOutputDriver::Flush
virtual void Flush()
Definition: PCMOutputDriver.h:79
Aws::TextToSpeech::PCMOutputDriver
Definition: PCMOutputDriver.h:43
Aws::TextToSpeech::PCMOutputDriver::EnumerateDevices
virtual Aws::Vector< DeviceInfo > EnumerateDevices() const =0
Aws::TextToSpeech::KHZ_8
static const size_t KHZ_8
Definition: PCMOutputDriver.h:21
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::TextToSpeech::DeviceInfo::deviceName
Aws::String deviceName
Definition: PCMOutputDriver.h:34
AWSVector.h
Aws::TextToSpeech::BIT_WIDTH_16
static const unsigned BIT_WIDTH_16
Definition: PCMOutputDriver.h:17
Aws::TextToSpeech::DeviceInfo::deviceId
Aws::String deviceId
Definition: PCMOutputDriver.h:35
Aws::TextToSpeech::PCMOutputDriverFactory
Definition: PCMOutputDriver.h:87
Aws::TextToSpeech::DefaultPCMOutputDriverFactoryInitFn
AWS_TEXT_TO_SPEECH_API std::shared_ptr< PCMOutputDriverFactory > DefaultPCMOutputDriverFactoryInitFn()
TextToSpeech_EXPORTS.h
AWSString.h
Aws::TextToSpeech::KHZ_16
static const size_t KHZ_16
Definition: PCMOutputDriver.h:20
Aws::TextToSpeech::CapabilityInfo::sampleWidthBits
unsigned sampleWidthBits
Definition: PCMOutputDriver.h:29
Aws::TextToSpeech::CapabilityInfo::channels
unsigned channels
Definition: PCMOutputDriver.h:27
Aws::TextToSpeech::MONO
static const unsigned MONO
Definition: PCMOutputDriver.h:18
Aws::TextToSpeech::PCMOutputDriver::GetName
virtual const char * GetName() const =0
AWS_TEXT_TO_SPEECH_API
#define AWS_TEXT_TO_SPEECH_API
Definition: TextToSpeech_EXPORTS.h:27
Aws::TextToSpeech::PCMOutputDriver::Prime
virtual void Prime()
Definition: PCMOutputDriver.h:73
Aws
Definition: AccessManagementClient.h:15
Array.h
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::TextToSpeech::PCMOutputDriverFactory::LoadDrivers
virtual Aws::Vector< std::shared_ptr< PCMOutputDriver > > LoadDrivers() const =0
Aws::TextToSpeech::PCMOutputDriver::~PCMOutputDriver
virtual ~PCMOutputDriver()
Aws::TextToSpeech::CapabilityInfo::sampleRate
size_t sampleRate
Definition: PCMOutputDriver.h:28
Aws::TextToSpeech::PCMOutputDriver::SetActiveDevice
virtual void SetActiveDevice(const DeviceInfo &, const CapabilityInfo &)=0
Aws::TextToSpeech::CapabilityInfo::CapabilityInfo
CapabilityInfo()
Definition: PCMOutputDriver.h:25
Aws::TextToSpeech::CapabilityInfo
Definition: PCMOutputDriver.h:24
Aws::TextToSpeech::DeviceInfo
Definition: PCMOutputDriver.h:33
Aws::TextToSpeech::PCMOutputDriverFactory::~PCMOutputDriverFactory
virtual ~PCMOutputDriverFactory()=default
Aws::TextToSpeech::KHZ_22_5
static const size_t KHZ_22_5
Definition: PCMOutputDriver.h:19