|
ginnOS
The reference: libc, the libraries and the kernel
|
#include </home/runner/work/ginnOS-docs/ginnOS-docs/ginnOS/src/kernel/audio/audio.h>
Data Fields | |
| bool(*) | start (audio_device_t *dev) |
| start playing. | |
| void(*) | stop (audio_device_t *dev) |
| stop playing. | |
| uint32_t(*) | set_rate (audio_device_t *dev, uint32_t rate) |
| use a sample rate, or the nearest one the device has. | |
| void(*) | set_volume (audio_device_t *dev, uint32_t left, uint32_t right) |
| set the output volume (optional). | |
| bool(*) audio_ops_t::start(audio_device_t *dev) |
start playing.
the driver fills all its periods with audio_pull first. called in process context.
| void(*) audio_ops_t::stop(audio_device_t *dev) |
stop playing.
called in process context.
| uint32_t(*) audio_ops_t::set_rate(audio_device_t *dev, uint32_t rate) |
use a sample rate, or the nearest one the device has.
called only while the device is stopped.
| rate | the wanted rate in Hz. |
| void(*) audio_ops_t::set_volume(audio_device_t *dev, uint32_t left, uint32_t right) |
set the output volume (optional).
| left | the left volume, 0 to 100. |
| right | the right volume, 0 to 100. |