Commit Graph

118 Commits

Author SHA1 Message Date
Igor Kuzmin 9d42f4e0ed update: don't re-read unchanged container files
MPD checks if every flac (possibly other types as well) file contains
cuesheet on every update, which produces unneeded I/O. My music
collection is on NFS share, so it's quite noticeable. IMHO, it
shouldn't re-read unchanged files, so I wrote simple patch to fix it.
2009-08-19 21:21:29 +02:00
Max Kellermann fd8aa54a90 output_init: initialize the "pause" flag
Fix stuttering due to uninitialized variable.
2009-08-18 11:32:54 +02:00
Avuton Olrich 48a80d0b85 Modify version string to post-release version 0.15.3~git 2009-08-15 11:57:50 -07:00
Avuton Olrich 5715534b53 mpd version 0.15.2 2009-08-15 11:57:50 -07:00
Max Kellermann f38ce5408b output/shout: minimize the unpause latency
During the pause loop, manually sleep for 500ms if shout_delay()
returns a value greater than that.  Don't exhaust libshout's buffer.
2009-08-14 11:52:36 +02:00
Max Kellermann 7133f560ec output: fixed shout stuck pause bug
Explicitly make the output thread leave the ao_pause() loop.  This
patch is a workaround, and the "pause" flag is not managed in a
thread-safe way, but that's good enough for now.
2009-08-14 11:52:12 +02:00
Max Kellermann 7dddd9beda directory: free empty directories after removing them (memleak)
dirvec_delete() does not free the object, we have to call
directory_free() afterwards.
2009-08-14 11:52:00 +02:00
Max Kellermann 5d6f7803e1 update: free temporary string in container scan (memleak)
The return value of map_directory_child_fs() must be freed.
2009-08-14 11:51:51 +02:00
Max Kellermann 1c4f407a6d decoder/flac: don't allocate cuesheet twice (memleak)
The function flac_cue_track() first calls FLAC__metadata_object_new(),
then overwrites this pointer with FLAC__metadata_get_cuesheet().  This
allocate two FLAC__StreamMetadata objects, but the first pointer is
lost, and never freed.
2009-08-14 11:51:42 +02:00
Max Kellermann e44f313912 update: free empty path string (memleak)
When you pass an empty string to directory_update_init(), it was not
freed by update_task().
2009-08-14 11:51:35 +02:00
Max Kellermann 47ed89bd4c decoder/flac: parse all replaygain tags
The FLAC replaygain parser used the "||" operator.  This made the code
stop after the first value which was found.
2009-07-22 13:31:48 +02:00
Max Kellermann 322ef3cb80 mad: skip ID3 frames when libid3tag is disabled
When libid3tag is disabled, the libmad decoder plugin is unable to
identify ID3 frames.  If the file starts with an (unidentified) ID3
frame, it assumes that the file is not a valid MP3 song.  This patch
solves this by adding minimal stubs for the ID3 functions.
2009-07-22 12:57:03 +02:00
Max Kellermann 0ce727d5d4 ape: added protection against large memory allocations
The function tag_ape_load() retrieves a 32 bit unsigned integer from
the input file, and passes it to g_malloc().  This is dangerous, and
may be used for a denial of service attack on MPD.
2009-07-19 17:38:46 +02:00
Max Kellermann a988b9b025 ape: check the tag size (fixes integer underflow)
The expression "tagLen - size > 0" may result in an integer underflow
and a buffer overflow, when "size" is larger than "tagLen".  "size" is
read from the input file, and must not be trusted.  This patch changes
the expression to "tagLen > size", which is a lot safer.
2009-07-18 22:45:56 +02:00
Avuton Olrich 19f1bfdf40 Modify version string to post-release version 0.15.2~git 2009-07-15 13:36:41 -07:00
Avuton Olrich d7bad6ae02 mpd version 0.15.1 2009-07-15 13:36:41 -07:00
Max Kellermann 966a886ef5 NEWS: fixed typo 2009-07-14 14:24:02 +02:00
Max Kellermann c0c5119788 decoder/flac: fix assertion failure in tag_free() call
Initialize flac_data.tag right after flac_data_init().  This way, the
"goto fail" won't jump to the point where tag_free(NULL) can be
called.
2009-07-06 22:09:30 +02:00
Max Kellermann 64ca94c910 output/httpd: include sys/types.h
On Mac OS X, the httpd plugin cannot be compiled, because OS X's
system headers do nto include sys/types.h, although they use
u_int32_t.
2009-07-06 14:40:06 +02:00
Max Kellermann badb827712 log: fix double free() bug during shutdown
Don't free an internal configuration value in log_init().  Call
config_get_path() instead of manually calling parsePath().
2009-07-05 07:14:24 +02:00
Max Kellermann 15d4c841ce database: fixed NULL pointer dereference after charset change
When the filesystem_charset is changed in mpd.conf, MPD should discard
the old database.  In this error branch, MPD did not fill the GError
object properly, and logged a warning message instead, which caused a
segmentation fault.
2009-06-30 16:29:40 +02:00
Max Kellermann 40851b7cac output_all: don't resume playback when stopping during pause
When MPD was paused, and the client sent the "stop" command (or
"clear"), a glitch caused MPD to continue playback for a split second.
This was because audio_output_all_cancel() calls
audio_output_all_update(), which reopens all output devices, and
re-ignites the playback loop.
2009-06-29 22:20:36 +02:00
Max Kellermann f8f5d40532 NEWS: updated NEWS file for 0.15.1 2009-06-25 11:29:08 +02:00
Avuton Olrich 8758e97794 mpd version 0.15 2009-06-23 18:43:57 -07:00
Max Kellermann d5ddecb15a listen: bind() failure on secondary address is non-fatal
Several users had problems with binding MPD to "localhost".  The cause
was duplicate /etc/hosts entries: the resolver library returns
127.0.0.1 twice, and of course, MPD attempts to bind to "both" of
them.  This patch makes failures non-fatal, given that at least one
address was bound successfully.  This is a workaround; users should
rather fix their /etc/hosts file.
2009-06-10 08:01:07 +02:00
Daniel Kahn Gillmor 05dfdfdb39 alsa_mixer: add mixer_index option
This allows you to select controls with duplicate names.
2009-04-28 09:15:48 +02:00
Max Kellermann 11bcd7f013 curl: moved proxy settings to "input" block
The old global settings "http_proxy_host", "http_proxy_port",
"http_proxy_user" and "http_proxy_password" continue to work.
2009-04-25 13:35:04 +02:00
Max Kellermann 472b994779 player_thread: pause when all audio outputs fail to play
When all audio outputs have been closed due to failures, pause the
playback instead of stopping it.  This way, the user may resume
at the current position after the problem has been dealt with.
2009-04-25 11:55:36 +02:00
Max Kellermann 54863dff8a NEWS: flagged some new features "experimental"
The "lastfm" input plugin is far from complete, because MPD does not
support nesting playlists yet.  The "fluidsynth" decoder plugin
suffers from shortcomings in the libfluidsynth library:

 http://www.mail-archive.com/fluid-dev@nongnu.org/msg01099.html
