Class AudioDucking
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.dll
- API Level:
- 6
Provides the functionalities to control audio ducking.
public sealed class AudioDucking : IDisposable
- Inheritance
-
AudioDucking
- Implements
Constructors
View SourceAudioDucking(AudioStreamType)
Initializes a new instance of the AudioDucking class with AudioStreamType.
Declaration
public AudioDucking(AudioStreamType targetType)
Parameters
Type | Name | Description |
---|---|---|
AudioStreamType | targetType | The type of sound stream affected by this new instance. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
InvalidOperationException | Operation failed; internal error. |
API Level: 6
Properties
View SourceIsDucked
Gets the ducking state of the stream.
Declaration
public bool IsDucked { get; }
Property Value
Type | Description |
---|---|
Boolean | true if the audio stream is ducked; otherwise, false. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Operation failed; internal error. |
ObjectDisposedException | The AudioDucking has already been disposed of. |
API Level: 6
Methods
View SourceActivate(UInt32, Double)
Activate audio ducking
Declaration
public void Activate(uint duration, double ratio)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | 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 |
---|---|
ArgumentOutOfRangeException |
|
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
View SourceDeactivate()
Deactivate audio ducking
Declaration
public void Deactivate()
Remarks
To deactivate ducking, the specified privilege is required.
Exceptions
Type | Condition |
---|---|
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
View SourceDispose()
Releases all resources used by the AudioDucking.
Declaration
public void Dispose()
API Level: 6
Events
View SourceDuckingStateChanged
Occurs when the ducking state is changed.
Declaration
public event EventHandler<AudioDuckingStateChangedEventArgs> DuckingStateChanged
Event Type
Type | Description |
---|---|
EventHandler<AudioDuckingStateChangedEventArgs> |