wavelet-audio ยป Using wavelet-audio

Generally you use just two functions: encode-wavelet-audio and decode-wavelet-audio which convert between WAV files and wavelet-audio (.wa) files. There is more advanced API. To encode wavelet-audio stream you need to:
  1. Open bit stream for output using trivial-bit-streams. You may wish to use my version of trivial-bit-streams, which is faster.
  2. Fill metadata block and write wavelet audio header using write-wavelet-audio-header. You need to specify a number of channels, bits per sample and samplerate in streaminfo block.
  3. Feed audio data in form of simple-array of 32 bit signed integer values to encode-block along with streaminfo metadata block.
  4. Write audio blocks with write-block.
  5. Flush and close bit stream.
To decode audio, you need to use counterparts to functions above: open-wavelet-audio, read-block and decode-block.