diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2006-02-05 20:24:07 +0100 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2006-02-05 20:24:07 +0100 |
commit | 97d87e1fa0808cf747bf0a4fe3b39d1cbdb5efc8 (patch) | |
tree | c817c2371ea765b6fd6f9e47f4985209dd1937dd /contrib/exec_vorbisgain |
Import jack_3.1.1+cvs20050801.orig.tar.gz
[dgit import orig jack_3.1.1+cvs20050801.orig.tar.gz]
Diffstat (limited to 'contrib/exec_vorbisgain')
-rw-r--r-- | contrib/exec_vorbisgain | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/contrib/exec_vorbisgain b/contrib/exec_vorbisgain new file mode 100644 index 0000000..595b116 --- /dev/null +++ b/contrib/exec_vorbisgain @@ -0,0 +1,38 @@ +#!/bin/sh + +# Example script for exec hooks +# Copyright (C) 2005 Martin Michlmayr <tbm@cyrius.com> +# This script may be distributed under the GPL v2 or higher. + +# Process tracks with vorbisgain to calculate their "ReplayGain" +# so they can be played with a uniform sound level. + +# Usage: put the following in your ~/.jack3rc file (without any leading +# hash symbols) +# exec_when_done:yes +# exec_no_err:"/usr/share/doc/jack/examples/exec_vorbisgain" + +# You have to set (and later restore) $IFS in since $JACK_JUST_ENCODED +# contains a listing of tracks separated by newlines. + +OLDIFS="$IFS" +IFS=" +" + +# There are two alternatives: +# 1. Process all files at once as an album: +vorbisgain -a $JACK_JUST_ENCODED + +# 2. Process each file individually: +#for i in $JACK_JUST_ENCODED; do +# IFS="$OLDIFS"; +# vorbisgain "$i" +# IFS=" +#" +#done + +# In most real world cases, you will want option 1. However, option two +# is included to show how you can process individual files. + +IFS="$OLDIFS" + |