24-bit int

solidstate1991 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 2 17:18:51 PDT 2017


On Friday, 1 September 2017 at 19:39:14 UTC, EntangledQuanta 
wrote:
> Is there a way to create a 24-bit int? One that for all 
> practical purposes acts as such? This is for 24-bit stuff like 
> audio. It would respect endianness, allow for arrays int24[] 
> that work properly, etc.

If you need to perform math on integer audio, I strongly suggest 
to use int32 for this purpose to avoid performance degradation, 
then convert back to int24 when you're finished. Probably going 
to add such feature into my PCM library.


More information about the Digitalmars-d-learn mailing list