encode
Encode AudioRawData to a compressed audio file.
Return
true on success, false on failure
Parameters
Raw PCM audio data (from SonixDecoder or synthesis)
Absolute path for output file
Output format: "m4a" (default) or "mp3"
Target bitrate in kbps (default: 128)
Encode float samples to a compressed audio file.
Return
true on success, false on failure
Parameters
Interleaved float samples in range -1.0, 1.0
Sample rate in Hz (e.g., 44100)
Number of channels (1 = mono, 2 = stereo)
Absolute path for output file
Output format: "m4a" (default) or "mp3"
Target bitrate in kbps (default: 128)
Encode PCM bytes to a compressed audio file.
Return
true on success, false on failure
Parameters
16-bit signed PCM bytes (little-endian, interleaved if stereo)
Sample rate in Hz (e.g., 44100)
Number of channels (1 = mono, 2 = stereo)
Absolute path for output file
Output format: "m4a" (default) or "mp3"
Target bitrate in kbps (default: 128)