Comment 1 for bug 807511

Revision history for this message
William Good (bkgood) wrote : Re: Allow insane sound quality settings

CachingReader on up (in the engine call path) all uses 32-bit floats. Having the SoundSource's just write floats to memory instead of int16's would allow all the decoders to write to the precisions which their corresponding formats support, and would have no real affect on performance, with the only real downside being minor duplication of code in SoundSource's (because most will be doing an int16 to float32 conversion, but there is a method in SampleUtil accomplishing this which CachingReader currently uses to do the job). The SoundSource interface needs updating anyway, with brilliance like `unsigned read(unsigned long size, const SAMPLE *dest)'... yeah, because a destination buffer should obviously be const. /sarcasm

This might be more important in input (since most digital audio is made available as 16-bit CD-Audio anyway...), as all our input is int16 (because that's what xwax wants) but once passthrough gets done it'd be useful to support the 24-bit input many cards support these days. We'd just have to convert from float32 or int32 or whatever to int16 for xwax.