almoghamdani / audify

Play/Stream/Record PCM audio data & Encode/Decode Opus to PCM audio data
MIT License
126 stars 20 forks source link

Endianness for float format? #29

Closed bradisbell closed 2 years ago

bradisbell commented 2 years ago

What is the endianness for float32 samples? Is it platform specific?

bradisbell commented 2 years ago

From the RtAudio docs:

Audio data fed to/from an RtAudio stream is assumed to ALWAYS be in host byte order. The internal routines will automatically take care of any necessary byte-swapping between the host format and the soundcard. Thus, endian-ness is not a concern in the following format definitions.

So, if we're writing the audio data to files and what not, we need to determine the endianness where we're currently running.