- Read a command from the pipe, rather than reading a file with a command in it. - Use a single ocarina script for all commands, rather than several two line scripts. - Change ocarina.bin to point to ocarina instead of ocarina-player for convenience. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
25 lines
515 B
C++
25 lines
515 B
C++
// Copyright (c) Bryan Schumaker 2012.
|
|
#include <libsaria.h>
|
|
#include <audio.h>
|
|
#include <print.h>
|
|
#include <deck.h>
|
|
|
|
#include <fstream>
|
|
using namespace std;
|
|
|
|
void libsaria::run_cmd(string &cmd)
|
|
{
|
|
if (cmd == "play")
|
|
libsaria::audio::play();
|
|
else if (cmd == "pause")
|
|
libsaria::audio::pause();
|
|
else if (cmd == "stop")
|
|
libsaria::audio::stop();
|
|
else if (cmd == "toggle")
|
|
libsaria::audio::toggle_play();
|
|
else if (cmd == "next")
|
|
libsaria::deck::next();
|
|
else if (cmd == "prev")
|
|
libsaria::deck::prev();
|
|
}
|