FNA-XNA / FNA

FNA - Accuracy-focused XNA4 reimplementation for open platforms
https://fna-xna.github.io/
2.63k stars 266 forks source link

FLAC and WAV support for music? #492

Open H-A-M-G-E-R opened 2 months ago

H-A-M-G-E-R commented 2 months ago

I know that Touhou uses WAV files as music.

flibitijibibo commented 2 months ago

For WAV it can be loaded all at once in SoundEffect though that probably uses too much memory.

All other formats can use any standard decoder and pass the PCM to a DynamicSoundEffectInstance.

H-A-M-G-E-R commented 2 months ago

I think FLAC/WAV can be streamed from disk with less CPU cycles than Vorbis. Proof: https://phoboslab.org/log/2023/02/qoa-time-domain-audio-compression

flibitijibibo commented 2 months ago

QOA is fine too - Vorbis is mostly for disk size, for FNA's purposes it was chosen to replace XNA MediaPlayer's format which is WMA. You can pick any format you want, we'll read PCM either way.