diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-04-13 01:16:15 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-04-13 01:16:15 +0000 |
commit | c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3 (patch) | |
tree | b8c2ff14310e1e659f509aeae0cf847608af2d5f /src/outputBuffer.h | |
parent | dec6b1612e953c6029d963ff55d2b4a669b60f43 (diff) | |
download | mpd-c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3.tar.gz mpd-c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3.tar.xz mpd-c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3.zip |
Stop passing our single OutputBuffer object everywhere
All of our main singleton data structures are implicitly shared,
so there's no reason to keep passing them around and around in
the stack and making our internal API harder to deal with.
git-svn-id: https://svn.musicpd.org/mpd/trunk@7354 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/outputBuffer.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/outputBuffer.h b/src/outputBuffer.h index 03260e440..b0287192e 100644 --- a/src/outputBuffer.h +++ b/src/outputBuffer.h @@ -57,46 +57,45 @@ typedef struct _OutputBuffer { ConvState convState; } OutputBuffer; -void initOutputBuffer(OutputBuffer * cb, unsigned int size); +void initOutputBuffer(unsigned int size); -void output_buffer_free(OutputBuffer * cb); +void output_buffer_free(void); -void clearOutputBuffer(OutputBuffer * cb); +void clearOutputBuffer(void); -void flushOutputBuffer(OutputBuffer * cb); +void flushOutputBuffer(void); /** is the buffer empty? */ -int outputBufferEmpty(const OutputBuffer * cb); +int outputBufferEmpty(void); -void outputBufferShift(OutputBuffer * cb); +void outputBufferShift(void); /** * what is the position of the specified chunk number, relative to * the first chunk in use? */ -unsigned int outputBufferRelative(const OutputBuffer * cb, unsigned i); +unsigned int outputBufferRelative(const unsigned i); /** determine the number of decoded chunks */ -unsigned availableOutputBuffer(const OutputBuffer * cb); +unsigned availableOutputBuffer(void); /** * Get the absolute index of the nth used chunk after the first one. * Returns -1 if there is no such chunk. */ -int outputBufferAbsolute(const OutputBuffer * cb, unsigned relative); +int outputBufferAbsolute(const unsigned relative); -OutputBufferChunk * outputBufferGetChunk(const OutputBuffer * cb, unsigned i); +OutputBufferChunk * outputBufferGetChunk(const unsigned i); /* we send inStream for buffering the inputStream while waiting to send the next chunk */ -int sendDataToOutputBuffer(OutputBuffer * cb, - InputStream * inStream, +int sendDataToOutputBuffer(InputStream * inStream, int seekable, void *data, size_t datalen, float data_time, mpd_uint16 bitRate, ReplayGainInfo * replayGainInfo); -void output_buffer_skip(OutputBuffer * cb, unsigned num); +void output_buffer_skip(unsigned num); #endif |