Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18446/src/audio/plugins
Modified Files:
mplayer.py
Log Message:
add MPLAYER_RESAMPLE_AUDIO
Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/mplayer.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** mplayer.py 17 Oct 2004 02:45:19 -0000 1.43
--- mplayer.py 1 Jan 2005 15:06:19 -0000 1.44
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.44 2005/01/01 15:06:19 dischi
+ # add MPLAYER_RESAMPLE_AUDIO
+ #
# Revision 1.43 2004/10/17 02:45:19 outlyer
# Small changes...
***************
*** 56,59 ****
--- 59,63 ----
import os
import re
+ import logging
# freevo imports
***************
*** 63,66 ****
--- 67,72 ----
from event import *
+ # the logging object
+ log = logging.getLogger('audio')
class PluginInterface(plugin.Plugin):
***************
*** 162,165 ****
--- 168,178 ----
if is_playlist:
command.append('-playlist')
+
+ if config.MPLAYER_RESAMPLE_AUDIO and item.info['samplerate'] and \
+ item.info['samplerate'] < 40000:
+ srate = max(41000, min(item.info['samplerate'] * 2, 48000))
+ log.info('resample audio from %s to %s', item.info['samplerate'],
srate)
+ command += [ '-srate', str(srate) ]
+
command.append(filename)
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog