Documentation ¶
Overview ¶
package pcm converts beween different representations of PCM audio data. Ideally the only representations we would need would be []float32 for F32LE and []int16 for S16LE. Sadly, many modules require us to provide raw byte arrays, so we also need conversion functions for []byte.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func F32LEBytesToS16LEBytes ¶
S16LEtoF32 converts a slice of int16 bytes to a slice of float32 bytes. This is useful for converting from S16LE to F32LE.
func F32toS16LE ¶
F32toS16LE converts a slice of float32 to a slice of int16. This is useful for converting from F32LE to S16LE.
func F32toS16LEBytes ¶
F32toS16LEBytes converts a slice of float32 to a slice of bytes. This is useful for converting from F32LE to S16LE.
func S16LEBytesToF32LE ¶
S16LEBytesToF32 converts a slice of bytes to a slice of float32. This is useful for converting from S16LE to F32LE.
func S16LEToF32LE ¶
S16LEToF32LE converts a slice of int16 to a slice of float32. This is useful for converting from S16LE to F32LE.
Types ¶
This section is empty.