Update ma_audio_buffer_ref_init() to take a buffer.

This saves a mandatory call to ma_audio_buffer_ref_set_data(). With
this change, an ma_audio_buffer_ref_init() call is all that is required
to initialize a usable data source.
This commit is contained in:
David Reid
2021-01-16 20:36:19 +10:00
parent 6a8d450e87
commit 2e22affe38
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ int main(int argc, char** argv)
/* Source/carrier. Attached to input bus 0 of the vocoder node. */
result = ma_audio_buffer_ref_init(device.capture.format, device.capture.channels, &g_sourceData);
result = ma_audio_buffer_ref_init(device.capture.format, device.capture.channels, NULL, 0, &g_sourceData);
if (result != MA_SUCCESS) {
printf("Failed to initialize audio buffer for source.");
goto done2;