renamed player to alsaPlayer

git-svn-id: svn://elaine/murooma/trunk@295 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
(no author) 2014-09-25 06:09:05 +00:00
parent dd263b9c8a
commit 35fead6ac0
4 changed files with 5 additions and 5 deletions

View file

@ -3,7 +3,7 @@ CC = /usr/bin/g++
CFLAGS = -std=gnu++0x -Wall -Wno-unused-function -O3 -D_REENTRANT -DVERSION=\"$(VERSION)\" -I.. CFLAGS = -std=gnu++0x -Wall -Wno-unused-function -O3 -D_REENTRANT -DVERSION=\"$(VERSION)\" -I..
LDFLAGS = -lrt -lpthread -lboost_system -lboost_program_options -lasound -logg -lvorbis -lvorbisenc LDFLAGS = -lrt -lpthread -lboost_system -lboost_program_options -lasound -logg -lvorbis -lvorbisenc
OBJ = snapClient.o stream.o player.o clientConnection.o timeProvider.o oggDecoder.o pcmDecoder.o controller.o ../message/pcmChunk.o ../common/log.o ../message/sampleFormat.o OBJ = snapClient.o stream.o alsaPlayer.o clientConnection.o timeProvider.o oggDecoder.o pcmDecoder.o controller.o ../message/pcmChunk.o ../common/log.o ../message/sampleFormat.o
BIN = snapclient BIN = snapclient
all: client all: client

View file

@ -1,4 +1,4 @@
#include "player.h" #include "alsaPlayer.h"
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
#include <iostream> #include <iostream>

View file

@ -5,7 +5,7 @@
#include <unistd.h> #include <unistd.h>
#include "oggDecoder.h" #include "oggDecoder.h"
#include "pcmDecoder.h" #include "pcmDecoder.h"
#include "player.h" #include "alsaPlayer.h"
#include "timeProvider.h" #include "timeProvider.h"
#include "message/serverSettings.h" #include "message/serverSettings.h"
#include "message/timeMsg.h" #include "message/timeMsg.h"
@ -101,11 +101,11 @@ void Controller::worker()
{ {
double latency = (reply->received.sec - reply->sent.sec) + (reply->received.usec - reply->sent.usec) / 1000000.; double latency = (reply->received.sec - reply->sent.sec) + (reply->received.usec - reply->sent.usec) / 1000000.;
TimeProvider::getInstance().setDiffToServer((reply->latency - latency) * 1000 / 2); TimeProvider::getInstance().setDiffToServer((reply->latency - latency) * 1000 / 2);
cout << TimeProvider::sinceEpoche<chronos::usec>(chronos::hrc::now()).count() << "\n"; /*cout << TimeProvider::sinceEpoche<chronos::usec>(chronos::hrc::now()).count() << "\n";
cout << TimeProvider::sinceEpoche<chronos::msec>(TimeProvider::now()).count() << "\n"; cout << TimeProvider::sinceEpoche<chronos::msec>(TimeProvider::now()).count() << "\n";
cout << TimeProvider::sinceEpoche<chronos::msec>(TimeProvider::serverNow()).count() << "\n"; cout << TimeProvider::sinceEpoche<chronos::msec>(TimeProvider::serverNow()).count() << "\n";
cout << "Received: " << TimeProvider::sinceEpoche<chronos::msec>(TimeProvider::toTimePoint(reply->received)).count() << "\n\n"; cout << "Received: " << TimeProvider::sinceEpoche<chronos::msec>(TimeProvider::toTimePoint(reply->received)).count() << "\n\n";
usleep(1000); */ usleep(1000);
} }
} }