2009-04-02 07:12:38 +02:00
Avuton Olrich 88362cbcca news: add more miscellaneous missing news 2009-04-01 06:05:57 -07:00
Avuton Olrich be044ee1a2 news: move supports a range 2009-04-01 06:05:46 -07:00
Avuton Olrich c59ca49e6a news: add pulseaudio mixer 2009-04-01 06:05:35 -07:00
Avuton Olrich 8c1465c67c news: Add consume and single commands 2009-04-01 06:05:16 -07:00
Avuton Olrich ac8def81ab news: trivial modification to make the date line the same as the others 2009-03-31 20:01:26 -07:00
Max Kellermann f5548a8654 mpcdec: support the new libmpcdec SV8 API 2009-03-27 19:51:59 +01:00
Max Kellermann bba127a392 solaris: new audio output plugin for Solaris /dev/audio 2009-03-16 09:55:10 +01:00
Max Kellermann e12140cfce pcm_resample: choose the fallback resampler at runtime
Even if libsamplerate support is enabled, compile the fallback
resampler.  When the user specifies the option
"samplerate_converter=internal", it is chosen in favor of
libsamplerate.  This may help users with a weak FPU who don't want to
compile a custom MPD from source, because the fallback resampler does
not use floating point operations.
2009-03-14 15:26:36 +01:00
Max Kellermann 538701e7c6 player_thread: fill buffer after seeking
After a seek, wait until enough new chunks are decoded before starting
playback.  If this takes too long, send silence chunks to the audio
outputs meanwhile.
2009-03-10 21:19:51 +01:00
Max Kellermann 71e88271d9 output_thread: wait 10 seconds before reopening after play failure
This is similar to the MPD 0.14 patch "wait 10 seconds before
reopening a failed device", which only covered open() failures.  This
patch adds the same feature for play().
2009-03-09 19:08:35 +01:00
Max Kellermann 554a34fb95 alsa: better period_time default value for high sample rates
The default values for buffer_time and period_time were both capped by
the hardware limits on practically all chips.  The result was a
period_time which was half as big as the buffer_time.  On some chips,
this led to lots of underruns when using a high sample rate (192 kHz),
because MPD had very little time to send new samples to ALSA.

