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

Commit 3bb2fd1

Browse files
authored
Update README.md
1 parent feee07e commit 3bb2fd1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -303,29 +303,35 @@ static void TestCaptureVideo()
303303
```
304304

305305
## Audio settings
306+
306307
### Changing audio settings
308+
307309
Basic audio settings have been implemented in RaspberryIO:
310+
308311
- Set a specific volume level percentage.
309312
- Set a specific volume level in decibels (dB)
310313
- Mute an audio device.
311314
- Consult audio device settings.
312315

313-
Users set an audio card, an audio device and an audio command to perform an audio action.
314-
Example of audio tasks
316+
Users set an audio card, an audio device and an audio command to perform an audio action. Example of audio tasks:
317+
315318
```csharp
316319
await Pi.PiVolumeControl.SetVolumePercentage(85).ConfigureAwait(false);
317320

318321
await Pi.PiVolumeControl.SetVolumeByDecibels(-1.00f).ConfigureAwait(false);
319322
```
323+
320324
The code above sets the volume level in two different formats: Percentage or Decibels.
321325
The first method sets the volume on percentage (0% - 100%) and the second sets the volume level on decibels(dB) (-101.32dB - 4.00dB).
322326

323327
Users can consult the current audio settings by using the method GetState.
324328
An example is shown below:
329+
325330
```csharp
326331
var currentState = await Pi.Audio.GetState().ConfigureAwait(false);
327332
Console.WriteLine(currentState);
328333
```
334+
329335
The same result can be achieved by setting the volume level to 0% or -9999.99dB.
330336

331337
## Obtaining Board and System Information

0 commit comments

Comments
 (0)