mirror of https://github.com/LIJI32/SameBoy.git
Updated GB_apu_set_sample_callback (markdown)
parent
2d14f09219
commit
e02b68cdf8
|
@ -4,14 +4,23 @@
|
||||||
typedef void (*GB_sample_callback_t)(GB_gameboy_t *gb, GB_sample_t *sample);
|
typedef void (*GB_sample_callback_t)(GB_gameboy_t *gb, GB_sample_t *sample);
|
||||||
```
|
```
|
||||||
|
|
||||||
<tt>void GB_apu_set_sample_callback([[GB_gameboy_t]] *gb, [[GB_sample_callback_t]] callback);</tt>
|
<tt>void GB_apu_set_sample_callback([[GB_gameboy_t]] *gb, GB_sample_callback_t callback);</tt>
|
||||||
|
|
||||||
In `apu.h`
|
In `apu.h`
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
TBD
|
This function sets a callback that's whenever the emulator instance has a rendered sample ready. The rate in which the callback is called is controlled by the [[sample rate|GB_set_sample rate]].
|
||||||
|
|
||||||
## Thread Safety
|
## Thread Safety
|
||||||
|
|
||||||
`GB_apu_set_sample_callback` is thread-safe and can be called from any thread and context.
|
`GB_apu_set_sample_callback` is thread-safe and can be called from any thread and context.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
The callback isn't called when the sample rate is set to 0.
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
* [[GB_sample_t]]
|
||||||
|
* [[GB_set_sample_rate]]
|
Loading…
Reference in New Issue