mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-16 01:35:07 +00:00
OPN: per-channel oscilloscope
This commit is contained in:
parent
6288b485fc
commit
297ab01d4c
2 changed files with 10 additions and 23 deletions
|
@ -465,6 +465,8 @@ public:
|
||||||
// generate one sample of sound
|
// generate one sample of sound
|
||||||
void generate(output_data *output, uint32_t numsamples = 1);
|
void generate(output_data *output, uint32_t numsamples = 1);
|
||||||
|
|
||||||
|
fm_engine* debug_fm_engine() { return &m_fm; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// internal helpers
|
// internal helpers
|
||||||
void update_prescale(uint8_t prescale);
|
void update_prescale(uint8_t prescale);
|
||||||
|
|
|
@ -284,19 +284,12 @@ const char* DivPlatformYM2203::getEffectName(unsigned char effect) {
|
||||||
void DivPlatformYM2203::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
void DivPlatformYM2203::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||||
static int os;
|
static int os;
|
||||||
|
|
||||||
/*ymfm::ym2612::fm_engine* fme=fm->debug_fm_engine();
|
ymfm::ym2203::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();
|
|
||||||
ymfm::adpcm_b_engine* abe=fm->debug_adpcm_b_engine();
|
|
||||||
|
|
||||||
ymfm::ssg_engine::output_data ssgOut;
|
ymfm::fm_channel<ymfm::opn_registers_base<false>>* fmChan[3];
|
||||||
|
for (int i=0; i<3; i++) {
|
||||||
ymfm::fm_channel<ymfm::opn_registers_base<true>>* fmChan[6];
|
|
||||||
ymfm::adpcm_a_channel* adpcmAChan[6];
|
|
||||||
for (int i=0; i<6; i++) {
|
|
||||||
fmChan[i]=fme->debug_channel(i);
|
fmChan[i]=fme->debug_channel(i);
|
||||||
adpcmAChan[i]=aae->debug_channel(i);
|
}
|
||||||
}*/
|
|
||||||
|
|
||||||
for (size_t h=start; h<start+len; h++) {
|
for (size_t h=start; h<start+len; h++) {
|
||||||
os=0;
|
os=0;
|
||||||
|
@ -319,22 +312,14 @@ void DivPlatformYM2203::acquire(short* bufL, short* bufR, size_t start, size_t l
|
||||||
|
|
||||||
bufL[h]=os;
|
bufL[h]=os;
|
||||||
|
|
||||||
/*
|
|
||||||
for (int i=0; i<6; i++) {
|
for (int i=0; i<3; i++) {
|
||||||
oscBuf[i]->data[oscBuf[i]->needle++]=(fmChan[i]->debug_output(0)+fmChan[i]->debug_output(1));
|
oscBuf[i]->data[oscBuf[i]->needle++]=(fmChan[i]->debug_output(0)+fmChan[i]->debug_output(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
ssge->get_last_out(ssgOut);
|
for (int i=3; i<6; i++) {
|
||||||
for (int i=6; i<9; i++) {
|
oscBuf[i]->data[oscBuf[i]->needle++]=fmout.data[i-2];
|
||||||
oscBuf[i]->data[oscBuf[i]->needle++]=ssgOut.data[i-6];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=9; i<15; i++) {
|
|
||||||
oscBuf[i]->data[oscBuf[i]->needle++]=adpcmAChan[i-9]->get_last_out(0)+adpcmAChan[i-9]->get_last_out(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
oscBuf[15]->data[oscBuf[15]->needle++]=abe->get_last_out(0)+abe->get_last_out(1);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue