aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-11-11playlist: track song metadata changesMax Kellermann2-12/+14
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.
2008-11-11oggflac: removed the obsolete try_decode() methodMax Kellermann1-6/+3
2008-11-11decoder: return void from decode() methodsMax Kellermann13-113/+56
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.
2008-11-11replay_gain: don't include os_compat.hMax Kellermann1-1/+3
os_compat.h is deprecated and should be replaced with well-defined standard headers.
2008-11-11replay_gain: use GLib instead of utils.h/log.hMax Kellermann1-14/+11
Eliminated deprecated libraries.
2008-11-11replay_gain: use pcm_volume() to apply replay gainMax Kellermann1-37/+2
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.
2008-11-11pcm_utils: allow volume levels greater than 100% in pcm_volume()Max Kellermann1-1/+1
Allow pcm_volume() to increase volume.
2008-11-11pcm_volume: added constant PCM_VOLUME_1Max Kellermann4-14/+27
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.
2008-11-11pcm_utils: added inline function pcm_float_to_volume()Max Kellermann2-2/+13
2008-11-11replay_gain: converted struct replay_gain_info elements to an arrayMax Kellermann7-45/+47
Having an array instead of individual variables allows the use of the replay_gain_mode enum as an array index.
2008-11-11wavpack: added wavpack_tag_float()Max Kellermann1-41/+25
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.
2008-11-11wavpack: make the "key" argument to wavpack_tag() constMax Kellermann1-9/+5
This allows us to remove the "static char[]" hack.
2008-11-11ogg: ogg_getReplayGainInfo() returns replay_gain_info pointerMax Kellermann1-13/+20
Some code simplification. Avoid pointers to pointers.
2008-11-11replay_gain: converted replay_gain_mode to an enumMax Kellermann2-5/+7
Prefer C enums over CPP macros.
2008-11-11replay_gain: removed superfluous author name commentMax Kellermann1-1/+0
The author's name is already mentioned in the copyright declaration.
2008-11-11replay_gain: no CamelCaseMax Kellermann13-111/+119
Renamed functions and variables.
2008-11-11replay_gain: renamed sources to replay_gain.c, replay_gain.hMax Kellermann5-5/+5
No CamelCase file names.
2008-11-11decoder: fixed assertion failure for decoder==NULL in decoder_read()Max Kellermann1-1/+2
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.
2008-11-10decoder: removed plugin method try_decode()Max Kellermann5-51/+14
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.
2008-11-10decoder: fall back to next pluginMax Kellermann1-4/+16
When a plugin is unable to decode a song, try the other plugins.
2008-11-10decoder: wrapper functions for methods stream_decode() and file_decode()Max Kellermann1-5/+66
Added lots of assertions to the wrapper functions.
2008-11-10decoder: added more assertionsMax Kellermann1-0/+10
Added a lot of assertions checking the state of the decoder plugin.
2008-11-10flac: call flac_process_metadata() for ogg filesMax Kellermann1-4/+5
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().
2008-11-10flac: enable the oggflac plugin with older libflac versionsMax Kellermann1-3/+14
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.
2008-11-10flac: enable oggflac with libflacMax Kellermann1-1/+1
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.
2008-11-09log: properly check log_thresholdDaniel Schömer1-1/+1
2008-11-09decoder: updated API documentationMax Kellermann1-2/+6
Updated documentation on the stream_decode() and file_decode() return values.
2008-11-09wavpack: removed try_decode() methodMax Kellermann1-23/+0
Wavpack's try_decode() implementation does nothing useful, it only duplicates code already in stream_decode() / file_decode(), and slows down MPD.
2008-11-09flac: make the init() method check for oggflac supportMax Kellermann1-2/+8
Disable flac's "oggflac" sub-plugin when libflac does not support ogg-flac files.
2008-11-08decoder: converted dc.error to a dc.state valueMax Kellermann4-30/+44
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".
2008-11-08decoder: removed "plugin" from the decoder structMax Kellermann2-6/+0
decoder.plugin was a write-only attribute.
2008-11-08wavpack: make 24-bit samples available for mpdLaszlo Ashin1-47/+46
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.
2008-11-08wavpack: check last_byte in push_back_byte() methodLaszlo Ashin1-2/+6
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.)
2008-11-08wavpack: wrapper for converting void* to struct wavpack_input*Laszlo Ashin1-13/+20
A new function has been added to do a cast and a little check in the wavpack-mpd input stream wrapper.
2008-11-08wavpack: put braces around one line code blocksLaszlo Ashin1-15/+27
I think this makes the code more easily modifiable and prevents some annoying mistakes.
2008-11-08wavpack: added prefix to local function namesLaszlo Ashin1-14/+14
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_".
2008-11-08wavpack: unified code styleLaszlo Ashin1-16/+28
Not every function header has its return type in a distinct line. This patch corrects that. This way there is more space for the arguments.
2008-11-07listen: fix namespace collision on OpenSolarisTom Servo1-6/+6
The listen.c module breaks the build because the variable name used ("sun") for the Unix domain socket part collides with something else on an OpenSolaris system, likely Sun specific. Renaming it to _sun (or something else of choice) fixes the build. [mk: renamed to "s_un"]
2008-11-06wavpack: check wvc seekabilityLaszlo Ashin1-2/+5
Using wvc streams the seekableness depends on the seekability of the wvc stream as well.
2008-11-06wavpack: close wvc stream on errorLaszlo Ashin1-1/+3
The input stream opened for wvc is not closed in an if branch. A close call has been added.
2008-11-06wavpack: enable seekingLaszlo Ashin1-1/+1
Somehow seeking is disabled on all kinds of wavpack playbacks now in the git version. This patch corrects that.
2008-11-06input_curl: retrieve error message from ERRORBUFFERMax Kellermann1-2/+5
libcurl provides better error messages than curl_multi_strerror() when you set the ERRORBUFFER option.
2008-11-06input_curl: return 0 on error from read()Max Kellermann1-1/+2
The read() method must not return a negative value. Make it return 0 on error, just like the file input stream. Also set the "error" attribute to -1.
2008-11-06input_curl: enable FAILONERRORMax Kellermann1-0/+1
I had this option enabled during development, but at some point, it must have gotten lost. FAILONERROR makes the curl stream fail when the server returns a status code 400 or higher. We are not interested in the server's error document.
2008-11-05path: removed superfluous error check in path_set_fs_charset()Max Kellermann1-8/+0
The code which had a possible error condition had been removed.
2008-11-05log: check if log_charset is setMax Kellermann1-5/+8
When logging to a file, log_charset would be NULL and g_convert() would abort.
2008-11-05Makefile.am: distribute input_curl.hMax Kellermann1-0/+1
input_curl.h was missing in the tarball because it was not listed in $(mpd_headers).
2008-11-05main: print usage to stdoutMax Kellermann1-26/+25
Using the logging library here is inappropriate.
2008-11-05log: convert messages to system charsetMax Kellermann1-0/+14
When logging to the terminal, we should print messages in the system character set. Convert all messages in this case.
2008-11-05log: use boolMax Kellermann2-8/+10
Use the bool data type for flags.