| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
In 432da18e a dynamic buffer was replaced by a static one but some
frees were accidently left there which caused some segfaults.
|
|
|
|
|
|
|
|
| |
The wavpack open function gives us an option called OPEN_STREAMING. This
provides more robust and error tolerant playback, but it automatically
disables seeking. (More exactly the wavpack lib will not return the
length information.) So, if the stream is already not seekable we can
use this option safely.
|
|
|
|
|
| |
Wavpack plugin doesn't stop decoding if a block couldn't be fully
decoded, rather it tries to go on.
|
| |
|
|
|
|
|
|
| |
mp3 seeking was broken, because the command==SEEK check was never
reached. Swap the command check order (==SEEK before !=NONE) to fix
that.
|
| |
|
| |
|
|
|
|
|
| |
Unfortunately, ov_fopen() is not supported by libvorbis versions older
than 1.2.
|
|
|
|
|
| |
When the buffer was full, but everything was already consumed,
fillAacBuffer() would not attempt to flush and refill it.
|
|
|
|
| |
Allocate the input buffer within the AacBuffer struct.
|
|
|
|
|
|
| |
The aac plugin does not support seeking. Reject SEEK requests by
calling decoder_seek_error(). Quit the plugin's main loop only when
STOP is received.
|
|
|
|
| |
Removed a superfluous decoder_get_command() call.
|
|
|
|
|
|
| |
The audio_format variable is only used and initialized for
decoder_initialized(). Move it into that block to save some bytes on
the stack.
|
|
|
|
|
| |
aac_stream_decode() was basically copy+pasted from aac_decode().
Since stream_decode() can also decode files, eliminate aac_decode().
|
|
|
|
| |
Check whether enough data has been read yet.
|
| |
|
|
|
|
|
| |
If the stream is not seekable, don't try to decode all frames to find
out the total song time.
|
|
|
|
| |
Use input_stream_eof() instead.
|
|
|
|
|
|
|
| |
According to the documentation, mpc_decoder_decode() returns an
mpc_uint32_t. Since the special return value (mpc_uint32_t)-1
translates to a very large long integer, this may cause segmentation
faults if not interpreted properly.
|
|
|
|
| |
Don't hard-code the factor "2".
|
|
|
|
| |
Removed 3 superfluous decoder_get_command() invocations.
|
|
|
|
|
| |
mpc_to_mpd_buffer() converts a whole chunk at a time. This eliminates
3 local variables in mpc_decode().
|
|
|
|
|
|
| |
Don't split the buffer conversion loop. When libmpcdec returns a
chunk, convert and send the whole chunk at a time. This moves several
checks out of the loop, and greatly improves performance.
|
|
|
|
| |
Don't use deprecated MPD libraries.
|
|
|
|
|
| |
The buffer is always casted to int32_t* anyway; declare it as int32_t
array, and remove the cast.
|
|
|
|
|
| |
Since each "eof=true" is followed by "break", the variable is
superfluous.
|
|
|
|
|
| |
Due to an unnoticed merge error, there was a superfluous "}". Remove
it.
|
|
|
|
| |
Move the reponsibility for freeing the file handle to libvorbis.
|
| |
|
|
|
|
| |
Eliminate two decoder_get_command() invocations from the main loop.
|
|
|
|
|
| |
Don't let the buffer grow until it is full, flush it whenever there is
data available.
|
|
|
|
|
|
|
| |
Parse ID3 tags, even when they are in the middle of the stream. Very
few streams provide embedded ID3 tags. Most of them send only
Shoutcast "icy" tags, which limits the practical usefulness of this
patch.
|
|
|
|
|
|
|
| |
When a command is received, decode_next_frame_header() and
decodeNextFrame() return DECODE_BREAK. This is already checked by
both callers, which means that we can eliminate lots of
decoder_get_command() checks.
|
| |
|
|
|
|
|
|
|
|
| |
The stream_decode() and file_decode() methods returned a boolean,
indicating whether they were able to decode the song. This is
redundant, since we already know that: if decoder_initialized() has
been called (and dc.state==DECODE), the plugin succeeded. Change both
methods to return void.
|
|
|
|
|
| |
Having an array instead of individual variables allows the use of the
replay_gain_mode enum as an array index.
|
|
|
|
|
|
| |
The function simplifies wavpack_replaygain(), because it already
contains the float parser, and it works with a fixed buffer instead of
doing expensive heap allocations.
|
|
|
|
| |
This allows us to remove the "static char[]" hack.
|
|
|
|
| |
Some code simplification. Avoid pointers to pointers.
|
|
|
|
| |
Renamed functions and variables.
|
|
|
|
|
|
| |
Instead of having a seprate try_decode() method, let the
stream_decode() and file_decode() methods decide whether they are able
to decode the song.
|
|
|
|
|
|
|
| |
The flac plugin wasn't initialized properly when an OGG file was being
decoded. For some reason, flac_process_metadata() was explicitly not
called for OGG files. Since that seems to fix the issue, make it
always call flac_process_metadata().
|
|
|
|
|
|
|
|
|
| |
Since decoder_list.c does not include the libflac headers, it cannot
know whether to add the oggflac plugin to the decoder list. Solve
this by always enabling the oggflac sub-plugin, even with older
libflac versions. When the libflac API cannot support oggflac,
disable the plugin at runtime by returning "false" from its init()
method.
|
|
|
|
|
|
| |
Wavpack's try_decode() implementation does nothing useful, it only
duplicates code already in stream_decode() / file_decode(), and slows
down MPD.
|
|
|
|
|
| |
Disable flac's "oggflac" sub-plugin when libflac does not support
ogg-flac files.
|
|
|
|
|
|
|
|
|
| |
This patch makes 24-bit samples available for mpd. I tested with the
WavPack Test Suite found on wavpack.com:
http://www.rarewares.org/wavpack/test_suite.zip
Every test file worked fine.
|
|
|
|
|
|
|
|
|
| |
At this moment the wavpack lib doesn't use the return value of the
push_back function, which has an equivalent meaning of the return
value of ungetc(). This is a lucky situation, because so far it
simply returned with 1 as a hard coded value. From now on the
function will return EOF on error. (This function makes exactly one
byte pushable back.)
|
|
|
|
|
| |
A new function has been added to do a cast and a little check in the
wavpack-mpd input stream wrapper.
|
|
|
|
|
| |
I think this makes the code more easily modifiable and prevents some
annoying mistakes.
|