void ym2610_device::device_start() { ay8910_device::device_start(); int rate = clock()/72; void *pcmbufa,*pcmbufb; int pcmsizea,pcmsizeb; std::string name(tag()); m_irq_handler.resolve(); /* Timer Handler set */ m_timer[0] = timer_alloc(0); m_timer[1] = timer_alloc(1); /* stream system initialize */ m_stream = machine().sound().stream_alloc(*this,0,2,rate, stream_update_delegate(FUNC(ym2610_device::stream_generate),this)); /* setup adpcm buffers */ pcmbufa = region()->base(); pcmsizea = region()->bytes(); name.append(".deltat"); pcmbufb = (void *)(machine().root_device().memregion(name.c_str())->base()); pcmsizeb = machine().root_device().memregion(name.c_str())->bytes(); if (pcmbufb == NULL || pcmsizeb == 0) { pcmbufb = pcmbufa; pcmsizeb = pcmsizea; } /**** initialize YM2610 ****/ m_chip = ym2610_init(this,this,clock(),rate, pcmbufa,pcmsizea,pcmbufb,pcmsizeb, timer_handler,IRQHandler,&psgintf); assert_always(m_chip != NULL, "Error creating YM2610 chip"); }
void ym2608_device::device_start() { ay8910_device::device_start(); int rate = clock()/72; void *pcmbufa; int pcmsizea; m_irq_handler.resolve(); /* Timer Handler set */ m_timer[0] = timer_alloc(0); m_timer[1] = timer_alloc(1); /* stream system initialize */ m_stream = machine().sound().stream_alloc(*this,0,2,rate, stream_update_delegate(FUNC(ym2608_device::stream_generate),this)); /* setup adpcm buffers */ pcmbufa = region()->base(); pcmsizea = region()->bytes(); /* initialize YM2608 */ m_chip = ym2608_init(this,this,clock(),rate, pcmbufa,pcmsizea, timer_handler,IRQHandler,&psgintf); assert_always(m_chip != NULL, "Error creating YM2608 chip"); }
void ym2203_device::calculate_rates() { int rate = clock()/72; /* ??? */ if (m_stream != nullptr) m_stream->set_sample_rate(rate); else m_stream = machine().sound().stream_alloc(*this,0,1,rate, stream_update_delegate(&ym2203_device::stream_generate,this)); }
void ym2203_device::device_start() { ay8910_device::device_start(); int rate = clock()/72; /* ??? */ m_irq_handler.resolve(); /* Timer Handler set */ m_timer[0] = timer_alloc(0); m_timer[1] = timer_alloc(1); /* stream system initialize */ m_stream = machine().sound().stream_alloc(*this,0,1,rate, stream_update_delegate(FUNC(ym2203_device::stream_generate),this)); /* Initialize FM emurator */ m_chip = ym2203_init(this,this,clock(),rate,timer_handler,IRQHandler,&psgintf); assert_always(m_chip != nullptr, "Error creating YM2203 chip"); }