2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 namespace Tizen.Multimedia
22 /// Specifies the flags for the audio device options.
24 /// This enumeration has a <see cref="FlagsAttribute"/> attribute that allows a bitwise combination of its member values.
28 internal enum AudioDeviceOptions
39 /// Input and output devices (both directions are available).
41 InputAndOutput = 0x0004,
51 /// Deactivated devices.
55 /// Activated devices.
66 /// Specifies the audio device types.
68 /// <since_tizen> 3 </since_tizen>
69 public enum AudioDeviceType
76 /// Built-in receiver.
80 /// Built-in microphone.
84 /// Audio jack that can be connected to wired accessories such as headphones and headsets.
88 /// Bluetooth media (A2DP).
96 /// Device for forwarding.
104 /// Bluetooth voice (SCO).
110 /// Specifies the audio device directions.
112 /// <since_tizen> 3 </since_tizen>
113 public enum AudioDeviceIoDirection
124 /// Input/output device (both directions are available).
130 /// Specifies the audio device states.
132 /// <since_tizen> 3 </since_tizen>
133 public enum AudioDeviceState
136 /// Deactivated state.
146 /// Specifies the audio volume types.
148 /// <since_tizen> 3 </since_tizen>
149 public enum AudioVolumeType
184 /// No volume exists.
186 /// <seealso cref="AudioStreamPolicy.VolumeType"/>
191 /// Specifies the audio stream types.
193 /// <since_tizen> 3 </since_tizen>
194 public enum AudioStreamType
217 /// Voice information.
221 /// Voice recognition.
225 /// Ringtone for VoIP.
233 /// Media only for external devices.
239 /// Specifies the change reasons of the audio stream focus state.
241 /// <since_tizen> 3 </since_tizen>
242 public enum AudioStreamFocusChangedReason
265 /// Voice information.
269 /// Voice recognition.
281 /// Voice-call or video-call.
285 /// Media only for external devices.
291 /// Specifies the flags for the audio stream focus options.
293 /// This enumeration has a <see cref="FlagsAttribute"/> attribute that allows a bitwise combination of its member values.
296 /// <since_tizen> 3 </since_tizen>
298 public enum AudioStreamFocusOptions
311 /// Specifies the audio stream focus states.
313 /// <since_tizen> 3 </since_tizen>
314 public enum AudioStreamFocusState
317 /// Focus state for release.
321 /// Focus state for acquisition.
327 /// Specifies the flags for the audio stream behaviors.
329 /// This enumeration has a <see cref="FlagsAttribute"/> attribute that allows a bitwise combination of its member values.
332 /// <since_tizen> 4 </since_tizen>
334 public enum AudioStreamBehaviors
347 internal static class AudioManagerEnumExtensions
349 internal static bool IsValid(this AudioStreamFocusOptions value)
351 int mask = (int)(AudioStreamFocusOptions.Playback | AudioStreamFocusOptions.Recording);
353 return (mask & (int)value) != 0;
356 internal static bool IsValid(this AudioStreamBehaviors value)
358 int mask = (int)(AudioStreamBehaviors.NoResume | AudioStreamBehaviors.Fading);
360 return ((~mask) & (int)value) == 0;