Skip to content

Always use a global mixer #6697

@LastExceed

Description

@LastExceed

Tracking issue for basically this comment:

/// If a global mixer is being used, this will be the BASS handle for it.
/// If non-null, all game mixers should be added to this mixer.
/// </summary>
/// <remarks>
/// When this is non-null, all mixers created via <see cref="CreateAudioMixer"/>
/// will themselves be added to the global mixer, which will handle playback itself.
///
/// In this mode of operation, nested mixers will be created with the <see cref="BassFlags.Decode"/>
/// flag, meaning they no longer handle playback directly.
///
/// An eventual goal would be to use a global mixer across all platforms as it can result
/// in more control and better playback performance.

We're already doing this with BASSWASAPI, so we should have everything we need in place to do the same for regular BASS playback without much effort.

It is unclear how exactly BASS handles parallel playback of independent channels (i.e. what we're currently doing). If they are kept separate (= multiple streams to the OS mixer), then we might have to watch out for some minor changes in offsets. But observing its winapi calls (using api monitor) shows no increase in accesses to wasapi buffers when starting additional channels, so I think that BASS is essentially already using something akin to a global mixer anyway.

Currently blocks #705 , #6650, and ppy/osu#36296

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions