Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
geoperez authored May 22, 2019
1 parent feee07e commit 3bb2fd1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,29 +303,35 @@ static void TestCaptureVideo()
```

## Audio settings

### Changing audio settings

Basic audio settings have been implemented in RaspberryIO:

- Set a specific volume level percentage.
- Set a specific volume level in decibels (dB)
- Mute an audio device.
- Consult audio device settings.

Users set an audio card, an audio device and an audio command to perform an audio action.
Example of audio tasks
Users set an audio card, an audio device and an audio command to perform an audio action. Example of audio tasks:

```csharp
await Pi.PiVolumeControl.SetVolumePercentage(85).ConfigureAwait(false);

await Pi.PiVolumeControl.SetVolumeByDecibels(-1.00f).ConfigureAwait(false);
```

The code above sets the volume level in two different formats: Percentage or Decibels.
The first method sets the volume on percentage (0% - 100%) and the second sets the volume level on decibels(dB) (-101.32dB - 4.00dB).

Users can consult the current audio settings by using the method GetState.
An example is shown below:

```csharp
var currentState = await Pi.Audio.GetState().ConfigureAwait(false);
Console.WriteLine(currentState);
```

The same result can be achieved by setting the volume level to 0% or -9999.99dB.

## Obtaining Board and System Information
Expand Down

0 comments on commit 3bb2fd1

Please sign in to comment.