[player] Cleanup: player clock is the only sync-source available

This commit is contained in:
chme 2016-06-11 10:37:09 +02:00
parent 3527113a9b
commit a9a656042b
1 changed files with 2 additions and 26 deletions

View File

@ -125,12 +125,6 @@ struct player_source
struct player_source *play_next; struct player_source *play_next;
}; };
enum player_sync_source
{
PLAYER_SYNC_CLOCK,
PLAYER_SYNC_LAUDIO,
};
struct volume_param { struct volume_param {
int volume; int volume;
uint64_t spk_id; uint64_t spk_id;
@ -259,9 +253,6 @@ static struct timespec packet_time = { 0, AIRTUNES_V2_STREAM_PERIOD };
// Will be positive if we need to skip some source reads (see below) // Will be positive if we need to skip some source reads (see below)
static int ticks_skip; static int ticks_skip;
/* Sync source */
static enum player_sync_source pb_sync_source;
/* Sync values */ /* Sync values */
static struct timespec pb_pos_stamp; static struct timespec pb_pos_stamp;
static uint64_t pb_pos; static uint64_t pb_pos;
@ -391,8 +382,8 @@ speaker_deselect_output(struct output_device *device)
} }
static int int
player_get_current_pos_clock(uint64_t *pos, struct timespec *ts, int commit) player_get_current_pos(uint64_t *pos, struct timespec *ts, int commit)
{ {
uint64_t delta; uint64_t delta;
int ret; int ret;
@ -434,21 +425,6 @@ player_get_current_pos_clock(uint64_t *pos, struct timespec *ts, int commit)
return 0; return 0;
} }
int
player_get_current_pos(uint64_t *pos, struct timespec *ts, int commit)
{
switch (pb_sync_source)
{
case PLAYER_SYNC_CLOCK:
return player_get_current_pos_clock(pos, ts, commit);
default:
DPRINTF(E_LOG, L_PLAYER, "Bug! player_get_current_pos called with unknown source\n");
}
return -1;
}
static int static int
pb_timer_start(void) pb_timer_start(void)
{ {