Ejemplo n.º 1
0
static STREAM_UPDATE( s14001a_pcm_update )
{
	INT32 mix[48000];
	//INT32 *mixp;
	S14001AChip *chip = (S14001AChip *)param;
	int i;

	memset(mix, 0, sizeof(mix));

	//mixp = &mix[0];
	for (i = 0; i < samples; i++)
	{
		s14001a_clock(chip);
#ifdef ACCURATE_SQUEAL
		if (chip->audioout == ALTFLAG) // input from test pins -> output
		{
			shiftIntoFilter(chip, audiofilter(chip)); // shift over the previous outputs and stick in audioout.
			outputs[0][i] = audiofilter(chip)*chip->VSU1000_amp;
		}
		else // normal, dac-driven output
		{
			shiftIntoFilter(chip, ((((INT16)chip->audioout)-8)<<9)); // shift over the previous outputs and stick in audioout 4 times. note <<9 instead of <<10, to prevent clipping, and to simulate that the filtered output normally has a somewhat lower amplitude than the driven one.
#endif
			outputs[0][i] = ((((INT16)chip->audioout)-8)<<10)*chip->VSU1000_amp;
#ifdef ACCURATE_SQUEAL
		}
#endif
	}
}
Ejemplo n.º 2
0
static void s14001a_update(int ch, INT16 *buffer, int length)
{
	int i;

	for (i = 0; i < length; i++)
	{
		if (--VSU1000_counter <= 0) {
		  s14001a_clock();
		  VSU1000_counter = VSU1000_freq;
		}
#ifdef PINMAME
		buffer[i] = ((((INT16)audioout)-128)*36)*((21 + 2 * VSU1000_amp) / 5);
#else
		buffer[i] = ((((INT16)audioout)-128)*36)*VSU1000_amp;
#endif
	}
}
Ejemplo n.º 3
0
void s14001a_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
	int i;

	for (i = 0; i < samples; i++)
		{
			s14001a_clock();
	#ifdef ACCURATE_SQUEAL
		if (m_audioout == ALTFLAG) // input from test pins -> output
			{
				shiftIntoFilter(chip, audiofilter(chip)); // shift over the previous outputs and stick in audioout.
				outputs[0][i] = audiofilter(chip)*m_VSU1000_amp;
			}
		else // normal, dac-driven output
			{
				shiftIntoFilter(chip, ((((INT16)m_audioout)-8)<<9)); // shift over the previous outputs and stick in audioout 4 times. note <<9 instead of <<10, to prevent clipping, and to simulate that the filtered output normally has a somewhat lower amplitude than the driven one.
	#endif
				outputs[0][i] = ((((INT16)m_audioout)-8)<<10)*m_VSU1000_amp;
	#ifdef ACCURATE_SQUEAL
			}
	#endif
		}
}