git-svn-id: svn://elaine/murooma/trunk@102 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
(no author) 2014-07-27 11:31:24 +00:00
parent 2ab66e9b62
commit 88cbbec472
2 changed files with 20 additions and 1 deletions

View file

@ -1,6 +1,6 @@
VERSION = 0.01 VERSION = 0.01
CC = /usr/bin/g++ CC = /usr/bin/g++
CFLAGS = -std=gnu++0x -Bstatic -lzmq -Wall -g -O3 -D_REENTRANT -DVERSION=\"$(VERSION)\" -Bdynamic CFLAGS = -std=gnu++0x -Wall -g -O3 -D_REENTRANT -DVERSION=\"$(VERSION)\"
LDFLAGS = -lrt -lzmq -lpthread -lportaudio LDFLAGS = -lrt -lzmq -lpthread -lportaudio
OBJ_SERVER = server.o OBJ_SERVER = server.o

View file

@ -153,6 +153,25 @@ int main (int argc, char *argv[])
stream->setBufferLen(bufferMs); stream->setBufferLen(bufferMs);
initAudio(); initAudio();
std::thread playerThread(player); std::thread playerThread(player);
std::string cmd;
while (true)
{
std::cout << "> ";
std::getline(std::cin, cmd);
// line = fgets( str, 256, stdin );
// if (line == NULL)
// continue;
// std::string cmd(line);
std::cerr << "CMD: " << cmd << "\n";
if (cmd == "quit")
break;
else
{
stream->setBufferLen(atoi(cmd.c_str()));
}
}
playerThread.join(); playerThread.join();
return 0; return 0;