static void softreset (int param) { st300loc.reset = param; if (st300loc.reset) { // reset snddatst300.timer1 = st300loc.timlat1; snddatst300.timer2 = st300loc.timlat2; snddatst300.timer3 = st300loc.timlat3; st300loc.timp1 = 0; st300loc.timp2 = 0; st300loc.timp3 = 0; mixer_stop_sample(st300loc.channel); logerror ("Playsam Q2 off "); mixer_stop_sample(st300loc.channel+1); logerror ("Playsam Q1 off "); } else { } }
static void play2s_timer_callback(int n) { if (sndlocals.volume) { mixer_set_volume(sndlocals.channel, (--sndlocals.volume)); if (!sndlocals.volume) { timer_adjust(sndlocals.timer, TIME_NEVER, 0, 0); mixer_stop_sample(sndlocals.channel); } } }
void sample_stop(int channel) { if (Machine->sample_rate == 0) return; if (channel >= numchannels) { logerror("error: sample_stop() called with channel = %d, but only %d channels allocated\n",channel,numchannels); return; } mixer_stop_sample(channel + firstchannel); }
void sample_stop(int channel) { // GN // if (Machine->sample_rate == 0) return; if (g_Samplerate == 0) return; if (channel >= numchannels) { if (errorlog) fprintf(errorlog,"error: sample_stop() called with channel = %d, but only %d channels allocated\n",channel,numchannels); return; } mixer_stop_sample(channel + firstchannel); }
static void softreset (int param) { gps_locals.reset = param; if (gps_locals.reset) { // reset m6840d.timer1 = gps_locals.timlat1; m6840d.timer2 = gps_locals.timlat2; m6840d.timer3 = gps_locals.timlat3; gps_locals.timp1 = 0; gps_locals.timp2 = 0; gps_locals.timp3 = 0; mixer_stop_sample(gps_locals.channel); logerror ("Playsam Q1 off "); mixer_stop_sample(gps_locals.channel+1); logerror ("Playsam Q2 off "); mixer_stop_sample(gps_locals.channel+2); logerror ("Playsam Q3 off "); gps_locals.timlats1 = 0; gps_locals.timlats2 = 0; gps_locals.timlats3 = 0; } else { } }
static void st100_sh_stop(void) { mixer_stop_sample(st100loc.channel); mixer_stop_sample(st100loc.channel+1); mixer_stop_sample(st100loc.channel+2); mixer_stop_sample(st100loc.channel+3); mixer_stop_sample(st100loc.channel+4); mixer_stop_sample(st100loc.channel+5); }
static void playsamext(int param){ // external timer + volume from q3 int f; // f = (17-(st300loc.extfreq))*sizeof(sineWaveext); // Noise is not 100 % accurate, there is a wav file availiable from the author (solenoid 22 - 29) // formular for f not correct f = 625000 / (17-(st300loc.extfreq)); if (st300loc.noise) { // output is enabled... mixer_play_sample_16(st300loc.channel+2,sineWaveext, sizeof(sineWaveext), f , 1); logerror("*** playsam EXT noise frequenz %08d data %04d ***\n",f,st300loc.extfreq); } else { mixer_stop_sample(st300loc.channel+2); logerror("playsam EXT noise stop \n"); } }
void votrax_w(int data) { int Phoneme,Intonation; Phoneme = data & 0x3F; Intonation = data >> 6; if(errorlog) fprintf(errorlog,"Speech : %s at intonation %d\n",VotraxTable[Phoneme],Intonation); if(Phoneme==63) mixer_stop_sample(VotraxChannel); if(VotraxSamples->sample[Phoneme]) { mixer_set_volume(VotraxChannel,VotraxBaseVolume+(8*Intonation)*100/255); mixer_play_sample(VotraxChannel,VotraxSamples->sample[Phoneme]->data, VotraxSamples->sample[Phoneme]->length, VotraxBaseFrequency+(256*Intonation), 0); } }
static void stopSound(void) { if (mixer_is_sample_playing(atarilocals.channel)) mixer_stop_sample(atarilocals.channel); }
static void stopNoise(void) { if (mixer_is_sample_playing(atarilocals.noisechannel)) mixer_stop_sample(atarilocals.noisechannel); }
void meadows_sh_stop(void) { mixer_stop_sample(channel); mixer_stop_sample(channel+1); }
void targ_sh_stop(void) { mixer_stop_sample(tone_channel); }
void polyplay_sh_stop(void) { mixer_stop_sample(channellfo+0); mixer_stop_sample(channellfo+1); }
static WRITE_HANDLER(m6840_w ) { int w; long int w1; // logerror("M6840: offset %d = %02x\n", offset, data); m6840d.ax[offset]=data; if (offset == 3) { gps_locals.timlat1 = m6840d.ax[offset] + m6840d.ax[(offset-1)] * 256; m6840d.timer1 = gps_locals.timlat1; w1 = MSU1_INTCLOCK / (2 * (m6840d.timer1 + 1)); gps_locals.tfre1 = w1; logerror("%04x: m6840_w timlat1 loaded %04x freq %04d \n", activecpu_get_previouspc(), gps_locals.timlat1,gps_locals.tfre1); if (gps_locals.timlat1 == 0) { gps_locals.timlats1 = 0; mixer_stop_sample(gps_locals.channel); logerror ("Playsam Q1 off\n"); } } if (offset == 5) { gps_locals.timlat2 = m6840d.ax[offset] + m6840d.ax[(offset-1)] * 256; m6840d.timer2 = gps_locals.timlat2; gps_locals.tfre2 = MSU1_INTCLOCK / (2 * (m6840d.timer2 + 1)); logerror("%04x: m6840_w timlat2 loaded %04x freq %04d \n", activecpu_get_previouspc(), gps_locals.timlat2,gps_locals.tfre2); if (gps_locals.timlat2 == 0) { gps_locals.timlats2 = 0; mixer_stop_sample(gps_locals.channel+1); logerror ("Playsam Q2 off\n"); } } if (offset == 7) { gps_locals.timlat3 = m6840d.ax[offset] + m6840d.ax[(offset-1)] * 256; m6840d.timer3 = gps_locals.timlat3; gps_locals.tfre3 = (MSU1_INTCLOCK / (2 * (m6840d.timer3 + 1))); logerror("%04x: m6840_w timlat3 loaded %04x freq %04d \n", activecpu_get_previouspc(), gps_locals.timlat3,gps_locals.tfre3); if (gps_locals.timlat3 == 0) { mixer_stop_sample(gps_locals.channel+2); gps_locals.timlats3 = 0; logerror ("Playsam Q3 off\n"); } } if (offset == 1) { gps_locals.cr2= m6840d.ax[offset]; logerror("%04x: m6840_w CR2 %02x ", activecpu_get_previouspc(), gps_locals.cr2); if ((gps_locals.cr2 & 0x80) == 0) { } if (gps_locals.cr2 & 0x80) { logerror ("Output enabl "); if (gps_locals.timlat2 != gps_locals.timlats2) { playsam2(0); gps_locals.timlats2 = gps_locals.timlat2; } } else { // logerror ("Output OFF "); logerror ("PlaysamQ2off "); gps_locals.timlats2 = 0; mixer_stop_sample(gps_locals.channel+1); } if (gps_locals.cr2 & 0x40) { logerror ("Inter ENABLE "); } else { logerror ("Inter off "); } w = (gps_locals.cr2 & 0x38) >> 3; logerror ("Mode (N 2) %01x ",w); if (gps_locals.cr2 & 0x04) { logerror ("count d 8 "); } else { logerror ("count 16 "); } if (gps_locals.cr2 & 0x02) { logerror ("int clock "); } else { logerror ("ext clock "); } logerror ("\n"); }