Alexa Auto SDK  2.0.0
AudioInput.h
1 /*
2  * Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #ifndef AACE_AUDIO_AUDIO_INPUT_H
17 #define AACE_AUDIO_AUDIO_INPUT_H
18 
19 #include <memory>
20 
21 #include "AudioEngineInterfaces.h"
22 
25 namespace aace {
26 namespace audio {
27 
28 class AudioInput {
29 protected:
30  AudioInput() = default;
31 
32 public:
33  virtual ~AudioInput();
34 
49  ssize_t write( const int16_t* data, const size_t size );
50 
58  virtual bool startAudioInput() = 0;
59 
65  virtual bool stopAudioInput() = 0;
66 
73  void setEngineInterface( std::shared_ptr<aace::audio::AudioInputEngineInterface> audioInputEngineInterface );
74 
75 private:
76  std::shared_ptr<aace::audio::AudioInputEngineInterface> m_audioInputEngineInterface;
77 };
78 
79 } // aace::audio
80 } // aace
81 
82 #endif // AACE_AUDIO_AUDIO_INPUT_H
Definition: AddressBook.h:26

Alexa Auto SDK 2.0.0 - Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0