コード例 #1
0
ファイル: stsnd.c プロジェクト: chrisjubb/pinmame
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 {
  }
}
コード例 #2
0
ファイル: playsnd.c プロジェクト: chrisjubb/pinmame
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);
    }
  }
}
コード例 #3
0
ファイル: samples.c プロジェクト: kensan73/mame2003-libretro
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);
}
コード例 #4
0
ファイル: samples.c プロジェクト: neiderm/arcade
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);
}
コード例 #5
0
ファイル: gpsnd.c プロジェクト: mp-lee/pinmame
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 {
  }
}
コード例 #6
0
ファイル: stsnd.c プロジェクト: chrisjubb/pinmame
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);
}
コード例 #7
0
ファイル: stsnd.c プロジェクト: chrisjubb/pinmame
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");
   	}
}
コード例 #8
0
ファイル: votrax.c プロジェクト: cdrr/MAME_hack
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);
	}
}
コード例 #9
0
ファイル: atarisnd.c プロジェクト: Bremma/pinmame
static void stopSound(void) {
    if (mixer_is_sample_playing(atarilocals.channel))
        mixer_stop_sample(atarilocals.channel);
}
コード例 #10
0
ファイル: atarisnd.c プロジェクト: Bremma/pinmame
static void stopNoise(void) {
    if (mixer_is_sample_playing(atarilocals.noisechannel))
        mixer_stop_sample(atarilocals.noisechannel);
}
コード例 #11
0
ファイル: meadows.c プロジェクト: AlanApter/steamlink-sdk
void meadows_sh_stop(void)
{
	mixer_stop_sample(channel);
    mixer_stop_sample(channel+1);
}
コード例 #12
0
ファイル: targ.c プロジェクト: AlanApter/steamlink-sdk
void targ_sh_stop(void)
{
    mixer_stop_sample(tone_channel);
}
コード例 #13
0
ファイル: polyplay.c プロジェクト: Ezio-PS/mame2003-libretro
void polyplay_sh_stop(void)
{
	mixer_stop_sample(channellfo+0);
	mixer_stop_sample(channellfo+1);
}
コード例 #14
0
ファイル: gpsnd.c プロジェクト: mp-lee/pinmame
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");
        }