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(), AudioOut::Prepare()
59 AUDIO_CHANNEL_TYPE_NONE, /**< The audio channel type is none */
60 AUDIO_CHANNEL_TYPE_MONO, /**< The audio channel type is mono */
61 AUDIO_CHANNEL_TYPE_STEREO, /**< The audio channel type is stereo */
65 * @enum AudioSampleType
67 * Defines the audio sample type with bit depth.
71 * @see AudioIn::Prepare(), AudioOut::Prepare()
75 AUDIO_TYPE_NONE, /**< The audio encoding type is none */
76 AUDIO_TYPE_PCM_U8, /**< The 8-bit samples are unsigned */
77 AUDIO_TYPE_PCM_S8, /**< The 8-bit samples are signed */
78 AUDIO_TYPE_PCM_U16_LE, /**< The 16-bit little-endian samples are unsigned */
79 AUDIO_TYPE_PCM_U16_BE, /**< The 16-bit big-endian samples are unsigned */
80 AUDIO_TYPE_PCM_S16_LE, /**< The 16-bit little-endian samples are signed */
81 AUDIO_TYPE_PCM_S16_BE /**< The 16-bit big-endian samples are signed */
87 * Defines the audio input state.
91 * @see AudioIn::GetState()
95 AUDIOIN_STATE_INITIALIZED, /**< The device is initialized */
96 AUDIOIN_STATE_PREPARED, /**< The device is prepared */
97 AUDIOIN_STATE_RECORDING, /**< The device is recording */
98 AUDIOIN_STATE_STOPPED, /**< The device is stopped */
99 AUDIOIN_STATE_UNPREPARED, /**< The device is uninitialized */
100 AUDIOIN_STATE_ERROR, /**< An error has occurred */
104 * @enum AudioOutState
106 * Defines the audio output state.
110 * @see AudioOut::GetState()
114 AUDIOOUT_STATE_INITIALIZED, /**< The device is initialized */
115 AUDIOOUT_STATE_PREPARED, /**< The device is prepared */
116 AUDIOOUT_STATE_PLAYING, /**< The device is playing data */
117 AUDIOOUT_STATE_STOPPED, /**< The device is stopped */
118 AUDIOOUT_STATE_UNPREPARED, /**< The device is uninitialized */
119 AUDIOOUT_STATE_ERROR, /**< An error has occurred */