int bytespersec = channels * samplerate * BITS / 8;
int align = channels * BITS / 8;
+ assert(channels);
PARA_DEBUG_LOG("writing wave header: %d channels, %d KHz\n", channels, samplerate);
memset(headbuf, 0, WAV_HEADER_LEN);
memcpy(headbuf, "RIFF", 4);
int *bof = fn->private_data;
if (*bof) {
+ if (!len)
+ return 0;
make_wav_header(fn->fc->channels, fn->fc->samplerate, fn);
fn->loaded = WAV_HEADER_LEN;
*bof = 0;
*
* \param f struct to initialize
*/
-void wav_init(struct filter *f)
+void wav_filter_init(struct filter *f)
{
f->convert = wav_convert;
f->close = wav_close;