最終更新:2023-02-14 (火) 10:09:41 (438d)
aplay
Top / aplay
command-line sound recorder and player for ALSA soundcard driver
デフォルト | |||
aplay -t | type | voc,wav,raw,au | |
aplay -f | format | S8,U8,S16_LE... | |
aplay -c? | channels | 1~32 | 1 |
aplay -r? | rate | 2000~192000 | 8000 |
help
Usage: aplay [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 -s, --samples=# interrupt after # samples per channel -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 Recognized sample formats are: 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 S20_LE S20_BE U20_LE U20_BE 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 Some of these may not be available on selected hardware 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)
aplay -l
- list all soundcards and digital audio devices
Raspberry Pi OS
**** List of PLAYBACK Hardware Devices **** card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1] Subdevices: 4/4 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones] Subdevices: 4/4 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3
aplay -L
- list device names
Ubuntu 20.04.5
default Playback/recording through the PulseAudio sound server sysdefault Default Audio Device surround21 2.1 Surround output to Front and Subwoofer speakers surround40 4.0 Surround output to Front and Rear speakers surround41 4.1 Surround output to Front, Rear and Subwoofer speakers surround50 5.0 Surround output to Front, Center and Rear speakers surround51 5.1 Surround output to Front, Center, Rear and Subwoofer speakers null Discard all samples (playback) or generate zero samples (capture) samplerate Rate Converter Plugin Using Samplerate Library speexrate Rate Converter Plugin Using Speex Resampler jack JACK Audio Connection Kit oss Open Sound System pulse PulseAudio Sound Server upmix Plugin for channel upmix (4,6,8) vdownmix Plugin for channel downmix (stereo) with a simple spacialization sysdefault:CARD=I82801AAICH Intel 82801AA-ICH, Intel 82801AA-ICH Default Audio Device front:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH Front speakers surround21:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH 4.0 Surround output to Front and Rear speakers surround41:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH 5.1 Surround output to Front, Center, Rear and Subwoofer speakers iec958:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH IEC958 (S/PDIF) Digital Audio Output dmix:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH Direct sample mixing device dsnoop:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH Direct sample snooping device hw:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH Direct hardware device without any conversions plughw:CARD=I82801AAICH,DEV=0 Intel 82801AA-ICH, Intel 82801AA-ICH Hardware device with all software conversions usbstream:CARD=I82801AAICH Intel 82801AA-ICH USB Stream Output
Raspberry Pi OS
null Discard all samples (playback) or generate zero samples (capture) default output sysdefault:CARD=b1 bcm2835 HDMI 1, bcm2835 HDMI 1 Default Audio Device dmix:CARD=b1,DEV=0 bcm2835 HDMI 1, bcm2835 HDMI 1 Direct sample mixing device dsnoop:CARD=b1,DEV=0 bcm2835 HDMI 1, bcm2835 HDMI 1 Direct sample snooping device hw:CARD=b1,DEV=0 bcm2835 HDMI 1, bcm2835 HDMI 1 Direct hardware device without any conversions plughw:CARD=b1,DEV=0 bcm2835 HDMI 1, bcm2835 HDMI 1 Hardware device with all software conversions sysdefault:CARD=Headphones bcm2835 Headphones, bcm2835 Headphones Default Audio Device dmix:CARD=Headphones,DEV=0 bcm2835 Headphones, bcm2835 Headphones Direct sample mixing device dsnoop:CARD=Headphones,DEV=0 bcm2835 Headphones, bcm2835 Headphones Direct sample snooping device hw:CARD=Headphones,DEV=0 bcm2835 Headphones, bcm2835 Headphones Direct hardware device without any conversions plughw:CARD=Headphones,DEV=0 bcm2835 Headphones, bcm2835 Headphones Hardware device with all software conversions