Provide write access to sound files.
1 // Create a sound file, ogg/vorbis format, 44100 Hz, stereo 2 auto file = new OutputSoundFile(); 3 if (!file.openFromFile("music.ogg", 44100, 2)) 4 { 5 //error 6 } 7 8 while (...) 9 { 10 // Read or generate audio samples from your custom source 11 short[] samples = ...; 12 13 // Write them to the file 14 file.write(samples); 15 }
$(INPUTSOUNDFILE_LINK)
* This class encodes audio samples to a sound file.
It is used internally by higher-level classes such as $(SOUNDBUFFER_LINK), but can also be useful if you want to create audio files from custom data sources, like generated audio samples.