Browse Source

Merge pull request #1636 from ogniK5377/hwopus-bad-assert

Fixed incorrect hwopus assert
nce_cpp
bunnei 7 years ago
committed by GitHub
parent
commit
4a42f5f99c
  1. 2
      src/core/hle/service/audio/hwopus.cpp

2
src/core/hle/service/audio/hwopus.cpp

@ -161,7 +161,7 @@ void HwOpus::OpenOpusDecoder(Kernel::HLERequestContext& ctx) {
ASSERT_MSG(channel_count == 1 || channel_count == 2, "Invalid channel count"); ASSERT_MSG(channel_count == 1 || channel_count == 2, "Invalid channel count");
std::size_t worker_sz = WorkerBufferSize(channel_count); std::size_t worker_sz = WorkerBufferSize(channel_count);
ASSERT_MSG(buffer_sz < worker_sz, "Worker buffer too large");
ASSERT_MSG(buffer_sz >= worker_sz, "Worker buffer too large");
std::unique_ptr<OpusDecoder, OpusDeleter> decoder{ std::unique_ptr<OpusDecoder, OpusDeleter> decoder{
static_cast<OpusDecoder*>(operator new(worker_sz))}; static_cast<OpusDecoder*>(operator new(worker_sz))};
if (opus_decoder_init(decoder.get(), sample_rate, channel_count)) { if (opus_decoder_init(decoder.get(), sample_rate, channel_count)) {

Loading…
Cancel
Save