A period time which is one fourth of the buffer time turned out to be
much better.  If no period_time is configured, see how much
buffer_time the hardware accepts, and try to configure one fourth of
it as period_time, instead of hard-coding the default period_time
value.

This is yet another attempt to provide a solution which is valid for
all sound chips.  Using the SND_PCM_NONBLOCK flag also seemed to solve
the underruns, but put a lot more CPU load to MPD.
2009-03-08 03:55:01 +01:00
Avuton Olrich e7f034dcef cmdline: Print available protocols when --version is run. 2009-03-03 21:25:19 +01:00
Max Kellermann 4220e6b0ad input_lastfm: new input plugin for last.fm radio
The lastfm input plugin enables MPD to play lastfm:// URLs.  This
plugin is not complete yet: it plays only the first song in the
last.fm playlist, and the playlist parser isn't even implemented
properly.
2009-03-02 23:11:31 +01:00
Max Kellermann 336f624277 tag_id3: parse ID3 tags in RIFF/WAV files
Added a small RIFF parser library.  Look for an "id3" chunk, and let
libid3tag parse it.
2009-03-02 18:00:46 +01:00
Max Kellermann 062f37071c audio_format: allow 32 bit samples
This is the first patch in a series to enable 32 bit audio samples in
MPD.  32 bit samples are more tricky than 24 bit samples, because the
integer may overflow when you operate on a sample.
2009-03-02 15:46:09 +01:00
Max Kellermann ba3a8474b6 flac: parse stream tags
Parse the vorbis comments in libflac's metadata_callback and pass them
as tag struct to the decoder API.
2009-03-01 14:07:23 +01:00
Max Kellermann af66f666c6 audiofile: added 24 bit support
Don't hard code the "bits" parameter to 16.  Try to use the input's
sample format, if possible.
2009-03-01 10:53:46 +01:00
Max Kellermann a5c09c91c4 output: added option to disable audio outputs by default
The option "enabled" is on by default.  If you specify "enabled no" in
an audio_output section, then this device is disabled by default.
2009-02-28 19:40:39 +01:00
Michal Nazarewicz cabbf7ab4a pipe: new audio output plugin which runs a command
[mk: adapted to new output plugin API]
2009-02-28 16:11:59 +01:00
Max Kellermann 1bb0124b77 listen: allocate sockaddr_storage struct for accept()
The generic sockaddr struct is too small for some addresses.  For
accept(), we have to allocate a sockaddr_storage struct on the stack,
which is large enough for all addresses.
2009-02-28 15:20:35 +01:00
Max Kellermann eae0287466 song_print: hide HTTP password in playlist
Added the uri_remove_auth() library function which strips username
and password from a HTTP URI, and use it in song_print_url().  This
allows you to add HTTP URIs to the playlist including secret username
and password, without disclosing it to all MPD clients.
2009-02-27 19:20:11 +01:00