Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 251706 | Differences between
and this patch

Collapse All | Expand All

(-)tovid-0.31.old/src/todisc (-2 / +11 lines)
Lines 1189-1194 Link Here
1189
#    $VMGM_ONLY && $SKIP_VMGM && mv "$BASEDIR/dummy.mpg" "$BASEDIR/VMGM.mpg"
1189
#    $VMGM_ONLY && $SKIP_VMGM && mv "$BASEDIR/dummy.mpg" "$BASEDIR/VMGM.mpg"
1190
}
1190
}
1191
1191
1192
get_sox_arg()
1193
{
1194
    sox_version=$(sox --version)
1195
    sox_version=${sox_version##*v}
1196
    test_version $sox_version 13.0.0 && echo '-2' || echo '-w'
1197
}
1198
1199
1192
##############################################################################
1200
##############################################################################
1193
#                          	End of functions                                 #
1201
#                          	End of functions                                 #
1194
##############################################################################
1202
##############################################################################
Lines 5240-5248 Link Here
5240
fi
5248
fi
5241
BG_AUDIO_LENGTH="-t $MENU_ATIME"
5249
BG_AUDIO_LENGTH="-t $MENU_ATIME"
5242
# create audio background for the main menu
5250
# create audio background for the main menu
5251
sample_size=$(get_sox_arg)
5243
if [[ -z "$BG_AUDIO" || "$BG_AUDIO" = "none" ]]; then # no audio: use silence
5252
if [[ -z "$BG_AUDIO" || "$BG_AUDIO" = "none" ]]; then # no audio: use silence
5244
    cat /dev/zero 2>/dev/null | nice -n 0 sox -t raw -c 2 -r 48000 -w \
5253
        cat /dev/zero 2>/dev/null | nice -n 0 sox -t raw -c 2 -r 48000 \
5245
    -s - $WORK_DIR/intro.wav  trim 0 $MENU_ATIME
5254
        $sample_size -s - $WORK_DIR/intro.wav  trim 0 $MENU_ATIME
5246
# Make sure file exists
5255
# Make sure file exists
5247
elif test ! -s "$BG_AUDIO"; then
5256
elif test ! -s "$BG_AUDIO"; then
5248
    runtime_error "Cannot find background audio file: $BG_AUDIO"
5257
    runtime_error "Cannot find background audio file: $BG_AUDIO"
(-)tovid-0.31.old/src/tovid-init.in (+20 lines)
Lines 376-381 Link Here
376
}
376
}
377
377
378
# ******************************************************************************
378
# ******************************************************************************
379
# takes 2 args: (1) version (2) the version testing against
380
# return true if version is >= to the test version (same or newer)
381
# ******************************************************************************
382
test_version()
383
{
384
    OIFS=$IFS
385
    IFS='.'
386
    local version test_version
387
    version=${1//,/.} # allow comma separated version string too
388
    version=($version)
389
    test_version=($2)
390
    IFS=$OIFS
391
    for i in ${!test_version[@]}; do
392
        [[ -z ${version[i]} ]] && version[i]=0
393
       (( ${version[i]} < ${test_version[i]} )) && return 1
394
    done
395
    return 0
396
}
397
398
# ******************************************************************************
379
# ******************************************************************************
399
# ******************************************************************************
380
#
400
#
381
#
401
#

Return to bug 251706