osu-framework icon indicating copy to clipboard operation
osu-framework copied to clipboard

Support alternative audio backend

Open xen0n opened this issue 6 years ago • 6 comments

Hi,

Currently osu! heavily relies on BASS for audio. However, as BASS is closed-source, one can't easily bring up osu! on platforms unsupported by BASS; some recent ARM64, PPC64 devices and upcoming Loongson boards come to mind.

Is there any plan to abstract out the audio backend, so people on these niche platforms can begin work to port osu! to their favourite non-x86 rigs?

xen0n avatar Aug 22 '19 06:08 xen0n

Yep, definitely open to alternatives. Implementation should already be relatively straightforward (make AudioManager provided by the host in a similar way to other components).

peppy avatar Aug 22 '19 06:08 peppy

This goes hand in hand with the GameHost refactor I’m working on, that allows for different backend implementations to be dropped in (a prerequisite for Veldrid support).

swoolcock avatar Aug 22 '19 06:08 swoolcock

I suggest using SDL as the alternative. It would be better for Linux users since it supports modern audio drivers for Linux, which can decrease the audio latency. Users can also set the SDL_AUDIODRIVER environment variable to manually override the driver used. The list of audio drivers supported can be found at the repository.

huupoke avatar Mar 16 '21 04:03 huupoke

@huupoke12 It's been a while but IIRC the main hurdle is osu! makes heavy use of the audio effects provided by BASS, for mods like DT NC and such. All DSP code would have to be reimplemented, with adequate performance, if one were to replace BASS, and that's probably why this is still TODO today.

xen0n avatar Mar 16 '21 06:03 xen0n

This doesn't need discussion, sorry. It needs implementation. It's not (and will never be) a priority for osu!'s use case, and it's not going to be prioritised by the team until after osu!lazer replaces osu!stable.

In-fact, the only osu-framework-side implementation is to expose sufficient abstractions from AudioManager and all related components (SampleStore/TrackStore/etc) in order to create implementation-specific components. The rest can be done as its own nuget package.

smoogipoo avatar Mar 16 '21 08:03 smoogipoo

@huupoke12 It's been a while but IIRC the main hurdle is osu! makes heavy use of the audio effects provided by BASS, for mods like DT NC and such. All DSP code would have to be reimplemented, with adequate performance, if one were to replace BASS, and that's probably why this is still TODO today.

i see, so its not as easy as it seems at first, thanks

This doesn't need discussion, sorry. It needs implementation. It's not (and will never be) a priority for osu!'s use case, and it's not going to be prioritised by the team until after osu!lazer replaces osu!stable.

In-fact, the only osu-framework-side implementation is to expose sufficient abstractions from AudioManager and all related components (SampleStore/TrackStore/etc) in order to create implementation-specific components. The rest can be done as its own nuget package.

this seems more complex than my skill level of understanding, i hope we can find a solution eventually, thanks. coming from a BSD user who BASS is unavailable and i cannot compile it.

darkralts avatar Jul 04 '25 15:07 darkralts