16 #ifndef ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_PORTAUDIOMICROPHONEWRAPPER_H_ 17 #define ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_PORTAUDIOMICROPHONEWRAPPER_H_ 24 #include <portaudio.h> 28 namespace sampleApplications {
29 namespace ipcServerSampleApp {
40 static std::unique_ptr<PortAudioMicrophoneWrapper>
create(std::shared_ptr<avsCommon::avs::AudioInputStream> stream);
87 static int PortAudioCallback(
88 const void* inputBuffer,
90 unsigned long numSamples,
91 const PaStreamCallbackTimeInfo* timeInfo,
92 PaStreamCallbackFlags statusFlags,
105 bool getConfigSuggestedLatency(PaTime& suggestedLatency);
108 const std::shared_ptr<avsCommon::avs::AudioInputStream> m_audioInputStream;
111 std::shared_ptr<avsCommon::avs::AudioInputStream::Writer> m_writer;
114 PaStream* m_paStream;
132 #endif // ALEXA_CLIENT_SDK_LIBIPCSERVERSAMPLEAPP_INCLUDE_IPCSERVERSAMPLEAPP_PORTAUDIOMICROPHONEWRAPPER_H_ bool startStreamingMicrophoneData() override
~PortAudioMicrophoneWrapper()
bool stopStreamingMicrophoneData() override
static std::unique_ptr< PortAudioMicrophoneWrapper > create(std::shared_ptr< avsCommon::avs::AudioInputStream > stream)
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
This acts as a wrapper around PortAudio, a cross-platform open-source audio I/O library.
Definition: PortAudioMicrophoneWrapper.h:32
bool isStreaming() override
This acts as an interface to record audio input from a microphone.
Definition: MicrophoneInterface.h:28