API CHANGE: Add channel maps to ma_data_source_get_data_format().

This commit also removes the onGetChannelMap callback from the decoding
backend vtable.
This commit is contained in:
David Reid
2021-07-04 18:21:36 +10:00
parent def3140425
commit 3fad6cad86
7 changed files with 89 additions and 117 deletions
+2 -4
View File
@@ -96,8 +96,7 @@ static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_libvorbis =
ma_decoding_backend_init_file__libvorbis,
NULL, /* onInitFileW() */
NULL, /* onInitMemory() */
ma_decoding_backend_uninit__libvorbis,
ma_decoding_backend_get_channel_map__libvorbis
ma_decoding_backend_uninit__libvorbis
};
@@ -173,8 +172,7 @@ static ma_decoding_backend_vtable g_ma_decoding_backend_vtable_libopus =
ma_decoding_backend_init_file__libopus,
NULL, /* onInitFileW() */
NULL, /* onInitMemory() */
ma_decoding_backend_uninit__libopus,
ma_decoding_backend_get_channel_map__libopus
ma_decoding_backend_uninit__libopus
};
@@ -73,7 +73,7 @@ MA_API ma_result ma_data_source_read_pcm_frames_f32(ma_data_source* pDataSource,
ma_format format;
ma_uint32 channels;
result = ma_data_source_get_data_format(pDataSource, &format, &channels, NULL);
result = ma_data_source_get_data_format(pDataSource, &format, &channels, NULL, NULL, 0);
if (result != MA_SUCCESS) {
return result; /* Failed to retrieve the data format of the data source. */
}
@@ -96,7 +96,7 @@ MA_API ma_result ma_data_source_read_pcm_frames_and_mix_f32(ma_data_source* pDat
return MA_INVALID_ARGS;
}
result = ma_data_source_get_data_format(pDataSource, &format, &channels, NULL);
result = ma_data_source_get_data_format(pDataSource, &format, &channels, NULL, NULL, 0);
if (result != MA_SUCCESS) {
return result; /* Failed to retrieve the data format of the data source. */
}