FNA icon indicating copy to clipboard operation
FNA copied to clipboard

FLAC and WAV support for music?

Open H-A-M-G-E-R opened this issue 1 year ago • 3 comments

I know that Touhou uses WAV files as music.

H-A-M-G-E-R avatar Aug 31 '24 21:08 H-A-M-G-E-R

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.

flibitijibibo avatar Sep 01 '24 00:09 flibitijibibo

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

H-A-M-G-E-R avatar Sep 01 '24 18:09 H-A-M-G-E-R

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.

flibitijibibo avatar Sep 01 '24 18:09 flibitijibibo

Think I answered this - short version: Use whatever you want and pass the decoded samples to DynamicSoundEffectInstance.

flibitijibibo avatar Dec 28 '24 15:12 flibitijibibo