From ffd461044ea722382a7f2714d127cb88c6c2721a Mon Sep 17 00:00:00 2001 From: lion187 Date: Fri, 18 Jan 2019 17:46:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6=20Arecord?= =?UTF-8?q?=5F=E4=BD=BF=E7=94=A8=E5=B8=AE=E5=8A=A9.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Software/Application/ALSA/Arecord_使用帮助.md | 65 ++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/Software/Application/ALSA/Arecord_使用帮助.md b/Software/Application/ALSA/Arecord_使用帮助.md index 71b198d..2d9ce49 100644 --- a/Software/Application/ALSA/Arecord_使用帮助.md +++ b/Software/Application/ALSA/Arecord_使用帮助.md @@ -1 +1,64 @@ -# Arecord_使用帮助 \ No newline at end of file +# Arecord_使用帮助 + +使用示例如下: + + arecord -D default:CARD=mcasp0 -d 100000 -f cd -t raw mysong15.raw + arecord -D default:CARD=mcasp0 -d 100000 -f dat -t raw mysong10.raw + arecord -D default:CARD=mcasp0 -d 100000 -f S16_LE -r 16000 -t raw mysong10.raw + arecord -Dhw:0,1 -r8000 -f cd /a/1.wmv + arecord -Dhw:0,0 -r8000 -f S16_LE -c 1 -t wav 1.wav + arecord -Dhw:0,2 -r48000 -f S32_LE -c 2 -t wav 2.wav + +帮助说明如下: + +```sh +arecord -h +Usage: arecord [OPTION]... [FILE]... + +-h, --help help + --version print current version +-l, --list-devices list all soundcards and digital audio devices +-L, --list-pcms list device names +-D, --device=NAME select PCM by name +-q, --quiet quiet mode +-t, --file-type TYPE file type (voc, wav, raw or au) +-c, --channels=# channels +-f, --format=FORMAT sample format (case insensitive) +-r, --rate=# sample rate +-d, --duration=# interrupt after # seconds +-M, --mmap mmap stream +-N, --nonblock nonblocking mode +-F, --period-time=# distance between interrupts is # microseconds +-B, --buffer-time=# buffer duration is # microseconds + --period-size=# distance between interrupts is # frames + --buffer-size=# buffer duration is # frames +-A, --avail-min=# min available space for wakeup is # microseconds +-R, --start-delay=# delay for automatic PCM start is # microseconds + (relative to buffer size if <= 0) +-T, --stop-delay=# delay for automatic PCM stop is # microseconds from xrun +-v, --verbose show PCM structure and setup (accumulative) +-V, --vumeter=TYPE enable VU meter (TYPE: mono or stereo) +-I, --separate-channels one file for each channel +-i, --interactive allow interactive operation from stdin +-m, --chmap=ch1,ch2,.. Give the channel map to override or follow + --disable-resample disable automatic rate resample + --disable-channels disable automatic channel conversions + --disable-format disable automatic format conversions + --disable-softvol disable software volume control (softvol) + --test-position test ring buffer position + --test-coef=# test coefficient for ring buffer position (default 8) + expression for validation is: coef * (buffer_size / 2) + --test-nowait do not wait for ring buffer - eats whole CPU + --max-file-time=# start another output file when the old file has recorded + for this many seconds + --process-id-file write the process ID here + --use-strftime apply the strftime facility to the output file name + --dump-hw-params dump hw_params of the device + --fatal-errors treat all errors as fatal +認可的取樣格式是︰ S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE U18_3BE G723_24 G723_24_1B G723_40 G723_40_1B DSD_U8 DSD_U16_LE DSD_U32_LE DSD_U16_BE DSD_U32_BE +有部份可能選取的硬體不提供 +The available format shortcuts are: +-f cd (16 bit little endian, 44100, stereo) +-f cdr (16 bit big endian, 44100, stereo) +-f dat (16 bit little endian, 48000, stereo) +```