Sound: Allow sending commands to paused channels

This commit is contained in:
Iliyas Jorio 2022-05-15 11:35:20 +02:00
parent 3f8eeba1a3
commit 70acda5ce4
3 changed files with 3 additions and 8 deletions

View File

@ -48,13 +48,8 @@ void ChannelImpl::SetInitializationParameters(long initBits)
source.SetInterpolation(interpolate);
}
void ChannelImpl::ApplyParametersToSource(int mask, bool evenIfInactive)
void ChannelImpl::ApplyParametersToSource(int mask)
{
if (!evenIfInactive && !source.active)
{
return;
}
// Pitch
if (mask & kApplyParameters_Pitch)
{

View File

@ -44,7 +44,7 @@ public:
void SetInitializationParameters(long initBits);
void ApplyParametersToSource(int mask, bool evenIfInactive = false);
void ApplyParametersToSource(int mask);
inline ChannelImpl* GetPrev() const
{

View File

@ -179,7 +179,7 @@ static void InstallSoundInChannel(SndChannelPtr chan, const Ptr sampledSoundHead
// The loop param is a special case -- we're detecting it automatically according
// to the sound header. If your application needs to force set the loop, it must
// issue pommeSetLoopCmd *after* bufferCmd/soundCmd.
impl.ApplyParametersToSource(kApplyParameters_All & ~kApplyParameters_Loop, true);
impl.ApplyParametersToSource(kApplyParameters_All & ~kApplyParameters_Loop);
// Override systemwide audio pause.
impl.temporaryPause = false;