diff options
Diffstat (limited to 'src/player_control.c')
-rw-r--r-- | src/player_control.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/player_control.c b/src/player_control.c index bef19917f..e27052a4d 100644 --- a/src/player_control.c +++ b/src/player_control.c @@ -129,19 +129,17 @@ void playerSetPause(int pause_flag) } } -int getPlayerElapsedTime(void) -{ - return (int)(pc.elapsed_time + 0.5); -} - -unsigned long getPlayerBitRate(void) +void +pc_get_status(struct player_status *status) { - return pc.bit_rate; -} + status->state = pc.state; -int getPlayerTotalTime(void) -{ - return (int)(pc.total_time + 0.5); + if (pc.state != PLAYER_STATE_STOP) { + status->bit_rate = pc.bit_rate; + status->audio_format = pc.audio_format; + status->total_time = pc.total_time; + status->elapsed_time = pc.elapsed_time; + } } enum player_state getPlayerState(void) |