2025-03-14 21:59:59 -06:00
|
|
|
# afplay
|
|
|
|
|
|
|
|
|
|
> Command-line audio player.
|
|
|
|
|
> More information: <https://keith.github.io/xcode-man-pages/afplay.1.html>.
|
|
|
|
|
|
|
|
|
|
- Play a sound file (waits until playback ends):
|
|
|
|
|
|
|
|
|
|
`afplay {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- Play a sound file at 2x speed (playback rate):
|
|
|
|
|
|
|
|
|
|
`afplay --rate {{2}} {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- Play a sound file at half speed:
|
|
|
|
|
|
|
|
|
|
`afplay --rate {{0.5}} {{path/to/file}}`
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
- Play the first `n` seconds of a sound file:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`afplay --time {{n}} {{path/to/file}}`
|