From 5ee0cea672054e14a1924d98d95adc8b11cf688d Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 28 Jan 2017 02:42:31 +0300 Subject: [PATCH] cellAudio fix --- rpcs3/Emu/Cell/Modules/cellAudio.cpp | 7 ------- rpcs3/Emu/Cell/Modules/cellAudio.h | 12 +++++++++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellAudio.cpp b/rpcs3/Emu/Cell/Modules/cellAudio.cpp index 193d9c003d..f2aeac0bb4 100644 --- a/rpcs3/Emu/Cell/Modules/cellAudio.cpp +++ b/rpcs3/Emu/Cell/Modules/cellAudio.cpp @@ -18,13 +18,6 @@ cfg::bool_entry g_cfg_audio_convert_to_u16(cfg::root.audio, "Convert to 16 bit") void audio_config::on_task() { - for (u32 i = 0; i < AUDIO_PORT_COUNT; i++) - { - ports[i].number = i; - ports[i].addr = m_buffer + AUDIO_PORT_OFFSET * i; - ports[i].index = m_indexes + i; - } - AudioDumper m_dump(g_cfg_audio_dump_to_file ? 2 : 0); // Init AudioDumper for 2 channels if enabled float buf2ch[2 * BUFFER_SIZE]{}; // intermediate buffer for 2 channels diff --git a/rpcs3/Emu/Cell/Modules/cellAudio.h b/rpcs3/Emu/Cell/Modules/cellAudio.h index e64a65f9ca..c916e70c63 100644 --- a/rpcs3/Emu/Cell/Modules/cellAudio.h +++ b/rpcs3/Emu/Cell/Modules/cellAudio.h @@ -137,7 +137,17 @@ public: std::vector keys; - ~audio_config() noexcept = default; + audio_config() + { + for (u32 i = 0; i < AUDIO_PORT_COUNT; i++) + { + ports[i].number = i; + ports[i].addr = m_buffer + AUDIO_PORT_OFFSET * i; + ports[i].index = m_indexes + i; + } + } + + ~audio_config() = default; audio_port* open_port() {