Release 4.0.0-preview1-00201
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.AudioIO / AudioIO / AudioIOEnums.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd 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  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using Tizen.Internals.Errors;
18
19 namespace Tizen.Multimedia
20 {
21     public enum AudioChannel
22     {
23         Mono = 0x80,
24         Stereo
25     }
26
27     internal enum AudioIOError
28     {
29         None = ErrorCode.None,
30         OutOfMemory = ErrorCode.OutOfMemory,
31         InvalidParameter = ErrorCode.InvalidParameter,
32         InvalidOperation = ErrorCode.InvalidOperation,
33         PermissionDenied = ErrorCode.PermissionDenied,      //Device open error by security
34         NotSupported = ErrorCode.NotSupported,          //Not supported
35         DevicePolicyRestriction = (-2147483648 / 2) + 4,
36         DeviceNotOpened = -0x01900000 | 0x01,
37         DeviceNotClosed = -0x01900000 | 0x02,
38         InvalidBuffer = -0x01900000 | 0x03,
39         SoundPolicy = -0x01900000 | 0x04,
40         InvalidState = -0x01900000 | 0x05,
41         NotSupportedType = -0x01900000 | 0x06,
42     }
43
44     /// <summary>
45     /// Specifies the states for the <see cref="AudioPlayback"/>, <see cref="AudioCapture"/>, and <see cref="AsyncAudioCapture"/>.
46     /// </summary>
47     public enum AudioIOState
48     {
49         /// <summary>
50         /// Not prepared.
51         /// </summary>
52         Idle = 0,
53
54         /// <summary>
55         /// The stream is running.
56         /// </summary>
57         Running = 1,
58
59         /// <summary>
60         /// The stream is paused.
61         /// </summary>
62         Paused = 2
63     }
64
65     /// <summary>
66     /// Specifies the audio sample types.
67     /// </summary>
68     public enum AudioSampleType
69     {
70         /// <summary>
71         /// Unsigned 8-bit audio samples.
72         /// </summary>
73         U8 = 0x70,
74         /// <summary>
75         /// Signed 16-bit audio samples.
76         /// </summary>
77         S16Le
78     }
79 }