Play recorded sounds: Difference between revisions

Content added Content deleted
(julia example)
Line 322: Line 322:
push!(args, "trim", string(tstart), string(tend))
push!(args, "trim", string(tstart), string(tend))
end
end
run(`play $args`)
playprocess = run(`play $args`; wait=false)
clearfornew()
clearfornew()
end
end
Line 333: Line 333:
filenames = fill("", numfiles)
filenames = fill("", numfiles)
filedurations = zeros(numfiles)
filedurations = zeros(numfiles)
playprocess = @async(0)
foreach(i -> set_gtk_property!(filebutton[i], :label, "Select File $i"), 1:numfiles)
foreach(i -> set_gtk_property!(filebutton[i], :label, "Select File $i"), 1:numfiles)
set_gtk_property!(GtkAdjustment(repeats), :value, 0)
set_gtk_property!(GtkAdjustment(repeats), :value, 0)
Line 339: Line 338:
end
end
killplay() = @async(thowto(playprocess, DomainError()))
killplay(w) = kill(playprocess)


playsimul(w) = play(true)
playsimul(w) = play(true)
Line 359: Line 358:
recordingplayerapp()
recordingplayerapp()
</lang>
</lang>



=={{header|Mathematica}}==
=={{header|Mathematica}}==