Skip to content

Commit

Permalink
Rename concept of "global" mixer with "fallback"
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Dec 25, 2023
1 parent 4b3768a commit f060449
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions osu.Framework/Audio/Mixing/Bass/BassAudioMixer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ public void UpdateDevice(int deviceIndex)
{
ManagedBass.Bass.ChannelSetDevice(Handle, deviceIndex);

if (AudioThread.WasapiMixer != 0)
BassMix.MixerAddChannel(AudioThread.WasapiMixer, Handle, BassFlags.MixerChanBuffer | BassFlags.MixerChanNoRampin);
if (AudioThread.GlobalMixer != 0)
BassMix.MixerAddChannel(AudioThread.GlobalMixer, Handle, BassFlags.MixerChanBuffer | BassFlags.MixerChanNoRampin);
}
}

Expand Down Expand Up @@ -283,7 +283,7 @@ private void createMixer()
if (!ManagedBass.Bass.GetDeviceInfo(ManagedBass.Bass.CurrentDevice, out var deviceInfo) || !deviceInfo.IsInitialized)
return;

Handle = AudioThread.WasapiMixer != 0
Handle = AudioThread.GlobalMixer != 0
? BassMix.CreateMixerStream(frequency, 2, BassFlags.MixerNonStop | BassFlags.Decode)
: BassMix.CreateMixerStream(frequency, 2, BassFlags.MixerNonStop);

Expand All @@ -301,8 +301,8 @@ private void createMixer()

Effects.BindCollectionChanged(onEffectsChanged, true);

if (AudioThread.WasapiMixer != 0)
BassMix.MixerAddChannel(AudioThread.WasapiMixer, Handle, BassFlags.MixerChanBuffer | BassFlags.MixerChanNoRampin);
if (AudioThread.GlobalMixer != 0)
BassMix.MixerAddChannel(AudioThread.GlobalMixer, Handle, BassFlags.MixerChanBuffer | BassFlags.MixerChanNoRampin);

ManagedBass.Bass.ChannelPlay(Handle);
}
Expand Down

0 comments on commit f060449

Please sign in to comment.