diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-08-16 09:28:15 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-08-16 09:39:32 -0700 |
commit | 44d9f62f34e0561d83ea32941f0ea1b529b1490d (patch) | |
tree | 5345eba046b6e3bcf8c063e7bae8b501b7a99f4a /src/inputPlugins/_flac_common.h | |
parent | f9f70860622613686e6ac0bf7ebd448f437d92a7 (diff) | |
download | mpd-44d9f62f34e0561d83ea32941f0ea1b529b1490d.tar.gz mpd-44d9f62f34e0561d83ea32941f0ea1b529b1490d.tar.xz mpd-44d9f62f34e0561d83ea32941f0ea1b529b1490d.zip |
core rewrite (decode,player,outputBuffer,playlist)
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.
Diffstat (limited to 'src/inputPlugins/_flac_common.h')
-rw-r--r-- | src/inputPlugins/_flac_common.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/inputPlugins/_flac_common.h b/src/inputPlugins/_flac_common.h index 10c2f3d38..5c147a064 100644 --- a/src/inputPlugins/_flac_common.h +++ b/src/inputPlugins/_flac_common.h @@ -165,17 +165,13 @@ MpdTag *copyVorbisCommentBlockToMpdTag(const FLAC__StreamMetadata * block, MpdTag * tag); /* keep this inlined, this is just macro but prettier :) */ -static inline int flacSendChunk(FlacData * data) +static inline enum dc_action flacSendChunk(FlacData * data) { - if (ob_send(data->inStream, - 1, data->chunk, - data->chunk_length, data->time, - data->bitRate, - data->replayGainInfo) == - OUTPUT_BUFFER_DC_STOP) - return -1; - - return 0; + enum dc_action ret = ob_send(data->chunk, data->chunk_length, + data->time, data->bitRate, + data->replayGainInfo); + data->chunk_length = 0; + return ret; } #endif /* HAVE_FLAC || HAVE_OGGFLAC */ |