Tizen 2.0 Release
[framework/osp/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(), AudioOut::Prepare()
56  */
57 enum AudioChannelType
58 {
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 */
62 };
63
64 /**
65  * @enum AudioSampleType
66  *
67  * Defines the audio sample type with bit depth.
68  *
69  * @since               2.0
70  *
71  * @see AudioIn::Prepare(), AudioOut::Prepare()
72  */
73 enum AudioSampleType
74 {
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 */
82 };
83
84 /**
85  * @enum AudioInState
86  *
87  * Defines the audio input state.
88  *
89  * @since               2.0
90  *
91  * @see AudioIn::GetState()
92  */
93 enum AudioInState
94 {
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 */
101 };
102
103 /**
104  * @enum AudioOutState
105  *
106  * Defines the audio output state.
107  *
108  * @since               2.0
109  *
110  * @see AudioOut::GetState()
111  */
112 enum AudioOutState
113 {
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 */
120 };
121
122 }} // Tizen::Media
123
124
125 #endif