static void _stream_update(void *param/*, int interval*/) { y8950_state *info = (y8950_state *)param; //stream_update(info->stream); y8950_update_one(info->chip, DUMMYBUF, 0); }
//static STREAM_UPDATE( y8950_stream_update ) void y8950_stream_update(UINT8 ChipID, stream_sample_t **outputs, int samples) { //y8950_state *info = (y8950_state *)param; y8950_state *info = &Y8950Data[ChipID]; y8950_update_one(info->chip, outputs, samples); }
void Opl_Apu::run_until( blip_time_t end_time ) { if ( end_time > next_time ) { blip_time_t time_delta = end_time - next_time; blip_time_t time = next_time; unsigned count = time_delta / period_ + 1; switch (type_) { case type_opll: case type_msxmusic: case type_smsfmunit: case type_vrc7: { SAMP bufMO[ 1024 ]; SAMP bufRO[ 1024 ]; SAMP * buffers[2] = { bufMO, bufRO }; while ( count > 0 ) { unsigned todo = count; if ( todo > 1024 ) todo = 1024; ym2413_update_one( opl, buffers, todo ); if ( output_ ) { int last_amp = this->last_amp; for ( unsigned i = 0; i < todo; i++ ) { int amp = bufMO [i] + bufRO [i]; int delta = amp - last_amp; if ( delta ) { last_amp = amp; synth.offset_inline( time, delta, output_ ); } time += period_; } this->last_amp = last_amp; } else time += period_ * todo; count -= todo; } } break; case type_opl: case type_msxaudio: case type_opl2: { OPLSAMPLE buffer[ 1024 ]; while ( count > 0 ) { unsigned todo = count; if ( todo > 1024 ) todo = 1024; switch (type_) { case type_opl: ym3526_update_one( opl, buffer, todo ); break; case type_msxaudio: y8950_update_one( opl, buffer, todo ); break; case type_opl2: ym3812_update_one( opl, buffer, todo ); break; default: break; } if ( output_ ) { int last_amp = this->last_amp; for ( unsigned i = 0; i < todo; i++ ) { int amp = buffer [i]; int delta = amp - last_amp; if ( delta ) { last_amp = amp; synth.offset_inline( time, delta, output_ ); } time += period_; } this->last_amp = last_amp; } else time += period_ * todo; count -= todo; } } break; } next_time = time; } }
void y8950_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { y8950_update_one(m_chip, outputs[0], samples); }
static STREAM_UPDATE( y8950_stream_update ) { y8950_state *info = (y8950_state *)param; y8950_update_one(info->chip, outputs[0], samples); }