Clownacy / clownaudio

Sound engine that is suitable for video games and other multimedia applications.
zlib License
24 stars 2 forks source link

Format negotiation #4

Closed Clownacy closed 4 years ago

Clownacy commented 4 years ago

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.

Clownacy commented 4 years ago

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.

Clownacy commented 4 years ago

11761fe9f6c0f7ec46a14dc93e01e6fe06d18e1f, 635ea07b39cbac51b4388486f8fd9592a44e0af8, 6b6f8459f8ee7b62f52e98126cba1a3e0dc5cf96, a76035b6d2d6851774e01c2580424b66f29f76fc, and 216978b709de17b33765f8ddfd744edce03a42c0.