aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_thread.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-02 16:55:43 +0100
committerMax Kellermann <max@duempel.org>2008-11-02 16:55:43 +0100
commit8b1f6ff3c8ed06ef469d29b4a691dc4776a3db82 (patch)
tree1f54932ea014cf5ef97b2c298e2051bbd4fbb22e /src/player_thread.c
parent30fca5e5a9c26bf73a24ae5710f8d9d21be49011 (diff)
downloadmpd-8b1f6ff3c8ed06ef469d29b4a691dc4776a3db82.tar.gz
mpd-8b1f6ff3c8ed06ef469d29b4a691dc4776a3db82.tar.xz
mpd-8b1f6ff3c8ed06ef469d29b4a691dc4776a3db82.zip
decoder: replaced music_pipe.audioFormat with dc.out_audio_format
.. and rename dc.audioFormat to dc.in_audio_format. The music pipe does not need to know the audio format, and its former "audioFormat" property indicated the format of the most recently added chunk, which might be confusing when you are reading the oldest chunks.
Diffstat (limited to '')
-rw-r--r--src/player_thread.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index 733d7ea41..e1f11652e 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -288,7 +288,7 @@ static void do_play(void)
else if (!decoder_is_starting()) {
/* the decoder is ready and ok */
player.decoder_starting = false;
- if (!openAudioDevice(&ob.audioFormat)) {
+ if (!openAudioDevice(&dc.out_audio_format)) {
char tmp[MPD_PATH_MAX];
assert(dc.next_song == NULL || dc.next_song->url != NULL);
pc.errored_song = dc.next_song;
@@ -303,9 +303,9 @@ static void do_play(void)
closeAudioDevice();
pc.totalTime = dc.totalTime;
- pc.audio_format = dc.audioFormat;
- play_audio_format = ob.audioFormat;
- sizeToTime = audioFormatSizeToTime(&ob.audioFormat);
+ pc.audio_format = dc.in_audio_format;
+ play_audio_format = dc.out_audio_format;
+ sizeToTime = audioFormatSizeToTime(&dc.out_audio_format);
}
else {
/* the decoder is not yet ready; wait
@@ -341,7 +341,7 @@ static void do_play(void)
for it */
crossFadeChunks =
cross_fade_calc(pc.crossFade, dc.totalTime,
- &(ob.audioFormat),
+ &dc.out_audio_format,
ob.size -
pc.buffered_before_play);
if (crossFadeChunks > 0) {
@@ -378,7 +378,7 @@ static void do_play(void)
music_pipe_set_lazy(true);
cross_fade_apply(beginChunk,
music_pipe_get_chunk(nextChunk),
- &(ob.audioFormat),
+ &dc.out_audio_format,
fadePosition,
crossFadeChunks);
} else {