Commit 9ed296b3 authored by David Reid's avatar David Reid

Fix a bug where custom decoding backends aren't being used.

parent 52f471ae
...@@ -7045,7 +7045,10 @@ static ma_result ma_resource_manager_data_buffer_init_connector(ma_resource_mana ...@@ -7045,7 +7045,10 @@ static ma_result ma_resource_manager_data_buffer_init_connector(ma_resource_mana
{ {
ma_decoder_config configOut; ma_decoder_config configOut;
configOut = ma_decoder_config_init(pDataBuffer->pResourceManager->config.decodedFormat, pDataBuffer->pResourceManager->config.decodedChannels, pDataBuffer->pResourceManager->config.decodedSampleRate); configOut = ma_decoder_config_init(pDataBuffer->pResourceManager->config.decodedFormat, pDataBuffer->pResourceManager->config.decodedChannels, pDataBuffer->pResourceManager->config.decodedSampleRate);
configOut.allocationCallbacks = pDataBuffer->pResourceManager->config.allocationCallbacks; configOut.allocationCallbacks = pDataBuffer->pResourceManager->config.allocationCallbacks;
configOut.ppCustomBackendVTables = pDataBuffer->pResourceManager->config.ppCustomDecodingBackendVTables;
configOut.customBackendVTableCount = pDataBuffer->pResourceManager->config.customDecodingBackendVTableCount;
configOut.pCustomBackendUserData = pDataBuffer->pResourceManager->config.pCustomDecodingBackendUserData;
result = ma_decoder_init_memory(pDataBuffer->pNode->data.encoded.pData, pDataBuffer->pNode->data.encoded.sizeInBytes, &configOut, &pDataBuffer->connector.decoder); result = ma_decoder_init_memory(pDataBuffer->pNode->data.encoded.pData, pDataBuffer->pNode->data.encoded.sizeInBytes, &configOut, &pDataBuffer->connector.decoder);
} break; } break;
...@@ -12508,6 +12511,10 @@ MA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePa ...@@ -12508,6 +12511,10 @@ MA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePa
} }
ma_mutex_unlock(&pEngine->inlinedSoundLock); ma_mutex_unlock(&pEngine->inlinedSoundLock);
if (result != MA_SUCCESS) {
return result;
}
/* Finally we can start playing the sound. */ /* Finally we can start playing the sound. */
result = ma_sound_start(&pSound->sound); result = ma_sound_start(&pSound->sound);
if (result != MA_SUCCESS) { if (result != MA_SUCCESS) {
......
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