aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/_flac_common.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-23 23:59:54 +0200
committerMax Kellermann <max@duempel.org>2008-09-23 23:59:54 +0200
commit8bcbe90b250e651fa499524a8c677e19198427a7 (patch)
treee25cf4ea20b028c4ce3296fcc6ed17b966a2df88 /src/inputPlugins/_flac_common.h
parentaac5f4269847e508e01ecc8b99d229185e925659 (diff)
downloadmpd-8bcbe90b250e651fa499524a8c677e19198427a7.tar.gz
mpd-8bcbe90b250e651fa499524a8c677e19198427a7.tar.xz
mpd-8bcbe90b250e651fa499524a8c677e19198427a7.zip
flac: moved code from flacWrite() to _flac_common.c
There is still a lot of duplicated code in flac_plugin.c and oggflac_plugin.c. Move code from flac_plugin.c to _flac_common.c, and use the new function flac_common_write() also in oggflac_plugin.c, porting lots of optimizations over to it.
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/_flac_common.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/inputPlugins/_flac_common.h b/src/inputPlugins/_flac_common.h
index a758a7369..4ca97cae0 100644
--- a/src/inputPlugins/_flac_common.h
+++ b/src/inputPlugins/_flac_common.h
@@ -164,18 +164,9 @@ void flac_error_common_cb(const char *plugin,
struct tag *copyVorbisCommentBlockToMpdTag(const FLAC__StreamMetadata * block,
struct tag *tag);
-/* keep this inlined, this is just macro but prettier :) */
-static inline int flacSendChunk(FlacData * data)
-{
- if (decoder_data(data->decoder, data->inStream,
- 1, data->chunk,
- data->chunk_length, data->time,
- data->bitRate,
- data->replayGainInfo) == DECODE_COMMAND_STOP)
- return -1;
-
- return 0;
-}
+FLAC__StreamDecoderWriteStatus
+flac_common_write(FlacData *data, const FLAC__Frame * frame,
+ const FLAC__int32 *const buf[]);
#endif /* HAVE_FLAC || HAVE_OGGFLAC */