Merge "seek expection handling bug" into tizen_2.2
[platform/framework/native/media.git] / inc / FMediaAudioTypes.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19 * @file                 FMediaAudioTypes.h
20 * @brief                This is the header file for the common types of AudioIn and AudioOut.
21 *
22 * This header file contains the declarations of the enumerations of the Audio In/Out classes.
23 */
24 #ifndef _FMEDIA_AUDIO_TYPES_H_
25 #define _FMEDIA_AUDIO_TYPES_H_
26
27 namespace Tizen { namespace Media
28 {
29
30 #define MIN_AUDIOOUT_VOLUME 0
31 #define MAX_AUDIOOUT_VOLUME 100
32 #define DEFAULT_AUDIOOUT_VOLUME 50
33
34 /**
35  * @enum AudioInputDevice
36  *
37  * Defines the audio input device.
38  *
39  * @since               2.0
40  *
41  * @see AudioIn::Prepare()
42  */
43 enum AudioInputDevice
44 {
45         AUDIO_INPUT_DEVICE_MIC,     /**< The audio input device is a microphone */
46 };
47
48 /**
49  * @enum AudioChannelType
50  *
51  * Defines the audio channel type.
52  *
53  * @since               2.0
54  *
55  * @see AudioIn::Prepare()
56  * @see AudioOut::Prepare()
57  */
58 enum AudioChannelType
59 {
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 */
63 };
64
65 /**
66  * @enum AudioSampleType
67  *
68  * Defines the audio sample type with bit depth.
69  *
70  * @since               2.0
71  *
72  * @see AudioIn::Prepare()
73  * @see AudioOut::Prepare()
74  */
75 enum AudioSampleType
76 {
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 */
84 };
85
86 /**
87  * @enum AudioInState
88  *
89  * Defines the audio input state.
90  *
91  * @since               2.0
92  *
93  * @see AudioIn::GetState()
94  */
95 enum AudioInState
96 {
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 */
103 };
104
105 /**
106  * @enum AudioOutState
107  *
108  * Defines the audio output state.
109  *
110  * @since               2.0
111  *
112  * @see AudioOut::GetState()
113  */
114 enum AudioOutState
115 {
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 */
122 };
123
124 }} // Tizen::Media
125
126
127 #endif