void Mixer_Channel_Pan(void* channel, float pan) { if (gOpenRCT2Headless) return; gMixer.Lock(); ((Channel*)channel)->SetPan(pan); gMixer.Unlock(); }
void Mixer_Channel_Rate(void* channel, double rate) { if (gOpenRCT2Headless) return; gMixer.Lock(); ((Channel*)channel)->SetRate(rate); gMixer.Unlock(); }
void Mixer_Channel_Volume(void* channel, int volume) { if (gOpenRCT2Headless) return; gMixer.Lock(); ((Channel*)channel)->SetVolume(volume); gMixer.Unlock(); }
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; }
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; }
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; }
void Mixer_Channel_Rate(void* channel, double rate) { gMixer.Lock(); ((Channel*)channel)->SetRate(rate); gMixer.Unlock(); }
void Mixer_Channel_Pan(void* channel, float pan) { gMixer.Lock(); ((Channel*)channel)->SetPan(pan); gMixer.Unlock(); }
void Mixer_Channel_Volume(void* channel, int volume) { gMixer.Lock(); ((Channel*)channel)->SetVolume(volume); gMixer.Unlock(); }