libsaria: Recognize a "pause" command
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
bba2989866
commit
838b2b3d8f
|
@ -13,6 +13,8 @@ static void run_cmd(ifstream &in, string &file)
|
|||
|
||||
if (cmd == "play")
|
||||
libsaria::audio::play();
|
||||
else if (cmd == "pause")
|
||||
libsaria::audio::pause();
|
||||
}
|
||||
|
||||
void libsaria::read_piped_file(string &file)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
. %LIB/functions
|
||||
write_to_pipe "pause"
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
. `dirname $0`/../lib/ocarina/functions
|
||||
. %LIB/functions
|
||||
write_to_pipe "play"
|
||||
|
|
|
@ -5,6 +5,8 @@ Import( "env", "DEBUG" )
|
|||
bin = "../bin/%s"
|
||||
lib = "../lib/ocarina/%s"
|
||||
|
||||
LIBDIR="`dirname $0`/../lib/ocarina/"
|
||||
|
||||
def create_script(target, source, env):
|
||||
dst = str(target[0].rfile())
|
||||
src = str(source[0].rfile())
|
||||
|
@ -12,6 +14,7 @@ def create_script(target, source, env):
|
|||
f = open(dst, "w");
|
||||
for line in open(src):
|
||||
line = line.replace("%APP", "ocarina")
|
||||
line = line.replace("%LIB", LIBDIR)
|
||||
line = line.replace("%DEBUG", str(DEBUG))
|
||||
f.write(line)
|
||||
f.close()
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
%%OCARINA%%-write-pipe "pause"
|
Loading…
Reference in New Issue