| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
| |
Prefer C enums over CPP macros.
|
|
|
|
| |
The author's name is already mentioned in the copyright declaration.
|
|
|
|
| |
Renamed functions and variables.
|
|
|
|
| |
No CamelCase file names.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
When a plugin is unable to decode a song, try the other plugins.
|
|
|
|
| |
Added lots of assertions to the wrapper functions.
|
|
|
|
| |
Added a lot of assertions checking the state of the decoder plugin.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Updated documentation on the stream_decode() and file_decode() return
values.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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".
|
|
|
|
| |
decoder.plugin was a write-only attribute.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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_".
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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"]
|
|
|
|
|
| |
Using wvc streams the seekableness depends on the seekability of the
wvc stream as well.
|
|
|
|
|
| |
The input stream opened for wvc is not closed in an if branch. A
close call has been added.
|
|
|
|
|
| |
Somehow seeking is disabled on all kinds of wavpack playbacks now in
the git version. This patch corrects that.
|
|
|
|
|
| |
libcurl provides better error messages than curl_multi_strerror() when
you set the ERRORBUFFER option.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The code which had a possible error condition had been removed.
|
|
|
|
|
| |
When logging to a file, log_charset would be NULL and g_convert()
would abort.
|
|
|
|
|
| |
input_curl.h was missing in the tarball because it was not listed in
$(mpd_headers).
|
|
|
|
| |
Using the logging library here is inappropriate.
|
|
|
|
|
| |
When logging to the terminal, we should print messages in the system
character set. Convert all messages in this case.
|
|
|
|
| |
Use the bool data type for flags.
|
|
|
|
|
| |
Install a default handler which writes to stdout or stderr, and
prepends a time stamp. This looks just like the 0.13.x logger.
|
|
|
|
|
|
| |
The logging functions from log.h are deprecated, and the code should
use GLib logging instead. Make ERROR(), WARNING() etc. call g_logv()
internally.
|
|
|
|
| |
Renamed the variable "logLevel" to "log_threshold".
|
|
|
|
|
| |
The warning buffer is a complex piece of code for no good reason.
Remove it and find a better solution, e.g. open the log file earlier.
|
|
|
|
|
|
| |
Initialize libc's locale functions. Currently, we are only interested
in LC_CTYPE (character classification), because this is what is used
by GLib's g_get_charset().
|
|
|
|
|
| |
Make the local variable "charset" const, and don't duplicate its
value. It is already duplicated by path_set_fs_charset().
|
|
|
|
|
|
| |
GLib provides the function g_get_filename_charsets() which determines
the file system character set. This changes MPD's fallback: GLib
prefers UTF-8 as a fallback. MPD used to fall back to ISO Latin 1.
|