From 06e00ab17b661312577be5a2368203c213699a54 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 14 May 2022 01:07:32 -0500 Subject: [PATCH] OPNA: per-channel oscilloscope --- src/engine/platform/sound/ymfm/ymfm_opn.h | 6 ++++++ src/engine/platform/ym2608.cpp | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/engine/platform/sound/ymfm/ymfm_opn.h b/src/engine/platform/sound/ymfm/ymfm_opn.h index 1b47885b..7fc76dac 100644 --- a/src/engine/platform/sound/ymfm/ymfm_opn.h +++ b/src/engine/platform/sound/ymfm/ymfm_opn.h @@ -546,6 +546,12 @@ public: // generate one sample of sound void generate(output_data *output, uint32_t numsamples = 1); + // get the engine + fm_engine* debug_fm_engine() { return &m_fm; } + ssg_engine* debug_ssg_engine() { return &m_ssg; } + adpcm_a_engine* debug_adpcm_a_engine() { return &m_adpcm_a; } + adpcm_b_engine* debug_adpcm_b_engine() { return &m_adpcm_b; } + protected: // internal helpers void update_prescale(uint8_t prescale); diff --git a/src/engine/platform/ym2608.cpp b/src/engine/platform/ym2608.cpp index 5e058dab..4f05fc01 100644 --- a/src/engine/platform/ym2608.cpp +++ b/src/engine/platform/ym2608.cpp @@ -428,7 +428,6 @@ double DivPlatformYM2608::NOTE_ADPCMB(int note) { void DivPlatformYM2608::acquire(short* bufL, short* bufR, size_t start, size_t len) { static int os[2]; - /* ymfm::ym2612::fm_engine* fme=fm->debug_fm_engine(); ymfm::ssg_engine* ssge=fm->debug_ssg_engine(); ymfm::adpcm_a_engine* aae=fm->debug_adpcm_a_engine(); @@ -442,7 +441,6 @@ void DivPlatformYM2608::acquire(short* bufL, short* bufR, size_t start, size_t l fmChan[i]=fme->debug_channel(i); adpcmAChan[i]=aae->debug_channel(i); } - */ for (size_t h=start; hdata[oscBuf[i]->needle++]=(fmChan[i]->debug_output(0)+fmChan[i]->debug_output(1)); } @@ -485,7 +482,6 @@ void DivPlatformYM2608::acquire(short* bufL, short* bufR, size_t start, size_t l } oscBuf[15]->data[oscBuf[15]->needle++]=abe->get_last_out(0)+abe->get_last_out(1); - */ } }