The OpenD Programming Language

toWAV

Encode a slice to a WAV in memory. The returned slice MUST be freed with freeEncodedAudio.

  1. const(ubyte)[] toWAV(const(float)[] data, int numChannels, float sampleRate, EncodingOptions options)
  2. const(ubyte)[] toWAV(const(double)[] data, int numChannels, float sampleRate, EncodingOptions options)
    nothrow @nogc
    const(ubyte)[]
    toWAV
    (
    const(double)[] data
    ,
    int numChannels = 1
    ,
    float sampleRate = 44100.0f
    ,)

Return Value

Type: const(ubyte)[]

null in case of error.

Meta