2019-11-16 22:30:24 +00:00
|
|
|
# afplay
|
|
|
|
|
|
|
|
> Command-line audio player.
|
2021-08-23 20:33:24 +01:00
|
|
|
> More information: <https://ss64.com/osx/afplay.html>.
|
2019-11-16 22:30:24 +00:00
|
|
|
|
|
|
|
- Play a sound file (waits until playback ends):
|
|
|
|
|
|
|
|
`afplay {{path/to/file}}`
|
|
|
|
|
|
|
|
- Play a sound file at 2x speed (playback rate):
|
|
|
|
|
2020-10-12 22:00:27 +01:00
|
|
|
`afplay --rate {{2}} {{path/to/file}}`
|
2019-11-16 22:30:24 +00:00
|
|
|
|
|
|
|
- Play a sound file at half speed:
|
|
|
|
|
2020-10-12 22:00:27 +01:00
|
|
|
`afplay --rate {{0.5}} {{path/to/file}}`
|
2019-11-16 22:30:24 +00:00
|
|
|
|
|
|
|
- Play the first N seconds of a sound file:
|
|
|
|
|
|
|
|
`afplay --time {{seconds}} {{path/to/file}}`
|