- 11 Nov, 2008 22 commits
-
-
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.
-
Max Kellermann authored
No CamelCase file names.
-
Max Kellermann authored
The assertion on dc.state in decoder_read() was too strict: when a decoder tried to call decoder_read() from tag_dup(), the decoder state was NONE. Allow this special case.
-
- 10 Nov, 2008 7 commits
-
-
Max Kellermann authored
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.
-
Max Kellermann authored
When a plugin is unable to decode a song, try the other plugins.
-
Max Kellermann authored
Added lots of assertions to the wrapper functions.
-
Max Kellermann authored
Added a lot of assertions checking the state of the decoder plugin.
-
Max Kellermann authored
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().
-
Max Kellermann authored
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.
-
Max Kellermann authored
The "oggflac" plugin was enabled only if HAVE_FLAC_COMMON was defined. HAVE_FLAC_COMMON however is only an automake variable, and is never available in decoder_list.c. Make decoder_list.c depend on HAVE_FLAC||HAVE_OGGFLAC instead.
-
- 09 Nov, 2008 4 commits
-
-
Daniel Schömer authored
-
Max Kellermann authored
Updated documentation on the stream_decode() and file_decode() return values.
-
Max Kellermann authored
Wavpack's try_decode() implementation does nothing useful, it only duplicates code already in stream_decode() / file_decode(), and slows down MPD.
-
Max Kellermann authored
Disable flac's "oggflac" sub-plugin when libflac does not support ogg-flac files.
-
- 08 Nov, 2008 7 commits
-
-
Max Kellermann authored
The player did not care about the exact error value, it only checked whether an error has occured. This could fit well into decoder_control.state - introduce a new state "DECODE_STATE_ERROR".
-
Max Kellermann authored
decoder.plugin was a write-only attribute.
-
Laszlo Ashin authored
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.
-
Laszlo Ashin authored
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.)
-
Laszlo Ashin authored
A new function has been added to do a cast and a little check in the wavpack-mpd input stream wrapper.
-
Laszlo Ashin authored
I think this makes the code more easily modifiable and prevents some annoying mistakes.
-
Laszlo Ashin authored
There are some functions in the wavpack-mpd input streams wrapper which had too commonly used names (especially can_seek). I prefixed these with "wavpack_input_".
-