예제 #1
0
void Mixer_Channel_Pan(void* channel, float pan)
{
	if (gOpenRCT2Headless) return;

	gMixer.Lock();
	((Channel*)channel)->SetPan(pan);
	gMixer.Unlock();
}
예제 #2
0
void Mixer_Channel_Rate(void* channel, double rate)
{
	if (gOpenRCT2Headless) return;

	gMixer.Lock();
	((Channel*)channel)->SetRate(rate);
	gMixer.Unlock();
}
예제 #3
0
void Mixer_Channel_Volume(void* channel, int volume)
{
	if (gOpenRCT2Headless) return;

	gMixer.Lock();
	((Channel*)channel)->SetVolume(volume);
	gMixer.Unlock();
}
예제 #4
0
void* Mixer_Play_Effect(int id, int loop, int volume, float pan, double rate, int deleteondone)
{
	if (id >= SOUND_MAXID) {
		return 0;
	}
	gMixer.Lock();
	Channel* channel = gMixer.Play(gMixer.css1streams[id], loop, deleteondone != 0);
	if (channel) {
		channel->SetVolume(volume);
		channel->SetPan(pan);
		channel->SetRate(rate);
	}
	gMixer.Unlock();
	return channel;
}
예제 #5
0
void* Mixer_Play_Effect(int id, int loop, int volume, float pan, double rate, int deleteondone)
{
    if (gOpenRCT2Headless) return 0;

    if (!gConfigSound.sound) {
        return 0;
    }
    if (id >= countof(gMixer.css1sources)) {
        return 0;
    }
    gMixer.Lock();
    Channel* channel = gMixer.Play(*gMixer.css1sources[id], loop, deleteondone != 0, false);
    if (channel) {
        channel->SetVolume(volume);
        channel->SetPan(pan);
        channel->SetRate(rate);
    }
    gMixer.Unlock();
    return channel;
}
예제 #6
0
void* Mixer_Play_Effect(size_t id, int loop, int volume, float pan, double rate, int deleteondone)
{
	if (gOpenRCT2Headless) return 0;

	if (!gConfigSound.sound_enabled) {
		return 0;
	}
	if (id >= Util::CountOf(gMixer.css1sources)) {
		log_error("Tried to play an invalid sound id. %i", id);
		return 0;
	}
	gMixer.Lock();
	Channel* channel = gMixer.Play(*gMixer.css1sources[id], loop, deleteondone != 0, false);
	if (channel) {
		channel->SetVolume(volume);
		channel->SetPan(pan);
		channel->SetRate(rate);
	}
	gMixer.Unlock();
	return channel;
}
예제 #7
0
void Mixer_Channel_Rate(void* channel, double rate)
{
	gMixer.Lock();
	((Channel*)channel)->SetRate(rate);
	gMixer.Unlock();
}
예제 #8
0
void Mixer_Channel_Pan(void* channel, float pan)
{
	gMixer.Lock();
	((Channel*)channel)->SetPan(pan);
	gMixer.Unlock();
}
예제 #9
0
void Mixer_Channel_Volume(void* channel, int volume)
{
	gMixer.Lock();
	((Channel*)channel)->SetVolume(volume);
	gMixer.Unlock();
}