Clownacy / clownaudio

Sound engine that is suitable for video games and other multimedia applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Format negotiation

Clownacy opened this issue · comments

clownaudio should negotiate with the decoder and playback backends over what formats and sample rates to use. For example, SDL2 allows you to fetch a 'preferred' output sample rate, but right now clownaudio just forces a default of 48000Hz. Likewise, the libxmp-lite and PxTone decoder backends are also locked to 48000Hz, when they can just be set to whatever the mixer is using.

Unfortunately, the introduction of sample-rate overriding means I'm not sure how to make dynamic decoder backend sample rates work. For now, they're locked to 48000Hz. Otherwise, the base sample rate would vary based on the playback backend and platform.