This repository was archived by the owner on Aug 10, 2022. It is now read-only.
File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -303,29 +303,35 @@ static void TestCaptureVideo()
303
303
```
304
304
305
305
## Audio settings
306
+
306
307
### Changing audio settings
308
+
307
309
Basic audio settings have been implemented in RaspberryIO:
310
+
308
311
- Set a specific volume level percentage.
309
312
- Set a specific volume level in decibels (dB)
310
313
- Mute an audio device.
311
314
- Consult audio device settings.
312
315
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
+
315
318
``` csharp
316
319
await Pi .PiVolumeControl .SetVolumePercentage (85 ).ConfigureAwait (false );
317
320
318
321
await Pi .PiVolumeControl .SetVolumeByDecibels (- 1 . 00 f ).ConfigureAwait (false );
319
322
```
323
+
320
324
The code above sets the volume level in two different formats: Percentage or Decibels.
321
325
The first method sets the volume on percentage (0% - 100%) and the second sets the volume level on decibels(dB) (-101.32dB - 4.00dB).
322
326
323
327
Users can consult the current audio settings by using the method GetState.
324
328
An example is shown below:
329
+
325
330
``` csharp
326
331
var currentState = await Pi .Audio .GetState ().ConfigureAwait (false );
327
332
Console .WriteLine (currentState );
328
333
```
334
+
329
335
The same result can be achieved by setting the volume level to 0% or -9999.99dB.
330
336
331
337
## Obtaining Board and System Information
You can’t perform that action at this time.
0 commit comments