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 public enum AudioDeviceType
75 /// Built-in receiver.
79 /// Built-in microphone.
83 /// Audio jack that can be connected to wired accessories such as headphones and headsets.
87 /// Bluetooth media (A2DP).
95 /// Device for forwarding.
103 /// Bluetooth voice (SCO).
109 /// Specifies the audio device directions.
111 public enum AudioDeviceIoDirection
122 /// Input/output device (both directions are available).
128 /// Specifies the audio device states.
130 public enum AudioDeviceState
133 /// Deactivated state.
143 /// Specifies the audio volume types.
145 public enum AudioVolumeType
180 /// No volume exists.
182 /// <seealso cref="AudioStreamPolicy.VolumeType"/>
187 /// Specifies the audio stream types.
189 public enum AudioStreamType
212 /// Voice information.
216 /// Voice recognition.
220 /// Ringtone for VoIP.
228 /// Media only for external devices.
234 /// Specifies the change reasons of the audio stream focus state.
236 public enum AudioStreamFocusChangedReason
259 /// Voice information.
263 /// Voice recognition.
275 /// Voice-call or video-call.
279 /// Media only for external devices.
285 /// Specifies the flags for the audio stream focus options.
287 /// This enumeration has a <see cref="FlagsAttribute"/> attribute that allows a bitwise combination of its member values.
291 public enum AudioStreamFocusOptions
304 /// Specifies the audio stream focus states.
306 public enum AudioStreamFocusState
309 /// Focus state for release.
313 /// Focus state for acquisition.
319 /// Specifies the flags for the audio stream behaviors.
321 /// This enumeration has a <see cref="FlagsAttribute"/> attribute that allows a bitwise combination of its member values.
325 public enum AudioStreamBehaviors
338 internal static class AudioManagerEnumExtensions
340 internal static bool IsValid(this AudioStreamFocusOptions value)
342 int mask = (int)(AudioStreamFocusOptions.Playback | AudioStreamFocusOptions.Recording);
344 return (mask & (int)value) != 0;
347 internal static bool IsValid(this AudioStreamBehaviors value)
349 int mask = (int)(AudioStreamBehaviors.NoResume | AudioStreamBehaviors.Fading);
351 return ((~mask) & (int)value) == 0;