dont forget isvalid2

This commit is contained in:
lizzie 2026-05-26 22:07:25 +00:00
parent bebffdad27
commit 76b52b033f

View file

@ -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);