Prefix:4.0.0
-Suffix:preview1-00088
-Number:88
-VCS:e848348f4345a75d7415079cae6fc4cfb43837e4
+Suffix:preview1-00090
+Number:90
+VCS:e69c8e3491ab0519eb79f67cc575e106373f34c6
<summary>
Gets the all devices currently connected.
</summary>
- <param name="options">The audio device options.</param>
<returns>An IEnumerable<AudioDevice> that contains connected devices.</returns>
</member>
<member name="E:Tizen.Multimedia.AudioManager.DeviceConnectionChanged">
be passed to other APIs related to playback or recording. (e.g., <see cref="!:Player"/>, <see cref="!:WavPlayer"/> , etc.)
</remarks>
<param name="streamType">Type of sound stream for which policy needs to be created.</param>
+ <exception cref="T:System.ArgumentException"><paramref name="streamType"/> is invalid.</exception>
</member>
<member name="E:Tizen.Multimedia.AudioStreamPolicy.FocusStateChanged">
<summary>
it returns <see cref="F:Tizen.Multimedia.AudioVolumeType.None"/>.
</remarks>
<value>The <see cref="T:Tizen.Multimedia.AudioVolumeType"/> of the policy instance.</value>
+ <exception cref="T:System.ObjectDisposedException">The <see cref="T:Tizen.Multimedia.AudioStreamPolicy"/> has already been disposed of.</exception>
</member>
<member name="P:Tizen.Multimedia.AudioStreamPolicy.PlaybackFocusState">
<summary>
Gets the state of focus for playback.
</summary>
<value>The state of focus for playback.</value>
+ <exception cref="T:System.ObjectDisposedException">The <see cref="T:Tizen.Multimedia.AudioStreamPolicy"/> has already been disposed of.</exception>
</member>
<member name="P:Tizen.Multimedia.AudioStreamPolicy.RecordingFocusState">
<summary>
Gets the state of focus for recording.
</summary>
<value>The state of focus for recording.</value>
+ <exception cref="T:System.ObjectDisposedException">The <see cref="T:Tizen.Multimedia.AudioStreamPolicy"/> has already been disposed of.</exception>
</member>
<member name="P:Tizen.Multimedia.AudioStreamPolicy.FocusReacquisitionEnabled">
<summary>
If you don't want to reacquire the focus you've lost automatically,
disable the focus reacquisition.
</remarks>
+ <exception cref="T:System.ObjectDisposedException">The <see cref="T:Tizen.Multimedia.AudioStreamPolicy"/> has already been disposed of.</exception>
</member>
<member name="M:Tizen.Multimedia.AudioStreamPolicy.AcquireFocus(Tizen.Multimedia.AudioStreamFocusOptions,Tizen.Multimedia.AudioStreamBehaviors,System.String)">
<summary>
<param name="options">The focuses that you want to acquire.</param>
<param name="behaviors">The requesting behaviors.</param>
<param name="extraInfo">The extra information for this request. This value can be null.</param>
+ <exception cref="T:System.ArgumentException"><paramref name="options"/> is zero.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">
+ <paramref name="options"/> contain a invalid bit.\n
+ -or-\n
+ <paramref name="behaviors"/> contain a invalid bit.\n
+ </exception>
+ <exception cref="T:System.InvalidOperationException">The focus has already been acquired.</exception>
+ <exception cref="T:Tizen.Multimedia.AudioPolicyException">Called in <see cref="E:Tizen.Multimedia.AudioStreamPolicy.FocusStateChanged"/> raised by releasing focus.</exception>
+ <exception cref="T:System.ObjectDisposedException">The <see cref="T:Tizen.Multimedia.AudioStreamPolicy"/> has already been disposed of.</exception>
</member>
<member name="M:Tizen.Multimedia.AudioStreamPolicy.ReleaseFocus(Tizen.Multimedia.AudioStreamFocusOptions,Tizen.Multimedia.AudioStreamBehaviors,System.String)">
<summary>
<param name="options">The focus mask that you want to release.</param>
<param name="behaviors">The requesting behaviors.</param>
<param name="extraInfo">The extra information for this request. This value can be null.</param>
+ <exception cref="T:System.ArgumentException"><paramref name="options"/> is zero.</exception>
+ <exception cref="T:System.ArgumentOutOfRangeException">
+ <paramref name="options"/> contain a invalid bit.\n
+ -or-\n
+ <paramref name="behaviors"/> contain a invalid bit.\n
+ </exception>
+ <exception cref="T:System.InvalidOperationException">The focus has not been acquired.</exception>
+ <exception cref="T:System.ObjectDisposedException">The <see cref="T:Tizen.Multimedia.AudioStreamPolicy"/> has already been disposed of.</exception>
</member>
<member name="M:Tizen.Multimedia.AudioStreamPolicy.ApplyStreamRouting">
<summary>
</remarks>
<seealso cref="M:Tizen.Multimedia.AudioStreamPolicy.AddDeviceForStreamRouting(Tizen.Multimedia.AudioDevice)"/>
<seealso cref="M:Tizen.Multimedia.AudioStreamPolicy.RemoveDeviceForStreamRouting(Tizen.Multimedia.AudioDevice)"/>
+ <exception cref="T:System.ObjectDisposedException">The <see cref="T:Tizen.Multimedia.AudioStreamPolicy"/> has already been disposed of.</exception>
</member>
- <member name="M:Tizen.Multimedia.AudioStreamPolicy.AddDeviceForStreamRouting(Tizen.Multimedia.AudioDevice)">
- <summary>
- Adds a device for the stream routing.
- </summary>
- <param name="device">The device to add.</param>
- <remarks>
- The available <see cref="T:Tizen.Multimedia.AudioStreamType"/> is <see cref="F:Tizen.Multimedia.AudioStreamType.Voip"/> and <see cref="F:Tizen.Multimedia.AudioStreamType.MediaExternalOnly"/>.
- </remarks>
- <seealso cref="M:Tizen.Multimedia.AudioManager.GetConnectedDevices"/>
- <seealso cref="M:Tizen.Multimedia.AudioStreamPolicy.ApplyStreamRouting"/>
- </member>
- <member name="M:Tizen.Multimedia.AudioStreamPolicy.RemoveDeviceForStreamRouting(Tizen.Multimedia.AudioDevice)">
- <summary>
- Removes the device for the stream routing.
- </summary>
- <param name="device">The device to remove.</param>
- <remarks>
- The available <see cref="T:Tizen.Multimedia.AudioStreamType"/> is <see cref="F:Tizen.Multimedia.AudioStreamType.Voip"/> and <see cref="F:Tizen.Multimedia.AudioStreamType.MediaExternalOnly"/>.
- </remarks>
- </member>
+ <!-- Badly formed XML comment ignored for member "M:Tizen.Multimedia.AudioStreamPolicy.AddDeviceForStreamRouting(Tizen.Multimedia.AudioDevice)" -->
+ <!-- Badly formed XML comment ignored for member "M:Tizen.Multimedia.AudioStreamPolicy.RemoveDeviceForStreamRouting(Tizen.Multimedia.AudioDevice)" -->
<member name="M:Tizen.Multimedia.AudioStreamPolicy.Dispose">
<summary>
Releases all resources used by the <see cref="T:Tizen.Multimedia.AudioStreamPolicy"/>.
Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
-Version: 4.0.0.88
+Version: 4.0.0.90
Release: 1
Group: Development/Libraries
License: Apache-2.0
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System.Diagnostics;
-
-namespace Tizen.Multimedia
-{
- internal class MultimediaDebug
- {
- [Conditional("DEBUG")]
- internal static void AssertNoError(int errorCode)
- {
- Debug.Assert(errorCode == (int)Internals.Errors.ErrorCode.None,
- $"The API is supposed not to return an error! But it returns error({ errorCode }).",
- "Implementation of core may have been changed, modify the call to throw if the return code is not ok.");
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-
-namespace Tizen.Multimedia
-{
- internal static class ValidationUtil
- {
- internal static void ValidateEnum(Type enumType, object value, string paramName)
- {
- if (!Enum.IsDefined(enumType, value))
- {
- throw new ArgumentException($"Invalid { enumType.Name } value : { value }", paramName);
- }
- }
- }
-}
/// <summary>
/// Gets the all devices currently connected.
/// </summary>
- /// <param name="options">The audio device options.</param>
/// <returns>An IEnumerable<AudioDevice> that contains connected devices.</returns>
public static IEnumerable<AudioDevice> GetConnectedDevices()
{
+++ /dev/null
- /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-namespace Tizen.Multimedia
-{
- /// <summary>
- /// Enumeration for audio device options.
- /// </summary>
- public enum AudioDeviceOptions
- {
- /// <summary>
- /// Mask for input devices
- /// </summary>
- Input = 0x0001,
- /// <summary>
- /// Mask for output devices
- /// </summary>
- Output = 0x0002,
- /// <summary>
- /// Mask for input/output devices (both directions are available)
- /// </summary>
- InputAndOutput = 0x0004,
- /// <summary>
- /// Mask for built-in devices
- /// </summary>
- Internal = 0x00010,
- /// <summary>
- /// Mask for external devices
- /// </summary>
- External = 0x0020,
- /// <summary>
- /// Mask for deactivated devices
- /// </summary>
- Deactivated = 0x1000,
- /// <summary>
- /// Mask for activated devices
- /// </summary>
- Activated = 0x2000,
- /// <summary>
- /// Mask for all devices
- /// </summary>
- All = 0xFFFF
- }
-
- /// <summary>
- /// Enumeration for audio device type.
- /// </summary>
- public enum AudioDeviceType
- {
- /// <summary>
- /// Built-in speaker
- /// </summary>
- BuiltinSpeaker,
- /// <summary>
- /// Built-in receiver
- /// </summary>
- BuiltinReceiver,
- /// <summary>
- /// Built-in mic
- /// </summary>
- BuiltinMic,
- /// <summary>
- /// Audio jack that can be connected to wired accessory such as headphones and headsets
- /// </summary>
- AudioJack,
- /// <summary>
- /// Bluetooth Media (A2DP)
- /// </summary>
- BluetoothMedia,
- /// <summary>
- /// HDMI
- /// </summary>
- Hdmi,
- /// <summary>
- /// Device for forwarding
- /// </summary>
- Forwarding,
- /// <summary>
- /// USB Audio
- /// </summary>
- UsbAudio,
- /// <summary>
- /// Bluetooth Voice (SCO)
- /// </summary>
- BluetoothVoice
- }
-
- /// <summary>
- /// Enumeration for audio device direction.
- /// </summary>
- public enum AudioDeviceIoDirection
- {
- /// <summary>
- /// Input device
- /// </summary>
- Input,
- /// <summary>
- /// Output device
- /// </summary>
- Output,
- /// <summary>
- /// Input/output device (both directions are available)
- /// </summary>
- InputAndOutput
- }
-
- /// <summary>
- /// Enumeration for audio device state.
- /// </summary>
- public enum AudioDeviceState
- {
- /// <summary>
- /// Deactivated state
- /// </summary>
- Deactivated,
- /// <summary>
- /// Activated state
- /// </summary>
- Activated
- }
-
- /// <summary>
- /// Enumeration for audio volume type.
- /// </summary>
- public enum AudioVolumeType
- {
- /// <summary>
- /// Volume type for system
- /// </summary>
- System,
- /// <summary>
- /// Volume type for notification
- /// </summary>
- Notification,
- /// <summary>
- /// Volume type for alarm
- /// </summary>
- Alarm,
- /// <summary>
- /// Volume type for ringtone
- /// </summary>
- Ringtone,
- /// <summary>
- /// Volume type for media
- /// </summary>
- Media,
- /// <summary>
- /// Volume type for call
- /// </summary>
- Call,
- /// <summary>
- /// Volume type for voip
- /// </summary>
- Voip,
- /// <summary>
- /// Volume type for voice
- /// </summary>
- Voice,
- /// <summary>
- /// Volume type None
- /// </summary>
- None
- }
-
- /// <summary>
- /// Enumeration for audio stream type.
- /// </summary>
- public enum AudioStreamType
- {
- /// <summary>
- /// Audio stream type for media
- /// </summary>
- Media,
- /// <summary>
- /// Audio stream type for system
- /// </summary>
- System,
- /// <summary>
- /// Audio stream type for alarm
- /// </summary>
- Alarm,
- /// <summary>
- /// Audio stream type for notification
- /// </summary>
- Notification,
- /// <summary>
- /// Audio stream type for emergency
- /// </summary>
- Emergency,
- /// <summary>
- /// Audio stream type for voice information
- /// </summary>
- VoiceInformation,
- /// <summary>
- /// Audio stream type for voice recognition
- /// </summary>
- VoiceRecognition,
- /// <summary>
- /// Audio stream type for ringtone for VoIP
- /// </summary>
- RingtoneVoip,
- /// <summary>
- /// Audio stream type for VoIP
- /// </summary>
- Voip,
- /// <summary>
- /// Audio stream type for media only for external devices
- /// </summary>
- MediaExternalOnly
- }
-
- /// <summary>
- /// Enumeration for change reason of audio stream focus state.
- /// </summary>
- public enum AudioStreamFocusChangedReason
- {
- /// <summary>
- /// Changed by the stream type for media
- /// </summary>
- Media,
- /// <summary>
- /// Changed by the stream type for system
- /// </summary>
- System,
- /// <summary>
- /// Changed by the stream type for alarm
- /// </summary>
- Alarm,
- /// <summary>
- /// Changed by the stream type for notification
- /// </summary>
- Notification,
- /// <summary>
- /// Changed by the stream type for emergency
- /// </summary>
- Emergency,
- /// <summary>
- /// Changed by the stream type for voice information
- /// </summary>
- VoiceInformation,
- /// <summary>
- /// Changed by the stream type for voice recognition
- /// </summary>
- VoiceRecognition,
- /// <summary>
- /// Changed by the stream type for ringtone
- /// </summary>
- RingtoneVoip,
- /// <summary>
- /// Changed by the stream type for VoIP
- /// </summary>
- Voip,
- /// <summary>
- /// Changed by the stream type for voice-call or video-call
- /// </summary>
- Call,
- /// <summary>
- /// Changed by the stream type for media only for external devices
- /// </summary>
- MediaExternalOnly
- }
-
- /// <summary>
- /// Enumeration for audio stream focus options.
- /// </summary>
- public enum AudioStreamFocusOptions
- {
- /// <summary>
- /// Mask for playback focus
- /// </summary>
- Playback = 0x0001,
- /// <summary>
- /// Mask for recording focus
- /// </summary>
- Recording = 0x0002
- }
-
- /// <summary>
- /// Enumeration for audio stream focus state.
- /// </summary>
- public enum AudioStreamFocusState
- {
- /// <summary>
- /// Focus state for release
- /// </summary>
- Released,
- /// <summary>
- ///Focus state for acquisition
- /// </summary>
- Acquired
- }
-
- /// <summary>
- /// Enumeration for audio stream behavior
- /// </summary>
- [Flags]
- public enum AudioStreamBehavior
- {
- /// <summary>
- /// Audio Stream Behavior NONE
- /// </summary>
- None = 0x0000,
- /// <summary>
- /// Audio Stream Behavior No Resume
- /// </summary>
- NoResume = 0x0001,
- /// <summary>
- /// Audio Stream Behavior Fading
- /// </summary>
- Fading = 0x0002
- }
-}
+++ /dev/null
- /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using Tizen.Internals.Errors;
-
-namespace Tizen.Multimedia
-{
- /// <summary>
- /// Enumeration for sound manager's error codes.
- /// </summary>
- internal enum AudioManagerError{
-
- SoundManagerError = -0x01960000,
- /// <summary>
- /// Successful
- /// </summary>
- None = ErrorCode.None,
- /// <summary>
- /// Out of memory
- /// </summary>
- OutOfMemory = ErrorCode.OutOfMemory,
- /// <summary>
- /// Invalid parameter
- /// </summary>
- InvalidParameter = ErrorCode.InvalidParameter,
- /// <summary>
- /// Invalid operation
- /// </summary>
- InvalidOperation = ErrorCode.InvalidOperation,
- /// <summary>
- /// Permission denied
- /// </summary>
- PermissionDenied = ErrorCode.PermissionDenied,
- /// <summary>
- /// Not supported
- /// </summary>
- NotSupported = ErrorCode.NotSupported,
- /// <summary>
- /// No data
- /// </summary>
- NoData = ErrorCode.NoData,
- /// <summary>
- /// Internal error inside the sound system
- /// </summary>
- Internal = SoundManagerError | 01,
- /// <summary>
- /// Noncompliance with the sound system policy
- /// </summary>
- Policy = SoundManagerError | 02,
- /// <summary>
- /// No playing sound
- /// </summary>
- NoPlayingSound = SoundManagerError | 03,
- /// <summary>
- /// Invalid state (Since 3.0)
- /// </summary>
- InvalidState = SoundManagerError | 04
- }
-
- internal static class AudioManagerErrorFactory
- {
- static internal void CheckAndThrowException(int error, string msg)
- {
- AudioManagerError e = (AudioManagerError) error;
- switch (e)
- {
- case AudioManagerError.None:
- return;
- case AudioManagerError.OutOfMemory:
- throw new InvalidOperationException("Out of Memory: " + msg);
- case AudioManagerError.InvalidParameter:
- throw new ArgumentException("Invalid Parameter: " + msg);
- case AudioManagerError.InvalidOperation:
- throw new InvalidOperationException("Invalid Opertation: " + msg);
- case AudioManagerError.PermissionDenied:
- throw new InvalidOperationException("Permission Denied: " + msg);
- case AudioManagerError.NotSupported:
- throw new InvalidOperationException("Not Supported: " + msg);
- case AudioManagerError.NoData:
- throw new InvalidOperationException("No Data: " + msg);
- case AudioManagerError.Internal:
- throw new InvalidOperationException("Internal Error: " + msg);
- case AudioManagerError.Policy:
- throw new InvalidOperationException("Noncomplaince with System Sound Policy error: " + msg);
- case AudioManagerError.NoPlayingSound:
- throw new InvalidOperationException("No playing sound: " + msg);
- case AudioManagerError.InvalidState:
- throw new InvalidOperationException("Invalid State: " + msg);
- default:
- throw new InvalidOperationException("Unknown Error Code: " + msg);
- }
- }
-
- static internal void CheckAndThrowException(int error, IntPtr handle, string msg)
- {
- if (handle == IntPtr.Zero)
- {
- throw new InvalidOperationException("Invalid instance (object may have been disposed or released)");
- }
- else
- {
- CheckAndThrowException(error, msg);
- }
- }
- }
-}
/// be passed to other APIs related to playback or recording. (e.g., <see cref="Player"/>, <see cref="WavPlayer"/> , etc.)
/// </remarks>
/// <param name="streamType">Type of sound stream for which policy needs to be created.</param>
+ /// <exception cref="ArgumentException"><paramref name="streamType"/> is invalid.</exception>
public AudioStreamPolicy(AudioStreamType streamType)
{
ValidationUtil.ValidateEnum(typeof(AudioStreamType), streamType, nameof(streamType));
/// it returns <see cref="AudioVolumeType.None"/>.
/// </remarks>
/// <value>The <see cref="AudioVolumeType"/> of the policy instance.</value>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
public AudioVolumeType VolumeType
{
get
/// Gets the state of focus for playback.
/// </summary>
/// <value>The state of focus for playback.</value>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
public AudioStreamFocusState PlaybackFocusState => GetFocusState(true);
/// <summary>
/// Gets the state of focus for recording.
/// </summary>
/// <value>The state of focus for recording.</value>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
public AudioStreamFocusState RecordingFocusState => GetFocusState(false);
/// <summary>
/// If you don't want to reacquire the focus you've lost automatically,
/// disable the focus reacquisition.
/// </remarks>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
public bool FocusReacquisitionEnabled
{
get
/// <param name="options">The focuses that you want to acquire.</param>
/// <param name="behaviors">The requesting behaviors.</param>
/// <param name="extraInfo">The extra information for this request. This value can be null.</param>
+ /// <exception cref="ArgumentException"><paramref name="options"/> is zero.</exception>
+ /// <exception cref="ArgumentOutOfRangeException">
+ /// <paramref name="options"/> contain a invalid bit.\n
+ /// -or-\n
+ /// <paramref name="behaviors"/> contain a invalid bit.\n
+ /// </exception>
+ /// <exception cref="InvalidOperationException">The focus has already been acquired.</exception>
+ /// <exception cref="AudioPolicyException">Called in <see cref="FocusStateChanged"/> raised by releasing focus.</exception>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
public void AcquireFocus(AudioStreamFocusOptions options, AudioStreamBehaviors behaviors, string extraInfo)
{
if (options == 0)
/// <param name="options">The focus mask that you want to release.</param>
/// <param name="behaviors">The requesting behaviors.</param>
/// <param name="extraInfo">The extra information for this request. This value can be null.</param>
+ /// <exception cref="ArgumentException"><paramref name="options"/> is zero.</exception>
+ /// <exception cref="ArgumentOutOfRangeException">
+ /// <paramref name="options"/> contain a invalid bit.\n
+ /// -or-\n
+ /// <paramref name="behaviors"/> contain a invalid bit.\n
+ /// </exception>
+ /// <exception cref="InvalidOperationException">The focus has not been acquired.</exception>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
public void ReleaseFocus(AudioStreamFocusOptions options, AudioStreamBehaviors behaviors, string extraInfo)
{
if (options == 0)
/// </remarks>
/// <seealso cref="AddDeviceForStreamRouting(AudioDevice)"/>
/// <seealso cref="RemoveDeviceForStreamRouting(AudioDevice)"/>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
public void ApplyStreamRouting()
{
Interop.AudioStreamPolicy.ApplyStreamRouting(Handle).Validate("Failed to apply stream routing");
/// <remarks>
/// The available <see cref="AudioStreamType"/> is <see cref="AudioStreamType.Voip"/> and <see cref="AudioStreamType.MediaExternalOnly"/>.
/// </remarks>
+ /// <exception cref="InvalidOperationException">
+ /// The device is not connected.\n
+ /// -or-\n
+ /// An internal error occurs.
+ /// </exception>
+ /// <exception cref="ArgumentNullException"><paramref name="device"> is null.</exception>
+ /// <exception cref="AudioPolicyException"><see cref="AudioStreamType"/> of <paramref name="device"/> is unavailable for this.</exception>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
/// <seealso cref="AudioManager.GetConnectedDevices()"/>
/// <seealso cref="ApplyStreamRouting"/>
public void AddDeviceForStreamRouting(AudioDevice device)
{
throw new ArgumentNullException(nameof(device));
}
+
var ret = Interop.AudioStreamPolicy.AddDeviceForStreamRouting(Handle, device.Id);
if (ret == AudioManagerError.NoData)
{
- throw new ArgumentException("The device seems not connected.", nameof(device));
+ throw new InvalidOperationException("The device seems not connected.");
}
ret.Validate("Failed to add device for stream routing");
/// <remarks>
/// The available <see cref="AudioStreamType"/> is <see cref="AudioStreamType.Voip"/> and <see cref="AudioStreamType.MediaExternalOnly"/>.
/// </remarks>
+ /// <exception cref="InvalidOperationException">An internal error occurs.</exception>
+ /// <exception cref="ArgumentNullException"><paramref name="device"> is null.</exception>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
+ /// <seealso cref="AudioManager.GetConnectedDevices()"/>
public void RemoveDeviceForStreamRouting(AudioDevice device)
{
if (device == null)
+++ /dev/null
- /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-
-namespace Tizen.Multimedia
-{
- /// <summary>
- /// Class extending EventArgs and contains the necessary parameters to passed to FocusStateWatch event handler
- /// </summary>
- public class FocusStateChangedEventArgs : EventArgs
- {
- internal FocusStateChangedEventArgs(AudioStreamFocusState focusState, AudioStreamFocusChangedReason reason, string extraInformation)
- {
- FocusState = focusState;
- FocusChangedReason = reason;
- ExtraInformation = extraInformation;
- }
-
- /// <summary>
- /// The changed focus state
- /// </summary>
- public AudioStreamFocusState FocusState { get; }
-
- /// <summary>
- /// The reason for state change of the focus
- /// </summary>
- public AudioStreamFocusChangedReason FocusChangedReason { get; }
-
- /// <summary>
- /// The extra information
- /// </summary>
- public string ExtraInformation { get; }
- }
-}