mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
92 lines
5.1 KiB
Plaintext
92 lines
5.1 KiB
Plaintext
#compdef oggenc ogg123 ogginfo oggdec
|
|
|
|
local expl ret=1
|
|
|
|
case $service in
|
|
oggenc)
|
|
_arguments -s \
|
|
'(-)'{-h,--help}'[show help]' \
|
|
'(-r --raw)'{-r,--raw}'[assume input data is raw little-endian audio data with no header information]' \
|
|
'(-B --raw-bits)'{-B,--raw-bits=}'[set raw mode input sample size in bits]:sample size:(8 16)' \
|
|
'(-C --raw-chan)'{-C,--raw-chan=}'[set raw mode input number of channels]:number of channels' \
|
|
'(-R --raw-rate)'{-R,--raw-rate=}'[set raw mode input sample rate]:sample rate:(44100 48000)' \
|
|
'--raw-endianness[set raw mode endianness]:endianness:((0\:big\ endian 1\:little\ endian))' \
|
|
'(-Q --quiet)'{-Q,--quiet}'[quiet mode]' \
|
|
'(-b --bitrate)'{-b,--bitrate=}'[set encoding to the bitrate closest to that specified]:bitrate (kb/s)' \
|
|
'(-m --min-bitrate)'{-m,--min-bitrate=}'[set minimum bitrate]:bitrate (kb/s)' \
|
|
'(-M --max-bitrate)'{-M,--max-bitrate=}'[set maximum bitrate]:bitrate (kb/s)' \
|
|
'--managed[turn off the normal VBR encoding]' \
|
|
'(-q --quality)'{-q,--quality=}'[set encoding quality]:quality:(0 1 2 3 4 5 6 7 8 9 10)' \
|
|
'--resample[resample input to the given sample rate before encoding]:sample rate (Hz)' \
|
|
'--downmix[down mix input from stereo to mono]' \
|
|
'--advanced-encode-option:option name:_values option "bitrate_average_window[set the managed bitrate window]\:number (seconds)" "lowpass_frequency[set the lowpass frequency]\:frequency (kHz)"' \
|
|
'(-s --serial)'{-s,--serial}'[force a specific serial number in the output stream]' \
|
|
'(-o --output-file)'{-o,--output-file=}'[write the Ogg Vorbis stream to output_file]:files:->oggfiles' \
|
|
'(-n --pattern)'{-n,--pattern=}'[specify pattern for producing filenames]:string' \
|
|
'(-c --comment)'{-c,--comment}'[add the string comment as an extra comment]:comment' \
|
|
'(-a --artist)'{-a,--artist}'[set the artist comment field in the comments to artist]:artist' \
|
|
'(-G --genre)'{-G,--genre}'[set the genre comment field in the comments to genre]:genre' \
|
|
'(-d --date)'{-d,--date}'[set the date comment field to the given value]:date' \
|
|
'(-N --tracknum)'{-N,--tracknum}'[set the track number comment field to the given value]:track number' \
|
|
'(-t --title)'{-t,--title}'[set the track title comment field to title]:title' \
|
|
'(-l --album)'{-l,--album}'[set the album comment field to album]' \
|
|
'*:wav file:_files -g "(#i)*.wav"' && ret=0
|
|
;;
|
|
ogg123)
|
|
_arguments -C -s \
|
|
'(-h --help)'{-h,--help}'[show help]' \
|
|
'(-)'{-V,--version}'[display version information]' \
|
|
'(-d --device)'{-d,--device}'[output device]:device:((null\:discard\ all\ data oss\:open\ sound\ system sun\:sun\ audio alsa\:advanced\ linux\ sound\ architecture irix\:IRIX\ audio arts\:aRts\ sound\ daemon esd\:enlightened\ sound\ daemon au\:sun\ audio\ file raw\:raw\ sample wav\:wav\ file))' \
|
|
'(-f --files)'{-f,--files=}'[output filename for a previously specified file device]:output filename:_files' \
|
|
'(-k --skip)'{-k,--skip}'[skip the first '\''n'\'' seconds]:seconds' \
|
|
'(-b --buffer)'{-b,--buffer}'[size of input buffer]:kilobytes' \
|
|
'(-p --prebuffer)'{-p,--prebuffer}'[prebuffer percentage]:percent' \
|
|
'(-q --quiet)'{*-v,*--verbose}'[increase verbosity]' \
|
|
'(-q --quiet -v --verbose)'{--quiet,-q}'[quiet mode]' \
|
|
'(-x --nth)'{-x,--nth}'[block decode intervall]:number' \
|
|
'(-y --ntimes)'{-y,--ntimes}'[block repeat count]:number' \
|
|
'(-z --shuffle)'{-z,--shuffle}'[shuffle play]' \
|
|
'(-l --delay)'{-l,--delay=}'[set delay]:delay (ms)' \
|
|
'(-@ --playlist)'{-@,--playlist}'[play all of the files from a playlist]:playlist:_files' \
|
|
'--audio-buffer[size of output audio buffer]:kilobytes' \
|
|
{'*-o','*--device-option='}'[assign device option values]:device option:->devopts' \
|
|
'*:files:->oggfiles' && ret=0
|
|
;;
|
|
ogginfo)
|
|
_arguments -C -s \
|
|
'-h[show a help and usage message]' \
|
|
'*-q[quiet mode]' \
|
|
'-v[verbose mode]' \
|
|
'*:files:->oggfiles' && ret=0
|
|
;;
|
|
oggdec)
|
|
_arguments -C -s \
|
|
'(-q --quiet)'{-q,--quiet}'[quiet mode]' \
|
|
'(-)'{-h,--help}'[print help information]' \
|
|
'(-)'{-v,--version}'[display version information]' \
|
|
'(-b --bits)'{-b,--bits=}'[bits per sample]:bits per sample:(8 16)' \
|
|
'(-e --endian)'{-e,--endian=}'[set endianness for 16-bit output]:endianness:((0\:\(default\)\ little-endian\ \(Intel\ byte\ order\) 1\:big-endian\ \(sane\ byte\ order\)))' \
|
|
'(-R --raw)'{-R,--raw=}'[output in raw format]' \
|
|
'(-o --output)'{-o,--output=}'[write output to specified filename]:output filename:_files' \
|
|
'(-s --sign)'{-s,--sign=}'[set signedness for output]:signedness:((0\:unsigned 1\:signed\ \(default\)))' \
|
|
'*:files:->oggfiles' && ret=0
|
|
;;
|
|
esac
|
|
|
|
case $state in
|
|
oggfiles)
|
|
_wanted files expl 'ogg vorbis file' \
|
|
_files "$expl[@]" -g '(#i)*.ogg' && return
|
|
;;
|
|
devopts)
|
|
if compset -p '*:'; then
|
|
_message -e value value
|
|
else
|
|
_wanted devopts expl 'device option' \
|
|
compadd -S : - dsp dev card buf_size host byteorder && return
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
return ret
|