Commit ab20c9e6 authored by David Reid's avatar David Reid

Fix a bug introduced with a recent commit.

parent 772e75fe
...@@ -58945,6 +58945,7 @@ static ma_result ma_resource_manager_data_buffer_node_acquire(ma_resource_manage ...@@ -58945,6 +58945,7 @@ static ma_result ma_resource_manager_data_buffer_node_acquire(ma_resource_manage
if (result == MA_ALREADY_EXISTS) { if (result == MA_ALREADY_EXISTS) {
nodeAlreadyExists = MA_TRUE; nodeAlreadyExists = MA_TRUE;
result = MA_SUCCESS;
} else { } else {
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
return result; return result;
...@@ -52,7 +52,8 @@ int main(int argc, char** argv) ...@@ -52,7 +52,8 @@ int main(int argc, char** argv)
//resourceManagerConfig.decodedChannels = 2; //resourceManagerConfig.decodedChannels = 2;
resourceManagerConfig.decodedSampleRate = 48000; resourceManagerConfig.decodedSampleRate = 48000;
//resourceManagerConfig.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING; //resourceManagerConfig.flags |= MA_RESOURCE_MANAGER_FLAG_NO_THREADING;
resourceManagerConfig.jobThreadCount = 1; resourceManagerConfig.jobThreadCount = 16;
resourceManagerConfig.jobQueueCapacity = 8;
result = ma_resource_manager_init(&resourceManagerConfig, &resourceManager); result = ma_resource_manager_init(&resourceManagerConfig, &resourceManager);
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
printf("Failed to initialize resource manager.\n"); printf("Failed to initialize resource manager.\n");
...@@ -79,7 +80,7 @@ int main(int argc, char** argv) ...@@ -79,7 +80,7 @@ int main(int argc, char** argv)
loadNotification.cb.onSignal = on_sound_loaded; loadNotification.cb.onSignal = on_sound_loaded;
loadNotification.pSound = &sound; loadNotification.pSound = &sound;
result = ma_sound_init_from_file(&engine, argv[1], MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM, &group, NULL, &sound); result = ma_sound_init_from_file(&engine, argv[1], MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_DECODE | MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_ASYNC /*| MA_RESOURCE_MANAGER_DATA_SOURCE_FLAG_STREAM*/, &group, NULL, &sound);
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
printf("Failed to load sound: %s\n", argv[1]); printf("Failed to load sound: %s\n", argv[1]);
ma_engine_uninit(&engine); ma_engine_uninit(&engine);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment