Class TonePlayer

    Definition

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

    Provides the ability to play a tone.

    public static class TonePlayer
    Inheritance
    object
    TonePlayer

    Methods

    View Source

    StartAsync(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

    A AudioStreamPolicy.

    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

    tone is invalid.

    System.ArgumentNullException

    streamPolicy is null.

    System.ArgumentOutOfRangeException

    durationMilliseconds is less than -1.

    System.InvalidOperationException

    Any invalid operations occurred.

    System.NotSupportedException

    tone is not a supported type.

    System.ObjectDisposedException

    streamPolicy has already been disposed of.

    View Source

    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

    A AudioStreamPolicy.

    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

    tone is invalid.

    System.ArgumentNullException

    streamPolicy is null.

    System.ArgumentOutOfRangeException

    durationMilliseconds is less than -1.

    System.InvalidOperationException

    Any invalid operations occurred.

    System.NotSupportedException

    tone is not a supported type.

    System.ObjectDisposedException

    streamPolicy has already been disposed of.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX