#ifndef WAVTOWAV
#define WAVTOWAV

/*
 * @(#)WAVToWAV.h
 *
 * This file is part of webCDwriter - Network CD Writing.
 *
 * Copyright (C) 2003 Jörg P. M. Haeger
 *
 * webCDwriter is free software. See CDWserver.cpp for details.
 */

#include "AudioToWAV.h"

/**
 * Convert WAV files to stereo, 44100 HZ and 16 bit.
 *
 * @version 20030204
 * @author Jörg P. M. Haeger
 */
class WAVToWAV: public AudioToWAV {
public:
	WAVToWAV(FILE *inStream = NULL): AudioToWAV(inStream) {
		converter = new Process(config.getActiveValue("soxPath"));
		converter->addArg("-t");
		converter->addArg(".wav");
		converter->addArg("-");
		converter->addArg("-t");
		converter->addArg(".raw");
		converter->addArg("-r");
		converter->addArg("44100");
		converter->addArg("-w");
		converter->addArg("-c");
		converter->addArg("2");
		converter->addArg("-");
		converter->start(NULL, 1);
	}
};

#endif
