diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-04-13 01:16:27 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-04-13 01:16:27 +0000 |
commit | 412ce8bdc48f05963b7ef7eca27d760aff3a8500 (patch) | |
tree | 1d6fffc5adb99c46405fb700650a8d68baa60b6a /src/outputBuffer.h | |
parent | c1963ed483c66e85ac19ce8c3a6dbc6b19ca30c3 (diff) | |
download | mpd-412ce8bdc48f05963b7ef7eca27d760aff3a8500.tar.gz mpd-412ce8bdc48f05963b7ef7eca27d760aff3a8500.tar.xz mpd-412ce8bdc48f05963b7ef7eca27d760aff3a8500.zip |
Make the OutputBuffer API more consistent
We had functions names varied between
outputBufferFoo, fooOutputBuffer, and output_buffer_foo
That was too confusing for my little brain to handle.
And the global variable was somehow named 'cb' instead of
the more obvious 'ob'...
git-svn-id: https://svn.musicpd.org/mpd/trunk@7355 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/outputBuffer.h')
-rw-r--r-- | src/outputBuffer.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/outputBuffer.h b/src/outputBuffer.h index b0287192e..6e9d7c49f 100644 --- a/src/outputBuffer.h +++ b/src/outputBuffer.h @@ -36,14 +36,14 @@ typedef struct _OutputBufferChunk { mpd_uint16 bitRate; float times; char data[CHUNK_SIZE]; -} OutputBufferChunk; +} ob_chunk; /** * A ring set of buffers where the decoder appends data after the end, * and the player consumes data from the beginning. */ typedef struct _OutputBuffer { - OutputBufferChunk *chunks; + ob_chunk *chunks; unsigned int size; @@ -57,45 +57,45 @@ typedef struct _OutputBuffer { ConvState convState; } OutputBuffer; -void initOutputBuffer(unsigned int size); +void ob_init(unsigned int size); -void output_buffer_free(void); +void ob_free(void); -void clearOutputBuffer(void); +void ob_clear(void); -void flushOutputBuffer(void); +void ob_flush(void); /** is the buffer empty? */ -int outputBufferEmpty(void); +int ob_is_empty(void); -void outputBufferShift(void); +void ob_shift(void); /** * what is the position of the specified chunk number, relative to * the first chunk in use? */ -unsigned int outputBufferRelative(const unsigned i); +unsigned int ob_relative(const unsigned i); /** determine the number of decoded chunks */ -unsigned availableOutputBuffer(void); +unsigned ob_available(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 unsigned relative); +int ob_absolute(const unsigned relative); -OutputBufferChunk * outputBufferGetChunk(const unsigned i); +ob_chunk * ob_get_chunk(const unsigned i); /* we send inStream for buffering the inputStream while waiting to send the next chunk */ -int sendDataToOutputBuffer(InputStream * inStream, +int ob_send(InputStream * inStream, int seekable, void *data, size_t datalen, float data_time, mpd_uint16 bitRate, ReplayGainInfo * replayGainInfo); -void output_buffer_skip(unsigned num); +void ob_skip(unsigned num); #endif |