mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-29 19:54:05 +02:00
API CHANGE: Add an onCopy callback to ma_data_source_vtable.
This is used for making a copy of a data source. Data sources are not required to support copying, in which case this callback can be set to NULL, or it can return MA_NOT_IMPLEMENTED. This commit just sets up the infrastructure. As of this commit, no data sources actually implement this, however future commits will be introducing support in stages.
This commit is contained in:
@@ -49,6 +49,7 @@ static ma_data_source_vtable ma_gDataSourceVTable_libopus =
|
||||
{
|
||||
ma_libopus_ds_sizeof,
|
||||
ma_libopus_ds_uninit,
|
||||
NULL, /* onCopy. Copying is not supported. */
|
||||
ma_libopus_ds_read,
|
||||
ma_libopus_ds_seek,
|
||||
ma_libopus_ds_get_data_format,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/*
|
||||
This implements a data source that decodes Opus streams via libopus + libopusfile
|
||||
This implements a data source that decodes Opus streams via libopus + libopusfile.
|
||||
|
||||
This object can be plugged into any `ma_data_source_*()` API and can also be used as a custom
|
||||
decoding backend. See the custom_decoder example.
|
||||
|
||||
This does not support copying.
|
||||
*/
|
||||
#ifndef miniaudio_libopus_h
|
||||
#define miniaudio_libopus_h
|
||||
|
||||
@@ -52,6 +52,7 @@ static ma_data_source_vtable ma_gDataSourceVTable_libvorbis =
|
||||
{
|
||||
ma_libvorbis_ds_sizeof,
|
||||
ma_libvorbis_ds_uninit,
|
||||
NULL, /* onCopy. Copying is not supported. */
|
||||
ma_libvorbis_ds_read,
|
||||
ma_libvorbis_ds_seek,
|
||||
ma_libvorbis_ds_get_data_format,
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/*
|
||||
This implements a data source that decodes Vorbis streams via libvorbis + libvorbisfile
|
||||
This implements a data source that decodes Vorbis streams via libvorbis + libvorbisfile.
|
||||
|
||||
This object can be plugged into any `ma_data_source_*()` API and can also be used as a custom
|
||||
decoding backend. See the custom_decoder example.
|
||||
|
||||
This does not support copying.
|
||||
*/
|
||||
#ifndef miniaudio_libvorbis_h
|
||||
#define miniaudio_libvorbis_h
|
||||
|
||||
Reference in New Issue
Block a user