Alexa Auto SDK  2.0.0
AudioInputProvider.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_PROVIDER_H
17 #define AACE_AUDIO_AUDIO_INPUT_PROVIDER_H
18 
19 #include "AACE/Core/PlatformInterface.h"
20 #include "AudioInput.h"
21 
24 namespace aace {
25 namespace audio {
26 
27 class AudioInputProvider : public aace::core::PlatformInterface {
28 protected:
29  AudioInputProvider() = default;
30 
31 public:
32  enum class AudioInputType {
33  VOICE,
34  COMMUNICATION,
35  LOOPBACK
36  };
37 
38  virtual ~AudioInputProvider();
39 
40  virtual std::shared_ptr<AudioInput> openChannel( const std::string& name, AudioInputType type ) = 0;
41 };
42 
43 inline std::ostream& operator<<(std::ostream& stream, const AudioInputProvider::AudioInputType& audioInputType) {
44  switch (audioInputType) {
45  case AudioInputProvider::AudioInputType::VOICE:
46  stream << "VOICE";
47  break;
48  case AudioInputProvider::AudioInputType::COMMUNICATION:
49  stream << "COMMUNICATION";
50  break;
51  case AudioInputProvider::AudioInputType::LOOPBACK:
52  stream << "LOOPBACK";
53  break;
54  }
55  return stream;
56 }
57 
58 } // aace::audio
59 } // aace
60 
61 #endif // AACE_AUDIO_AUDIO_INPUT_PROVIDER_H
Definition: PlatformInterface.h:29
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