本文整理汇总了C++中Mixer::Unlock方法的典型用法代码示例。如果您正苦于以下问题:C++ Mixer::Unlock方法的具体用法?C++ Mixer::Unlock怎么用?C++ Mixer::Unlock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mixer
的用法示例。
在下文中一共展示了Mixer::Unlock方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Mixer_Channel_Pan
void Mixer_Channel_Pan(void* channel, float pan)
{
if (gOpenRCT2Headless) return;
gMixer.Lock();
((Channel*)channel)->SetPan(pan);
gMixer.Unlock();
}
示例2: Mixer_Channel_Rate
void Mixer_Channel_Rate(void* channel, double rate)
{
if (gOpenRCT2Headless) return;
gMixer.Lock();
((Channel*)channel)->SetRate(rate);
gMixer.Unlock();
}
示例3: Mixer_Channel_Volume
void Mixer_Channel_Volume(void* channel, int volume)
{
if (gOpenRCT2Headless) return;
gMixer.Lock();
((Channel*)channel)->SetVolume(volume);
gMixer.Unlock();
}
示例4: Mixer_Play_Effect
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: Mixer_Play_Effect
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: Mixer_Play_Effect
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: Mixer_Channel_Rate
void Mixer_Channel_Rate(void* channel, double rate)
{
gMixer.Lock();
((Channel*)channel)->SetRate(rate);
gMixer.Unlock();
}
示例8: Mixer_Channel_Pan
void Mixer_Channel_Pan(void* channel, float pan)
{
gMixer.Lock();
((Channel*)channel)->SetPan(pan);
gMixer.Unlock();
}
示例9: Mixer_Channel_Volume
void Mixer_Channel_Volume(void* channel, int volume)
{
gMixer.Lock();
((Channel*)channel)->SetVolume(volume);
gMixer.Unlock();
}