libretro.drivers.audio.array¶
An audio driver that accumulates all received samples in an array.
See also
libretro.api.audioDefines the audio callback types and sample formats this driver handles.
Classes
A basic |
- class ArrayAudioDriver[source]¶
Bases:
AudioDriverA basic
AudioDriverthat stores all audio samples in an in-memoryarray.Suitable for tests that need to inspect audio output after the fact.
- sample(left, right)[source]¶
Receives a single stereo audio sample from the core.
- Parameters:
See also
retro_audio_sample_tThe C function pointer type whose signature this method implements.
- sample_batch(frames)[source]¶
Receives a batch of interleaved stereo audio frames from the core.
- Parameters:
frames (
memoryview) – A read-onlymemoryviewof interleaved signed 16-bit stereo frames.- Return type:
- Returns:
The number of frames consumed.
See also
retro_audio_sample_batch_tThe C function pointer type whose signature this method implements.
- property callbacks¶
Audio callbacks are not supported by this driver.
- Returns:
None, always.- Raises:
UnsupportedEnvCall – If setting this property.
- property buffer_status¶
Buffer-status callbacks are not supported by this driver.
- Returns:
None, always.- Raises:
UnsupportedEnvCall – If setting this property.
- property minimum_latency¶
Setting a minimum latency is not supported by this driver.
- Returns:
None, always.- Raises:
UnsupportedEnvCall – If setting this property.
- classmethod __new__(*args, **kwargs)¶
- callback()¶
Invoke the registered asynchronous audio callback, if any.
Calls
retro_audio_callback.callbackif a callback is registered.- Return type:
- report_buffer_status(active, occupancy, underrun_likely)¶
Invoke the registered buffer-status callback, if any.
- set_state(enabled)¶
Enable or disables the registered asynchronous audio callback.
Calls
retro_audio_callback.set_stateif a callback is registered.
- property system_av_info¶
The AV info most recently set by the core.
Used by the driver to configure audio parameters such as sample rate.