# setVolume method

Future<void> setVolume(

1. double volume

)

Change the output volume

The volume can be changed when player is running or before startPlayer().

## Parameters

- **volume:**The parameter is a floating point number between 0 and 1.

## Return

- Return a Future which is completed when the function is done.

## Example

    await myPlayer.setVolume(0.1);

## See also

- setVolumePan()

## Implementation

    Future<void> setVolume(double volume) async {
      await _lock.synchronized(() async {
        await _setVolume(volume);
      });
    }