Log in

View Full Version : sox playing wav without waiting on end


nasmeh
30th September 2012, 10:48
Hi

How to use sox command line:
play sound.wav
without waiting on end of sound?

So:
I need in batch file start playing sound without wait to end of sound! Next command in batch file must be executed immediately after STARTing playing sound....

smok3
30th September 2012, 10:53
on win try:
start play sound.wav
next command

for more info:
start /?

---

on bash:
play sound.wav &
next command

nasmeh
30th September 2012, 13:40
this start new DOS window ....ok ....maybe ok :) THANKS for this!
But:
any solution with sox command?

smok3
30th September 2012, 14:04
start /b yourcommand
next command
?

more http://ss64.com/nt/start.html

p.s. dunno about sox playback command.

LoRd_MuldeR
30th September 2012, 16:32
I think without "start /b" this isn't possible. That's because the SoX process must continue in order to do the playback, but it's the shell (cmd.exe) who decides whether it will "block" and wait for the process to terminate (or just go on).

[Well in theory the SoX process could fork off another process to do the actual playback and then terminate itself immediately in order to "fool" the shell, but that would be kind of an ugly workaround]