Browse Source

dont forget isvalid2

lizzie/unity-build
lizzie 2 weeks ago
parent
commit
860db04e85
  1. 4
      src/audio_core/adsp/apps/opus/opus_decoder.cpp

4
src/audio_core/adsp/apps/opus/opus_decoder.cpp

@ -82,7 +82,7 @@ void OpusDecoder::Init(std::stop_token rc_stop_token) {
case GetWorkBufferSize: { case GetWorkBufferSize: {
auto channel_count = static_cast<s32>(shared_memory->host_send_data[0]); auto channel_count = static_cast<s32>(shared_memory->host_send_data[0]);
ASSERT(IsValidChannelCount(channel_count));
ASSERT(channel_count == 1 || channel_count == 2);
shared_memory->dsp_return_data[0] = OpusDecodeObject::GetWorkBufferSize(channel_count); shared_memory->dsp_return_data[0] = OpusDecodeObject::GetWorkBufferSize(channel_count);
Send(Direction::Host, Message::GetWorkBufferSizeOK); Send(Direction::Host, Message::GetWorkBufferSizeOK);
@ -95,7 +95,7 @@ void OpusDecoder::Init(std::stop_token rc_stop_token) {
auto channel_count = static_cast<s32>(shared_memory->host_send_data[3]); auto channel_count = static_cast<s32>(shared_memory->host_send_data[3]);
ASSERT(sample_rate >= 0); ASSERT(sample_rate >= 0);
ASSERT(IsValidChannelCount(channel_count));
ASSERT(channel_count == 1 || channel_count == 2);
ASSERT(buffer_size >= OpusDecodeObject::GetWorkBufferSize(channel_count)); ASSERT(buffer_size >= OpusDecodeObject::GetWorkBufferSize(channel_count));
auto& decoder_object = OpusDecodeObject::Initialize(buffer, buffer); auto& decoder_object = OpusDecodeObject::Initialize(buffer, buffer);

Loading…
Cancel
Save