repo.or.cz
/
io
/
quag.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Making Samples executable. #!/usr/bin/env io and chmod a+x *.io
[io/quag.git]
/
addons
/
SoundTouch
/
samples
/
sndplay.io
blob
a8f988f272eba0b011cd8f6db489f2ce79576af8
1
#!/
usr
/
bin
/
env io
2
3
/*
4
if (?args == nil,
5
write("requires name of sound file as argument")
6
)
7
*/
8
9
s
:=
Sound
clone
setPath
(
Path
with
(
launchPath
,
"sounds/max.wav"
))
load
10
11
AudioDevice
open
12
//
AudioDevice
asyncWrite
(
s buffer
)
13
14
loop
(
15
while
(
AudioDevice
needsData not
,
yield
)
16
writeln
(
"writing"
)
17
AudioDevice
asyncWrite
(
s buffer
)
18
)