add Track
Add track from file path (auto-decodes).
This is the recommended way to add tracks. The file is automatically decoded from its format (MP3, M4A, WAV, etc.) to PCM.
Return
true if track was added successfully
Parameters
name
Unique name for this track
file Path
Path to audio file
Add track from raw PCM data (for advanced use cases).
Use this when you have pre-decoded audio data or need to load audio from a custom source.
Return
true if track was added successfully
Parameters
name
Unique name for this track
data
PCM audio data (16-bit signed samples)
sample Rate
Sample rate in Hz
channels
Number of channels (1 = mono, 2 = stereo)