Class AudioDucking
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.dll
- API Level:
- 6
Provides the functionalities to control audio ducking.
C#Copypublic sealed class AudioDucking : IDisposable
- Inheritance
-
AudioDucking
- Implements
-
System.IDisposable
Constructors
AudioDucking(AudioStreamType)
Initializes a new instance of the AudioDucking class with AudioStreamType.
Declaration
C#Copypublic AudioDucking(AudioStreamType targetType)
Parameters
Type | Name | Description |
---|---|---|
AudioStreamType | targetType | The type of sound stream affected by this new instance. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
System.InvalidOperationException | Operation failed; internal error. |
API Level: 6
Properties
Declaration
C#Copypublic bool IsDucked { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the audio stream is ducked; otherwise, false. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Operation failed; internal error. |
ObjectDisposedException | The AudioDucking has already been disposed of. |
API Level: 6
Methods
Declaration
C#Copypublic void Activate(uint duration, double ratio)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | duration | The duration for ducking in milliseconds. |
System.Double | ratio | The volume ratio when ducked. |
Remarks
To activate ducking, the specified privilege is required.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
System.InvalidOperationException | Operation failed; internal error. |
UnauthorizedAccessException | The caller does not have required privilege to set volume. |
ObjectDisposedException | The AudioDucking has already been disposed of. |
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/volume.set
Declaration
C#Copypublic void Deactivate()
Remarks
To deactivate ducking, the specified privilege is required.
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Operation failed; internal error. |
UnauthorizedAccessException | The caller does not have required privilege to set volume. |
ObjectDisposedException | The AudioDucking has already been disposed of. |
API Level: 6
Privilege Level: public
Privilege: http://tizen.org/privilege/volume.set
Declaration
C#Copypublic void Dispose()
API Level: 6
Events
Declaration
C#Copypublic event EventHandler<AudioDuckingStateChangedEventArgs> DuckingStateChanged
Event Type
Type | Description |
---|---|
System.EventHandler<AudioDuckingStateChangedEventArgs> |