⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rec

📁 linux下录音程序
💻
字号:
#!/bin/sh# Shell script to record sound files from unix style sound devices.# Should auto detect most supported systems and record the file for you.## Originally developed by Chris Bagwell (cbagwell@sprynet.com)## Change History:## June 1, 1998 - Chris Bagwell (cbagwell@sprynet.com)#   Kjetil Torgrim Homme <kjetilho@ifi.uio.no> sent in a neat patch to#   attempt an educated guess on how to rec sound on sun hardware.#   There is probably a better way to do it in the actual software though.##   Use the parsed out volume flag to have sox change the volume.  Yes, its#   better to use the audio devices hardware mixer to adjust volume but some#   way is better then no way.  Its still parsed seperately so people may#   optionally pass the parameter to a mixer.## September 7, 1998 - Chris Bagwell (cbagwell@sprynet.com)##   Updated usage checking a little more so that only one filename can#   be given.## Set up path so that it can find Sox if user's path doesn't already# include it.PATH=$PATH:/usr/local/binexport PATHhelp(){  echo "rec v1.4 - front end to Sox"  echo ""  echo "Usage: rec [ fopts ] outfile [effects]"  echo  echo "fopts: -c channels -h -r rate -t type -v volume -s/-u/-U/-A -b/-w/-l/-f/-d/-D -x"  echo  echo "effects: avg/band/chorus/copy/cut/deemph/echo/echos/flanger/highp/lowp/map/mask/phaser/pick/polyphase/rate/resample/reverb/reverse/split/stat/vibro"  echo ""  echo "See sox man page for more info on required effects options."}if [ "$1" = "" ] ; then  help; exit 1;fiwhile [ $# -ne 0 ] # loop over argumentsdo case $1 in   avg|band|chorus|copy|cut|echo|echos|flanger|highp|lowp|map|mask|phaser|pick|pred|rate|resample|reverb|reverse|split|stat|vibro)     effects="$@"     break     ;;   -c)     shift     fopts="$fopts -c $1"     ;;   -h)     help;     exit 1;     ;;   -r)     shift     fopts="$fopts -r $1"     ;;   -t)     shift     fopts="$fopts -t $1"     ;;   -v)     shift     volume="-v $1"     ;;   -)     filename="-"     ;;   -*)     fopts="$fopts $1"     ;;   *)     if [ "$filename" = "" ]; then       filename="$1"     else       echo "Filename already give.  Ingoring extra name: $1"     fi     ;;   esac   shiftdonearch=`uname -s`echo "Send break (control-c) to end recording"if [ "$arch" = "SunOS" ]; then  case `arch -k` in    sun4|sun4c|sun4d)      # Use below for older Sun audio hardware      sox $volume -t sunau -U -c 1 /dev/audio $fopts $filename $effects      ;;    *)      # Use below for newer Sun audio hardware that supports stereo linear      sox $volume -t sunau -w -s /dev/audio $fopts $filename $effects      ;;  esacelse  if [ "$arch" = "Linux" ]; then# Possible way to set volume#    if [ "$volume" != "" ] ; then#      mixer $volume#    fi    sox $volume -t ossdsp /dev/dsp $fopts $filename $effects  fifi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -