aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer_xfade.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* added inline function audio_format_time_to_size()Max Kellermann2008-08-301-1/+1
| | | | | Make the code more readable by hiding big formulas in an inline function with a nice name.
* ringbuf: create a new struct rbvec instead of reusing struct iovecEric Wong2008-08-301-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.
* xfade: gracefully fail on very short xfade timesEric Wong2008-08-231-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
* xfade: copy xfade_time locally to avoid race conditionsEric Wong2008-08-231-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.
* don't crossfade different audio formatsEric Wong2008-08-231-2/+4
| | | | It sounds nasty and we didn't do it before the core-rewrite
* outputBuffer: fix buffer_before_play handlingEric Wong2008-08-231-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.
* core rewrite (decode,player,outputBuffer,playlist)Eric Wong2008-08-161-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.