Class AudioDucking

Definition

Namespace:
Tizen.Multimedia
Assembly:
Tizen.Multimedia.dll

Provides the functionalities to control audio ducking.

C#
Copy
public sealed class AudioDucking : IDisposable
Inheritance
object
AudioDucking
Implements
System.IDisposable

Constructors

View Source

AudioDucking(AudioStreamType)

Initializes a new instance of the AudioDucking class with AudioStreamType.

Declaration
C#
Copy
public AudioDucking(AudioStreamType targetType)
Parameters
Type Name Description
AudioStreamType targetType

The type of sound stream affected by this new instance.

Exceptions
Type Condition
System.ArgumentException

targetType is invalid.

System.InvalidOperationException

Operation failed; internal error.

See Also

Properties

View Source

IsDucked

Gets the ducking state of the stream.

Declaration
C#
Copy
public bool IsDucked { get; }
Property Value
Type Description
bool

true if the audio stream is ducked; otherwise, false.

Exceptions
Type Condition
System.InvalidOperationException

Operation failed; internal error.

System.ObjectDisposedException

The AudioDucking has already been disposed of.

See Also

Methods

View Source

Activate(uint, double)

Activate audio ducking

Declaration
C#
Copy
public void Activate(uint duration, double ratio)
Parameters
Type Name Description
uint duration

The duration for ducking in milliseconds.

double ratio

The volume ratio when ducked.

Remarks

To activate ducking, the specified privilege is required.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

duration is less than 0 or greater than 3000.
-or-
ratio is less than 0.0 or greater than or equal to 1.0.

System.InvalidOperationException

Operation failed; internal error.
-or-
The target stream is already ducked.

System.UnauthorizedAccessException

The caller does not have required privilege to set volume.

System.ObjectDisposedException

The AudioDucking has already been disposed of.

See Also
View Source

Deactivate()

Deactivate audio ducking

Declaration
C#
Copy
public void Deactivate()
Remarks

To deactivate ducking, the specified privilege is required.

Exceptions
Type Condition
System.InvalidOperationException

Operation failed; internal error.
-or-
The target stream is already unducked.

System.UnauthorizedAccessException

The caller does not have required privilege to set volume.

System.ObjectDisposedException

The AudioDucking has already been disposed of.

See Also
View Source

Dispose()

Releases all resources used by the AudioDucking.

Declaration
C#
Copy
public void Dispose()
See Also

Events

View Source

DuckingStateChanged

Occurs when the ducking state is changed.

Declaration
C#
Copy
public event EventHandler<AudioDuckingStateChangedEventArgs> DuckingStateChanged
Event Type
Type Description
System.EventHandler<TEventArgs><AudioDuckingStateChangedEventArgs>
See Also

Implements

System.IDisposable

See Also