mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Enforce a read callback to be specified for decoders.
This commit is contained in:
@@ -66237,6 +66237,11 @@ static ma_result ma_decoder__preinit(ma_decoder_read_proc onRead, ma_decoder_see
|
|||||||
|
|
||||||
MA_ZERO_OBJECT(pDecoder);
|
MA_ZERO_OBJECT(pDecoder);
|
||||||
|
|
||||||
|
/* A read callback must be available. */
|
||||||
|
if (onRead == NULL) {
|
||||||
|
return MA_INVALID_ARGS;
|
||||||
|
}
|
||||||
|
|
||||||
dataSourceConfig = ma_data_source_config_init();
|
dataSourceConfig = ma_data_source_config_init();
|
||||||
dataSourceConfig.vtable = &g_ma_decoder_data_source_vtable;
|
dataSourceConfig.vtable = &g_ma_decoder_data_source_vtable;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user