API CHANGE: Update ma_get_standard_channel_map().

This adds a capacity parameter for added safety. It also changes the
order of parameters to make it a bit more consistent.
This commit is contained in:
David Reid
2021-07-04 19:46:00 +10:00
parent 3fad6cad86
commit 33aae652fe
5 changed files with 625 additions and 627 deletions
+1 -1
View File
@@ -415,7 +415,7 @@ static ma_result ma_device_init_internal__sdl(ma_device_ex* pDeviceEx, const ma_
pDescriptor->format = ma_format_from_sdl(obtainedSpec.format);
pDescriptor->channels = obtainedSpec.channels;
pDescriptor->sampleRate = (ma_uint32)obtainedSpec.freq;
ma_get_standard_channel_map(ma_standard_channel_map_default, pDescriptor->channels, pDescriptor->channelMap);
ma_get_standard_channel_map(ma_standard_channel_map_default, pDescriptor->channelMap, ma_countof(pDescriptor->channelMap), pDescriptor->channels);
pDescriptor->periodSizeInFrames = obtainedSpec.samples;
pDescriptor->periodCount = 1; /* SDL doesn't use the notion of period counts, so just set to 1. */