From 67e2d5c28b8423c4f3f1d5b00f87325684158a6f Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Thu, 31 Aug 2023 15:09:15 +0100 Subject: Reimplement HardwareOpus --- src/audio_core/adsp/adsp.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/audio_core/adsp/adsp.cpp') diff --git a/src/audio_core/adsp/adsp.cpp b/src/audio_core/adsp/adsp.cpp index 0580990f5..6c53c98fd 100644 --- a/src/audio_core/adsp/adsp.cpp +++ b/src/audio_core/adsp/adsp.cpp @@ -7,12 +7,21 @@ namespace AudioCore::ADSP { ADSP::ADSP(Core::System& system, Sink::Sink& sink) { - audio_renderer = - std::make_unique(system, system.ApplicationMemory(), sink); + audio_renderer = std::make_unique(system, sink); + opus_decoder = std::make_unique(system); + opus_decoder->Send(Direction::DSP, OpusDecoder::Message::Start); + if (opus_decoder->Receive(Direction::Host) != OpusDecoder::Message::StartOK) { + LOG_ERROR(Service_Audio, "OpusDeocder failed to initialize."); + return; + } } AudioRenderer::AudioRenderer& ADSP::AudioRenderer() { return *audio_renderer.get(); } +OpusDecoder::OpusDecoder& ADSP::OpusDecoder() { + return *opus_decoder.get(); +} + } // namespace AudioCore::ADSP -- cgit v1.2.3