[mythtv] [patch] Improving SoundTouch sound quality

ben levitt benjie at gmail.com
Thu Jan 27 20:29:31 EST 2005


When I use SoundTouch to speed up or slow down a show, I feel like the
sound gets a slight jagged/stuttery/rough edge to it.  Like a new
texture gets added in.  I think this is caused by the default length
of each little chunk of audio being a bit too big.

The setting that controls the length of SoundTouch's audio chunks is
SETTING_SEQUENCE_MS, and its default value is 82.  This patch sets it
to 35.

Although the comments in TDStretch.h suggest that smaller values
should sound better for speeding sounds up and worse for slowing them
down, I like this lower value for both fast and slow tv audio.

It also points out that a lower value here increases processing speed
required, but I haven't found this to be a problem at all.  (The MMX
SoundTouch routines seem to be really fast.)

I tried lowering this value with this patch, and I much prefer how it
sounds in everything I've tried so far.  Please try it out and see
what you think.  Try other values too...

Ben
-------------- next part --------------
Index: libs/libmyth/audiooutputbase.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/audiooutputbase.cpp,v
retrieving revision 1.9
diff -u -r1.9 audiooutputbase.cpp
--- libs/libmyth/audiooutputbase.cpp	26 Jan 2005 06:46:45 -0000	1.9
+++ libs/libmyth/audiooutputbase.cpp	28 Jan 2005 01:06:34 -0000
@@ -72,6 +72,7 @@
             pSoundStretch->setChannels(audio_channels);
 
             pSoundStretch->setTempo(audio_stretchfactor);
+            pSoundStretch->setSetting(SETTING_SEQUENCE_MS, 35);
             // dont need these with only tempo change
             //pSoundStretch->setPitch(1.0);
             //pSoundStretch->setRate(1.0);


More information about the mythtv-dev mailing list