[MPlayer-dev-eng] audio resampling

Anders Johansson ajh at atri.curtin.edu.au
Tue Jan 15 15:04:23 CET 2002


Hi,

I have solved the sync problem with fractional audio resampling. This
means that people with old (max 44.1kHz) or fix frequency soundcards
can watch movies regardless of sample frequency. I will document the
audio plugins now when this works. Please test the plugin if you have
time, it is enabled as follows:

./mplayer -aop list=resample:fout=48000 movie.xxx

where fout is the sample frequency the soundcard will use, try 44100,
36000 or whatever. If you get the following error message
"[ao_plugin] Warning under or over flow in sound plugin" please send 
me an email.

I will continue working on the plugin to improve sound quality and
speed. The MMX code still removes sync so I have disabled it for now
(the sound is however perfect). Funny thing is that sync returns
momentarily when jumping forwards and backwards in the movie. The
problem is probably related to some compiler directive in the code. If
someone has time over the files to look in would be libao2\fir.h and
libao2\pl_resample.c. The MMX code is turned on by uncommenting line
27 in pl_resample.c.

The output frequency is not yet perfect, still a small offset when
fout/fin != 128/x (where x is an integer). I will solve this problem
after I get the MMX stuff to work.

One unfortunate thing with this plugin is that the sound output level
is divided by 2 (this reduces the SNR which sucks). I could fix this
but in that case I can not fix the problem with the sample frequency
(since it requires filters designed off line). My guess is that getting
exact sample frequency is more important especially if one wants to
use this plugin with mencoder -- comments?

//Anders




More information about the MPlayer-dev-eng mailing list