#include "convert.h"

#include <string.h>

static int in_fmt;
static int out_fmt;

static Index<char> convert_output;
static Index<float> convert_temp;

void convert_init (int input_fmt, int output_fmt)
{
    in_fmt = input_fmt;
    out_fmt = output_fmt;
}

const Index<char> & convert_process (const void * ptr, int length)
{
    int samples = length / FMT_SIZEOF (in_fmt);

    convert_output.resize (FMT_SIZEOF (out_fmt) * samples);

