tips

来自「Windows NT声卡驱动VXD」· 代码 · 共 72 行

TXT
72
字号
Playing back "other" sound formats:-----------------------------------The esdplay utility can be used to play a variety of audio files.However, it can't play everything.  The sox utility understandsmany more types of audio files.The sound utility, sox, can be used with esd in primarily two ways.Method 1:  use sox to convert the file format ahead of time.Method 2:  use sox to generate output on stdout, and pipe into esdcatFor accurate playback using either method, be sure to match the audio format (size/signedness of data, number of channels, and sample rate) between sox and esd.  Converting mono to stereo, orchanging the sampling rate with sox is probably not necessary forlive playback, as it will have little effect on sound quality, and merely chew up additional CPU.  For example to play back a samplethat was recorded in Sun audio format (.au), mono, at 8000 Hz, usingesdcat, type the following:sox sample.au -c 1 -r 8000 -t ub - | esdcat -b -m -r 8000sox arguments: 	-t ub	= data type unsigned byte		-c 1 	= mono		-r 8000 = sample rate 8000 Hz		-	= output fileesdcat arguments: -b	= data type unsigned byte		-m	= mono		-r 8000	= sample rate 8000 HzCurrently, esd only supports unsigned byte, and signed word data types.Playing back mp3 files:-----------------------From Wayne Johnson,mpg123 -s sample.mp3 | esdcatNOTE: recent versions of mpg123 support esd directly.Type "make" to see possible executable varieties.Checking recording capabilities:--------------------------------To make sure the recoding works, try this WITHOUT esd running:dd bs=8k count=4 </dev/audio > sample.auCthugha - An Oscilloscope on Acid---------------------------------version 1.2:    esd    xcthugha --listen    esdmon > /tmp/cthugha.comNOTE: xcthugha may complain about:Can't open `/dev/dsp' for writing. (16 - Device or resource busy)No problem, keep on truckin'. esd gets the sound device, and cthugha gets the data it needs.version 1.3:    mkfifo /tmp/cthugha.esd     xcthugha --play /tmp/cthugha.esd --silent &    esdmon > /tmp/cthugha.esd

⌨️ 快捷键说明

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