2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FMediaAudioTypes.h
20 * @brief This is the header file for the common types of AudioIn and AudioOut.
22 * This header file contains the declarations of the enumerations of the Audio In/Out classes.
24 #ifndef _FMEDIA_AUDIO_TYPES_H_
25 #define _FMEDIA_AUDIO_TYPES_H_
27 namespace Tizen { namespace Media
30 #define MIN_AUDIOOUT_VOLUME 0
31 #define MAX_AUDIOOUT_VOLUME 100
32 #define DEFAULT_AUDIOOUT_VOLUME 50
35 * @enum AudioInputDevice
37 * Defines the audio input device.
41 * @see AudioIn::Prepare()
45 AUDIO_INPUT_DEVICE_MIC, /**< The audio input device is a microphone */
49 * @enum AudioChannelType
51 * Defines the audio channel type.
55 * @see AudioIn::Prepare()
56 * @see AudioOut::Prepare()
60 AUDIO_CHANNEL_TYPE_NONE, /**< The audio channel type is none */
61 AUDIO_CHANNEL_TYPE_MONO, /**< The audio channel type is mono */
62 AUDIO_CHANNEL_TYPE_STEREO, /**< The audio channel type is stereo */
66 * @enum AudioSampleType
68 * Defines the audio sample type with bit depth.
72 * @see AudioIn::Prepare()
73 * @see AudioOut::Prepare()
77 AUDIO_TYPE_NONE, /**< The audio encoding type is none */
78 AUDIO_TYPE_PCM_U8, /**< The 8-bit samples are unsigned */
79 AUDIO_TYPE_PCM_S8, /**< The 8-bit samples are signed */
80 AUDIO_TYPE_PCM_U16_LE, /**< The 16-bit little-endian samples are unsigned */
81 AUDIO_TYPE_PCM_U16_BE, /**< The 16-bit big-endian samples are unsigned */
82 AUDIO_TYPE_PCM_S16_LE, /**< The 16-bit little-endian samples are signed */
83 AUDIO_TYPE_PCM_S16_BE /**< The 16-bit big-endian samples are signed */
89 * Defines the audio input state.
93 * @see AudioIn::GetState()
97 AUDIOIN_STATE_INITIALIZED, /**< The device is initialized */
98 AUDIOIN_STATE_PREPARED, /**< The device is prepared */
99 AUDIOIN_STATE_RECORDING, /**< The device is recording */
100 AUDIOIN_STATE_STOPPED, /**< The device is stopped */
101 AUDIOIN_STATE_UNPREPARED, /**< The device is uninitialized */
102 AUDIOIN_STATE_ERROR, /**< An error has occurred */
106 * @enum AudioOutState
108 * Defines the audio output state.
112 * @see AudioOut::GetState()
116 AUDIOOUT_STATE_INITIALIZED, /**< The device is initialized */
117 AUDIOOUT_STATE_PREPARED, /**< The device is prepared */
118 AUDIOOUT_STATE_PLAYING, /**< The device is playing data */
119 AUDIOOUT_STATE_STOPPED, /**< The device is stopped */
120 AUDIOOUT_STATE_UNPREPARED, /**< The device is uninitialized */
121 AUDIOOUT_STATE_ERROR, /**< An error has occurred */