From 0b4dfae22e883d376bc44e1e2d78f201d045970b Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Fri, 10 Oct 2008 14:47:58 +0200
Subject: player: added player_control.audio_format

This replaces the attributes bits, channels, sampleRate.
---
 src/player_thread.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'src/player_thread.c')

diff --git a/src/player_thread.c b/src/player_thread.c
index efb7d7ab5..c5a51a00a 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -62,9 +62,7 @@ static int waitOnDecode(int *decodeWaitedOn)
 
 	pc.totalTime = pc.fileTime;
 	pc.bitRate = 0;
-	pc.sampleRate = 0;
-	pc.bits = 0;
-	pc.channels = 0;
+	audio_format_clear(&pc.audio_format);
 	*decodeWaitedOn = 1;
 
 	return 0;
@@ -253,9 +251,7 @@ static void do_play(void)
 					closeAudioDevice();
 				}
 				pc.totalTime = dc.totalTime;
-				pc.sampleRate = dc.audioFormat.sample_rate;
-				pc.bits = dc.audioFormat.bits;
-				pc.channels = dc.audioFormat.channels;
+				pc.audio_format = dc.audioFormat;
 				sizeToTime = audioFormatSizeToTime(&ob.audioFormat);
 			}
 			else {
-- 
cgit v1.2.3