diff --git a/src/xenia/apu/audio_system.cc b/src/xenia/apu/audio_system.cc index 7379a8f30..51e47dbb4 100644 --- a/src/xenia/apu/audio_system.cc +++ b/src/xenia/apu/audio_system.cc @@ -302,7 +302,9 @@ X_STATUS AudioSystem::RegisterClient(uint32_t callback, uint32_t callback_arg, auto index = unused_clients_.front(); auto client_semaphore = client_semaphores_[index]; - assert_true(ReleaseSemaphore(client_semaphore, kMaximumQueuedFrames, NULL) == TRUE); + BOOL ret = ReleaseSemaphore(client_semaphore, kMaximumQueuedFrames, NULL); + assert_true(ret == TRUE); + AudioDriver* driver; auto result = CreateDriver(index, client_semaphore, &driver); if (XFAILED(result)) { @@ -511,6 +513,7 @@ int AudioSystem::PrepareXMAPacket(XMAContext &context, XMAContextData &data) { // Still have data to read. auto packet = input_buffer + input_offset_bytes; + assert_true(input_offset_bytes % 2048 == 0); context.decoder->PreparePacket(packet, seq_offset_bytes, XMAContextData::kBytesPerPacket, sample_rate, channels); diff --git a/src/xenia/apu/xaudio2/xaudio2_audio_driver.cc b/src/xenia/apu/xaudio2/xaudio2_audio_driver.cc index 11bee294a..eb3a7c3de 100644 --- a/src/xenia/apu/xaudio2/xaudio2_audio_driver.cc +++ b/src/xenia/apu/xaudio2/xaudio2_audio_driver.cc @@ -26,7 +26,10 @@ class XAudio2AudioDriver::VoiceCallback : public IXAudio2VoiceCallback { void OnStreamEnd() {} void OnVoiceProcessingPassEnd() {} void OnVoiceProcessingPassStart(uint32_t samples_required) {} - void OnBufferEnd(void* context) { assert_true(ReleaseSemaphore(semaphore_, 1, NULL) == TRUE); } + void OnBufferEnd(void* context) { + BOOL ret = ReleaseSemaphore(semaphore_, 1, NULL); + assert_true(ret == TRUE); + } void OnBufferStart(void* context) {} void OnLoopEnd(void* context) {} void OnVoiceError(void* context, HRESULT result) {}