Fix the C++ build for some examples.

This commit is contained in:
David Reid
2025-02-19 08:28:01 +10:00
parent d3a4b9cf20
commit eee86a0ae1
3 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -135,15 +135,15 @@ int main(int argc, char** argv)
deviceConfig.dataCallback = data_callback;
deviceConfig.pUserData = NULL;
if (ma_device_init(NULL, &deviceConfig, &device) != MA_SUCCESS) {
result = ma_device_init(NULL, &deviceConfig, &device);
if (result != MA_SUCCESS) {
printf("Failed to open playback device.\n");
result = -1;
goto done_decoders;
}
if (ma_device_start(&device) != MA_SUCCESS) {
result = ma_device_start(&device);
if (result != MA_SUCCESS) {
printf("Failed to start playback device.\n");
result = -1;
goto done;
}