A simple patch to solve the problem of sample frequency not available.
at decode_output of madplay.c
int decode_output ( ... { ...
else { if (audio->quiet < 1) { error("output", "sample frequency %u Hz not available; closest %u Hz", frame->sfreq, control.config.speed); + + if (abs(frame->sfreq - control.config.speed) <1000 ) { + audio->channels = nchannels; + audio->speed_out = frame->sfreq; + goto start; } } ...
+Start:
control.command = audio_cmd_play;
if (audio->resampled) { control.play.nsamples = resample_block(&audio->resample[0], synth->pcmlen, ...
}
I set the limit before the diff. between frame->sfreq and control.config.speed is 1000. I think it is enough for general case.
Regards,
Dominic.
---------------------------------------------- ÅwªïšÏ¥Î hongkong.com ¹q€l¶l¥óšt²Î Thank you for using hongkong.com Email system