Class TonePlayer
Definition
- Namespace:
- Tizen.Multimedia
- Assembly:
- Tizen.Multimedia.AudioIO.dll
Provides the ability to play a tone.
public static class TonePlayer
- Inheritance
-
objectTonePlayer
Methods
View SourceStartAsync(ToneType, AudioStreamPolicy, int, CancellationToken)
Plays a tone, asynchronously.
Declaration
public static Task StartAsync(ToneType tone, AudioStreamPolicy streamPolicy, int durationMilliseconds, CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| ToneType | tone | A ToneType to play. |
| AudioStreamPolicy | streamPolicy | |
| int | 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 |
|
| System.ObjectDisposedException |
|
StartAsync(ToneType, AudioStreamPolicy, int)
Plays a tone, asynchronously.
Declaration
public static Task StartAsync(ToneType tone, AudioStreamPolicy streamPolicy, int durationMilliseconds)
Parameters
| Type | Name | Description |
|---|---|---|
| ToneType | tone | A ToneType to play. |
| AudioStreamPolicy | streamPolicy | |
| int | 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 |
|
| System.ObjectDisposedException |
|