aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer_xfade.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-08-30added inline function audio_format_time_to_size()Max Kellermann1-1/+1
Make the code more readable by hiding big formulas in an inline function with a nice name.
2008-08-30ringbuf: create a new struct rbvec instead of reusing struct iovecEric Wong1-4/+4
Using struct iovec means having to cast iov_base everywhere we want to do pointer arithmetic. Instead, just use rbvec which can be safely casted to iovec whenever we use the readv/writev functions.
2008-08-23xfade: gracefully fail on very short xfade timesEric Wong1-1/+2
It's possible to calculate an impossibly small value that we don't have a chance to xfade. Don't die if we can't find the boundary to start crossfading on
2008-08-23xfade: copy xfade_time locally to avoid race conditionsEric Wong1-2/+5
ob.xfade_time can be changed by the main process without locking, so copy the float value into a local variable and recheck the local variable for zero before continuing.
2008-08-23don't crossfade different audio formatsEric Wong1-2/+4
It sounds nasty and we didn't do it before the core-rewrite
2008-08-23outputBuffer: fix buffer_before_play handlingEric Wong1-25/+20
buffer_before_play is a prebuffer; always respecting it is almost as good as having no buffer at all. So we only respect it when we haven't played anything. Bugs that were a side effect of this also got fixed: The player would not stop when we got to the end of the last song on non-repeating playlists. The playlist would continuously show the song in the last few seconds of playback, and never move. Having crossfade enabled would also amplify the above effect. So, as a side effect, crossfade now correctly handles end-of-playlist conditions, as well. It will fade out to silence when we're at the end of a playlist.
2008-08-16core rewrite (decode,player,outputBuffer,playlist)Eric Wong1-0/+105
This is a huge refactoring of the core mpd process. The queueing/buffering mechanism is heavily reworked. The player.c code has been merged into outputBuffer (the actual ring buffering logic is handled by ringbuf.c); and decode.c actually handles decoding stuff. The end result is several hundreds of lines shorter, even though we still have a lot of DEBUG statements left in there for tracing and a lot of assertions, too.