[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: looping ogg123 file



On Tue, 2002-10-22 at 22:05, Lance Hoffmeyer wrote:
> Any ideas on how to create a loop with ogg123
> so that I can play the same sound file over
> and over again?  Maybe play it only 3 times?

Is the following bash script okay for you?

loopOgg() { 
  local -i n=$1; shift; 
  while [ $n -ne 0 ]; do 
    ogg123 "$@"; 
    if [ $n -gt 0 ]; then
      n=n-1; 
    fi;
  done;
}

Usage: loopOgg N-TIMES ARGS

A positive value for N-TIMES means play it that many times. A negative
value plays ad nauseam. 0 doesn't do anything.

Example: loopOgg 3 -q -b 128 -d oss file1.ogg file2.ogg 

-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux advocate                     - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \



Reply to: