mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-22 21:46:15 +02:00
renamed player to alsaPlayer
git-svn-id: svn://elaine/murooma/trunk@295 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
dd263b9c8a
commit
35fead6ac0
4 changed files with 5 additions and 5 deletions
|
@ -3,7 +3,7 @@ CC = /usr/bin/g++
|
|||
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
|
||||
|
||||
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
|
||||
|
||||
all: client
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "player.h"
|
||||
#include "alsaPlayer.h"
|
||||
#include <alsa/asoundlib.h>
|
||||
#include <iostream>
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
#include <unistd.h>
|
||||
#include "oggDecoder.h"
|
||||
#include "pcmDecoder.h"
|
||||
#include "player.h"
|
||||
#include "alsaPlayer.h"
|
||||
#include "timeProvider.h"
|
||||
#include "message/serverSettings.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.;
|
||||
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::serverNow()).count() << "\n";
|
||||
cout << "Received: " << TimeProvider::sinceEpoche<chronos::msec>(TimeProvider::toTimePoint(reply->received)).count() << "\n\n";
|
||||
usleep(1000);
|
||||
*/ usleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue