Class TonePlayer
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.AudioIO.dll
- API Level:
- 3
Provides the ability to play a tone.
C#Copypublic static class TonePlayer
- Inheritance
-
System.ObjectTonePlayer
Methods
Declaration
C#Copypublic static Task StartAsync(ToneType tone, AudioStreamPolicy streamPolicy, int durationMilliseconds)
Parameters
Type | Name | Description |
---|---|---|
ToneType | tone | A ToneType to play. |
AudioStreamPolicy | streamPolicy | |
Int32 | durationMilliseconds | The tone duration in milliseconds. -1 indicates an infinite duration. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException |
|
System.InvalidOperationException | Any invalid operations occurred. |
System.NotSupportedException |
|
ObjectDisposedException |
|
API Level: 3
StartAsync(ToneType, AudioStreamPolicy, Int32, CancellationToken)
Plays a tone, asynchronously.
Declaration
C#Copypublic static Task StartAsync(ToneType tone, AudioStreamPolicy streamPolicy, int durationMilliseconds, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ToneType | tone | A ToneType to play. |
AudioStreamPolicy | streamPolicy | |
Int32 | durationMilliseconds | The tone duration in milliseconds. -1 indicates an infinite duration. |
System.Threading.CancellationToken | cancellationToken | The cancellation token which can be used to stop playing the tone. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the asynchronous operation. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|
System.ArgumentNullException |
|
System.ArgumentOutOfRangeException |
|
System.InvalidOperationException | Any invalid operations occurred. |
System.NotSupportedException |
|
ObjectDisposedException |
|