From 06316be8a78954c8ce2f052dfe104a6a8b7af694 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Sat, 5 Jan 2019 21:05:12 -0700 Subject: [PATCH] audio_core: hle: mf: minor fix --- src/audio_core/hle/wmf_decoder.cpp | 3 ++- src/tests/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/audio_core/hle/wmf_decoder.cpp b/src/audio_core/hle/wmf_decoder.cpp index 5dd28b7b5a..1a6e147ee3 100644 --- a/src/audio_core/hle/wmf_decoder.cpp +++ b/src/audio_core/hle/wmf_decoder.cpp @@ -185,6 +185,8 @@ std::optional WMFDecoder::Impl::Decode(const BinaryRequest& requ return response; } + response.num_channels = adts_header.channels; + if (!selected) { LOG_DEBUG(Audio_DSP, "New ADTS stream: channels = {}, sample rate = {}", adts_header.channels, adts_header.samplerate); @@ -240,7 +242,6 @@ std::optional WMFDecoder::Impl::Decode(const BinaryRequest& requ out_streams[1].data(), out_streams[1].size()); } - response.num_channels = adts_header.channels; return response; } diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index b6af208864..c6b222ef07 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -9,6 +9,7 @@ add_executable(tests core/hle/kernel/hle_ipc.cpp core/memory/memory.cpp core/memory/vm_manager.cpp + audio_core/audio_fixures.h audio_core/decoder_tests.cpp tests.cpp )