mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-06 21:44:04 +09:00
17 lines
428 B
JavaScript
17 lines
428 B
JavaScript
const taud = require("taud")
|
|
|
|
const fullFilePath = _G.shell.resolvePathInput(exec_args[1])
|
|
if (fullFilePath === undefined) {
|
|
println(`Usage: ${exec_args[0]} path_to.taud`)
|
|
return 1
|
|
}
|
|
|
|
const PLAYHEAD = 0
|
|
|
|
println("Playing "+fullFilePath.full)
|
|
|
|
taud.uploadTaudFile(fullFilePath.full, 0, PLAYHEAD)
|
|
audio.setMasterVolume(PLAYHEAD, 255)
|
|
audio.setMasterPan(PLAYHEAD, 128)
|
|
audio.setCuePosition(PLAYHEAD, 0)
|
|
audio.play(PLAYHEAD) |