Alexa Auto SDK  2.3.1
AudioInputProvider.h
1 /*
2  * Copyright 2017-2020 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 { VOICE, COMMUNICATION, LOOPBACK };
33 
34  virtual ~AudioInputProvider();
35 
36  virtual std::shared_ptr<AudioInput> openChannel(const std::string& name, AudioInputType type) = 0;
37 };
38 
39 inline std::ostream& operator<<(std::ostream& stream, const AudioInputProvider::AudioInputType& audioInputType) {
40  switch (audioInputType) {
41  case AudioInputProvider::AudioInputType::VOICE:
42  stream << "VOICE";
43  break;
44  case AudioInputProvider::AudioInputType::COMMUNICATION:
45  stream << "COMMUNICATION";
46  break;
47  case AudioInputProvider::AudioInputType::LOOPBACK:
48  stream << "LOOPBACK";
49  break;
50  }
51  return stream;
52 }
53 
54 } // namespace audio
55 } // namespace aace
56 
57 #endif // AACE_AUDIO_AUDIO_INPUT_PROVIDER_H
Definition: PlatformInterface.h:29
Definition: AddressBook.h:26

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