コード例 #1
0
ファイル: sound.c プロジェクト: DarrenBranford/MAME4iOS
void sound_set_output_gain(device_t *device, int output, float gain)
{
	sound_stream *stream;
	int outputnum;

	if (stream_device_output_to_stream_output(device, output, &stream, &outputnum))
		stream_set_output_gain(stream, outputnum, gain);
}
コード例 #2
0
ファイル: ay8910.c プロジェクト: cdenix/ps3-mame-0125
void ay8910_set_volume(int chip,int channel,int volume)
{
	ay8910_context *psg = sndti_token(SOUND_AY8910, chip);
	int ch;

	for (ch = 0; ch < psg->streams; ch++)
		if (channel == ch || psg->streams == 1 || channel == ALL_8910_CHANNELS)
			stream_set_output_gain(psg->channel, ch, volume / 100.0);
}
コード例 #3
0
ファイル: ay8910.c プロジェクト: broftkd/historic-mess
void AY8910_set_volume(int chip,int channel,int volume)
{
	struct AY8910 *PSG = sndti_token(SOUND_AY8910, chip);
	int ch;

	for (ch = 0; ch < PSG->streams; ch++)
		if (channel == ch || PSG->streams == 1 || channel == ALL_8910_CHANNELS)
			stream_set_output_gain(PSG->Channel, ch, volume / 100.0);
}
コード例 #4
0
ファイル: samples.c プロジェクト: Paulodx/sdl-mame-wii
void sample_set_volume(const device_config *device,int channel,float volume)
{
    samples_info *info = get_safe_token(device);
    sample_channel *chan;

    assert( channel < info->numchannels );

    chan = &info->channel[channel];

	stream_set_output_gain(chan->stream, 0, volume);
}
コード例 #5
0
void sample_set_volume_n(int num,int channel,float volume)
{
    struct samples_info *info = sndti_token(SOUND_SAMPLES, num);
    struct sample_channel *chan;

    assert( channel < info->numchannels );

    chan = &info->channel[channel];

	stream_set_output_gain(chan->stream, 0, volume);
}
コード例 #6
0
ファイル: sound.c プロジェクト: broftkd/historic-mame
void sndti_set_output_gain(sound_type type, int index, int output, float gain)
{
	int sndnum = sndti_to_sndnum(type, index);

	if (sndnum < 0)
	{
		logerror("sndti_set_output_gain called for invalid sound type %d, index %d\n", type, index);
		return;
	}
	if (output >= sound[sndnum].outputs)
	{
		logerror("sndti_set_output_gain called for invalid sound output %d (type %d, index %d)\n", output, type, index);
		return;
	}
	stream_set_output_gain(sound[sndnum].output[output].stream, sound[sndnum].output[output].output, gain);
}
コード例 #7
0
void MSM5205_set_volume(int num,int volume)
{
	struct MSM5205Voice *voice = sndti_token(SOUND_MSM5205, num);

	stream_set_output_gain(voice->stream,0,volume / 100.0);
}
コード例 #8
0
ファイル: msm5205.c プロジェクト: DarrenBranford/MAME4iOS
void msm5205_set_volume(running_device *device,int volume)
{
	msm5205_state *voice = get_safe_token(device);

	stream_set_output_gain(voice->stream,0,volume / 100.0);
}