- 12 Nov, 2008 14 commits
-
-
Max Kellermann authored
Removed a superfluous decoder_get_command() call.
-
Max Kellermann authored
The audio_format variable is only used and initialized for decoder_initialized(). Move it into that block to save some bytes on the stack.
-
Max Kellermann authored
aac_stream_decode() was basically copy+pasted from aac_decode(). Since stream_decode() can also decode files, eliminate aac_decode().
-
Max Kellermann authored
Check whether enough data has been read yet.
-
Max Kellermann authored
-
Max Kellermann authored
If the stream is not seekable, don't try to decode all frames to find out the total song time.
-
Max Kellermann authored
Use input_stream_eof() instead.
-
Max Kellermann authored
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.
-
Max Kellermann authored
Don't hard-code the factor "2".
-
Max Kellermann authored
Removed 3 superfluous decoder_get_command() invocations.
-
Max Kellermann authored
mpc_to_mpd_buffer() converts a whole chunk at a time. This eliminates 3 local variables in mpc_decode().
-
Max Kellermann authored
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.
-
Max Kellermann authored
Don't use deprecated MPD libraries.
-
Max Kellermann authored
The buffer is always casted to int32_t* anyway; declare it as int32_t array, and remove the cast.
-
- 11 Nov, 2008 26 commits
-
-
Max Kellermann authored
Since each "eof=true" is followed by "break", the variable is superfluous.
-
Max Kellermann authored
Due to an unnoticed merge error, there was a superfluous "}". Remove it.
-
Max Kellermann authored
Move the reponsibility for freeing the file handle to libvorbis.
-
Max Kellermann authored
-
Max Kellermann authored
decoder_file_decode() should check for plugin->file_decode, not plugin->stream_decode().
-
Max Kellermann authored
Eliminate two decoder_get_command() invocations from the main loop.
-
Max Kellermann authored
Don't let the buffer grow until it is full, flush it whenever there is data available.
-
Max Kellermann authored
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.
-
Max Kellermann authored
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.
-
Max Kellermann authored
When a tag is updated, the old tag was freed before the new one was created. Reverse the order to be sure that other threads always see a valid pointer. This still leaves a possible race condition, but it will be addressed later.
-
Max Kellermann authored
When the tag of the current song changes (e.g. a new tag was sent in the stream), update the playlist, so clients pick up the new tag.
-
Max Kellermann authored
-
Max Kellermann authored
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.
-
Max Kellermann authored
os_compat.h is deprecated and should be replaced with well-defined standard headers.
-
Max Kellermann authored
Eliminated deprecated libraries.
-
Max Kellermann authored
The currently replay_gain_apply() implementation duplicates code from pcm_volume(), except that it uses a floating point scale. Eliminate all duplicated code from and make it utilize the pcm_volume() library function. This introduces replay gain support for 24 bit audio.
-
Max Kellermann authored
Allow pcm_volume() to increase volume.
-
Max Kellermann authored
It may be desirable to change the range of integer volume levels (e.g. to 1024, which may utilize shifts instead of expensive integer divisions). Introduce the constant PCM_VOLUME_1 which describes the integer value for "100% volume". This is currently 1000.
-
Max Kellermann authored
-
Max Kellermann authored
Having an array instead of individual variables allows the use of the replay_gain_mode enum as an array index.
-
Max Kellermann authored
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.
-
Max Kellermann authored
This allows us to remove the "static char[]" hack.
-
Max Kellermann authored
Some code simplification. Avoid pointers to pointers.
-
Max Kellermann authored
Prefer C enums over CPP macros.
-
Max Kellermann authored
The author's name is already mentioned in the copyright declaration.
-
Max Kellermann authored
Renamed functions and variables.
-