Skip to content

Instantly share code, notes, and snippets.

@7cc
Created March 20, 2018 10:57
Show Gist options
  • Select an option

  • Save 7cc/6e73c2b8acadd22afe43936f7b61820b to your computer and use it in GitHub Desktop.

Select an option

Save 7cc/6e73c2b8acadd22afe43936f7b61820b to your computer and use it in GitHub Desktop.
windows cmd sound
mpv --force-window=no "sound.wav"

ffplay -nodisp -autoexit "sound.wav"

powershell.exe -Command
(New-Object Media.SoundPlayer("sound.wav")).PlaySync()

$sound = (New-Object Media.SoundPlayer("sound.wav"))
$sound.PlaySync()

標準の機能では、wavしか再生できない。   swavplayerは重いのでmpv, ffplay

何度もexeを起動させる負担が大きい。nodeから操作できるのか未調査。 https://github.com/dnaf/node-ffplay/blob/master/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment