Commit Graph

359 Commits

Author SHA1 Message Date
Max Kellermann 9328558fc7 tag_ape: support album artist
I took this tag name from a MusePack sample file I got from a user.
It is not documented in the APE specification:

 http://wiki.hydrogenaudio.org/index.php?title=APE_key

People seem to be using undocumented extensions to the specification
anyway, and the best we can do is attempt to support them.
2010-06-30 21:16:28 +02:00
Max Kellermann 9eb292c1e5 decoder/mp4ff: support tag "album artist"
We already supported "albumartist", but it seems some folks also use
"album artist" (with a space).
2010-06-25 22:54:18 +02:00
Max Kellermann de8f2739c2 decoder/mikmod: fix memory leak
The return value of Player_LoadTitle() is allocated with malloc(), and
must be freed by the caller.
2010-05-31 10:24:08 +02:00
Max Kellermann 017d61a1aa decoder/mp4ff: support tags "albumartist", "band"
I'm not sure if mapping "band" to TAG_PERFORMER is correct, but it
might be better than nothing.
2010-05-30 22:55:02 +02:00
Max Kellermann 44b771aca1 decoder/mp4ff: rename plugin "mp4" to "mp4ff"
The underlying library is named "libmp4ff".  To reduce confusion,
rename the plugin to a more specific name.
2010-05-30 22:52:44 +02:00
Max Kellermann 8e815bec9f tag_ape: support album artist, MusicBrainz tags
I took these tag names from a MusePack sample file I got from a user.
These are not documented in the APE specification:

 http://wiki.hydrogenaudio.org/index.php?title=APE_key

People seem to be using undocumented extensions to the specification
anyway, and the best we can do is attempt to support them.
2010-05-30 22:29:48 +02:00
Max Kellermann 9dda53e1d2 Merge release 0.15.10 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
	src/input/mms_input_plugin.c
2010-05-30 18:26:33 +02:00
Avuton Olrich 65ad298460 Modify version string to post-release version 0.15.11~git 2010-05-30 08:59:00 -07:00
Avuton Olrich 57e95ea6f4 mpd version 0.15.10 2010-05-30 08:59:00 -07:00
Max Kellermann 9cce1d749a output/win32: new output plugin for Windows Wave 2010-05-20 09:33:05 +02:00
Max Kellermann fa2ff849c5 input/ffmpeg: new input plugin using libavformat's "avio" library 2010-05-18 21:20:31 +02:00
Max Kellermann 28736414a8 input/mms: initialize the "eof" attribute 2010-05-18 21:11:00 +02:00
Max Kellermann e98bd55cbf input/mms: fix memory leak in error handler 2010-05-18 20:57:57 +02:00
Max Kellermann 6c831e04a2 output/oss: 24 bit support via OSS4
Added #ifdefs on the macros AFMT_S24_NE and other OSS4 extensions.
2010-05-14 09:48:02 +02:00
Daniel Seuthe 92e66e5ab2 replay_gain: added mode "auto" 2010-04-25 13:51:58 +02:00
Max Kellermann a1a03deed2 decoder/mad: properly calculate ID3 size without libid3tag
Without libid3tag, we were trying to skip the ID3 frame (since
0.15.2).  Its length however was not calculated at all, we were just
dropping everything from the current input buffer.  This lead to the
first few seconds of the file being skipped.  This patch attempts to
calculate the ID3v2 frame size with the formula from:

 http://www.id3.org/id3v2.4.0-structure 3.1 and 6.2
2010-04-13 08:51:29 +02:00
James Pike c52f469c9c output/httpd: added name/genre/website configuration 2010-04-05 13:11:10 +02:00
Max Kellermann e9beea072d Merge release 0.15.9 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
	src/cue/cue_tag.c
	src/decoder/mpcdec_decoder_plugin.c
	src/player_thread.c
2010-03-28 19:31:47 +02:00
Avuton Olrich 0dcd865c2e Modify version string to post-release version 0.15.10~git 2010-03-21 17:25:18 -07:00
Avuton Olrich d612e5e0ab mpd version 0.15.9 2010-03-21 17:25:18 -07:00
Tim Phipps e7a515c8b1 Add support for MixRamp tags
Adds mixrampdb and mixrampdelay commands.  Reads MIXRAP_START and
MIXRAMP_END tags from FLAC files and overlaps instead of crossfading.
2010-03-21 18:21:47 +01:00
Aleksei Kaveshnikov 73ba4ea3da decoder/mpcdec: fix replay gain formula with v8
"When playing musepack files with mpd v0.15.8, rg seems to have no effect.

Using sample file below, mpd says 'computing ReplayGain album scale with gain 122.879997, peak 0.549150'.

One thing though, if I build mpd against old libmpcdec-1.2.6, rg works
as expected: 'computing ReplayGain album scale with gain 16.820000,
peak 0.099765'"
2010-03-19 10:26:08 +01:00
Max Kellermann cbfaa4a266 player_thread: postpone song tags during cross-fade
Previously, tags of the new song being cross-faded in were sent
immediately.  That can cause wrong information being displayed,
because the "previous" song might send its tag at the end again,
overriding the "next" song's tag.  This patch saves & merges the tag
of the next song, and sends it when cross-fading is finished, and the
next song really starts.
2010-03-17 23:14:54 +01:00
Piotr Gozdur 96033e4b4e decoder/mpcdec: fix negative shift on fixed-point samples
"There is a bug in fixed-point musepack (musepack_src_r435) playback.
In floating-point audio is OK but in fixed audio is distorted.  I have
made a patch for this"
2010-03-17 17:54:21 +01:00
Max Kellermann 9134169e37 playlist: fix single+repeat in random mode
With single+repeat enabled, it is expected that MPD repeats the
current song over andd over.  With random mode also enabled, this
didn't work, because the song order was shuffled internally.  This
patch adds a special check for this case.
2010-03-07 18:58:44 +01:00
Max Kellermann ae56901863 decoder/ffmpeg: implement the libavutil log callback
Pass everything to the GLib logging library.  No direct stderr access.
2010-02-27 19:32:59 +01:00
Max Kellermann a3645984cd command: "update" checks if the path is malformed
This is a very basic check, which only ensures that the path does not
begin with a slash, doesn't have double slashes and the special names
"." and ".." are forbidden.
2010-02-27 19:01:17 +01:00
Max Kellermann 35c5a371ea decoder/mad: fix crash when seeking at end of song
Removed the decoder_command_finished() call at the end of
mp3_decode().  This is invalid, because decoder_command_finished() has
already been called in mp3_read().
2010-02-27 18:35:31 +01:00
Max Kellermann 96493e0333 replay_gain: optionally use hardware mixer to apply replay gain
Add an option for each audio output which enables the use of the
hardware mixer, instead of the software volume code.

This is hardware specific, and assumes linear volume control.  This is
not the case for hardware mixers which were tested, making this patch
somewhat useless, but we will use it to experiment with the settings,
to find a good solution.
2010-02-17 08:14:07 +01:00
Max Kellermann 48b49e2303 replay_gain: fall back to track gain if album gain is unavailable 2010-02-17 08:13:34 +01:00
Max Kellermann 752dfb3d95 replay_gain: reimplement as a filter plugin
Apply the replay gain in the output thread.  This means a new setting
will be active instantly, without going through the whole music pipe.
And we might have different replay gain settings for each audio output
device.
2010-02-17 07:23:13 +01:00
Davide Camurri 7a62818ffd client: optionally use libwrap 2010-01-20 21:04:07 +01:00
Max Kellermann a0a26d3341 Merge release 0.15.8 from branch 'v0.15.x
Conflicts:
	Makefile.am
	NEWS
	configure.ac
	src/decoder/ffmpeg_decoder_plugin.c
	src/decoder_thread.c
2010-01-18 07:52:58 +01:00
Avuton Olrich 728c66e7e3 Modify version string to post-release version 0.15.9~git 2010-01-18 07:41:15 +01:00
Avuton Olrich 760569fc66 mpd version 0.15.8 2010-01-18 07:41:08 +01:00
Max Kellermann 9d4b7ab113 decoder_thread: don't fall back to "mad" unless no plugin matches
When all plugins have failed, MPD used to fall back to the "mad"
decoder plugin, to handle those radio streams without a Content-Type
response header.  This however leads to unexpected results (garbage
being played) when the stream isn't really mp3.  Since we care little
about "bad" streams, we shouldn't have hacks which have bad side
effects.

Let's get rid of this hack now!  Only try to "mad" plugin if there was
no match at all (Content-Type, path suffix) and no other plugin has
been tried.
2010-01-17 17:09:10 +01:00
Max Kellermann 8ac776c58b decoder_thread: don't try a plugin twice (MIME type & suffix)
Manage a linked list of plugins which were already tried.
2010-01-17 16:47:04 +01:00
Max Kellermann 1b441837f1 decoder/ffmpeg: append file name suffix to virtual stream URL
To allow libavformat to detect the format of the input file, append
the suffix of the input file to the URL of the virtual stream.  This
specifically enables the "shorten" codec, which is supported by
libavformat/raw.c, detected only by the suffix.
2010-01-17 02:36:07 +01:00
Max Kellermann 1abfcc56af audio_format: support packed 24 bit samples 2010-01-16 23:44:54 +01:00
Max Kellermann 8ba08edd0e queue: don't repeat current song in consume mode
Check consume mode in queue_next_order(), because the current song
would be deleted as soon as it's finished; it cannot be played again.
2010-01-16 20:58:24 +01:00
Max Kellermann 90d16af66a decoder_thread: fix CUE track playback
The patch "input/file: don't fall back to parent directory" introduced
a regression: when trying to play a CUE track, decoder_run_song()
tries to open the file as a stream first, but this fails, because the
path is virtual.

This patch fixes decoder_run_song() (instead of reverting the previous
patch) to accept input_stream_open() failures if the song is a local
file.  It passes the responsibility to handle non-existing files to
the decoder's file_decode() method.
2010-01-16 19:20:11 +01:00
Max Kellermann 777bd7c1e1 NEWS: added missing entry 2010-01-16 18:41:34 +01:00
Max Kellermann a942384fbf decoder/flac: support streams without STREAMINFO block 2010-01-06 10:17:16 +01:00
Max Kellermann 6f6d47dd20 decoder/flac: removed CUE sheet support
This feature has been moved to the "flac" playlist plugin.
2010-01-06 08:52:35 +01:00
Max Kellermann a0384aaead Makefile.am: added unit tests for the archive plugins 2009-12-31 15:50:59 +01:00
Max Kellermann efc885a9dc Merge vorbis+icy fixes from branch 'v0.15.x'
Conflicts:
	Makefile.am
	NEWS
	configure.ac
	src/input/curl_input_plugin.c
	src/input_stream.c
2009-12-30 23:24:11 +01:00
Max Kellermann c88f95a2ea input/rewind: new input_stream wrapper to allow stream rewinding
This replaces the rewinding buffer code from the CURL input plugin.
It is more generic, and allows rewinding even when the server sends
Icy-Metadata (which would have been too difficult to implement within
the CURL plugin).

This is a rather complex patch for the stable branch (v0.15.x), but it
fixes a serious problem: the "vorbis" decoder plugin was unable to
play streams with Icy-Metadata, because it couldn't rewind the stream
after detecting the codec (Vorbis vs. FLAC).
2009-12-29 23:55:40 +01:00
Max Kellermann c7d099c757 decoder/{ffmpeg,flac,vorbis}: added more flac/vorbis MIME types
Support deprecated MIME types such as "audio/x-ogg".  Support new
types such as "audio/flac".
2009-12-29 22:33:46 +01:00
Max Kellermann 333e11d0eb Merged release 0.15.7 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
	src/decoder_api.c
2009-12-27 20:10:45 +01:00
Avuton Olrich d38c09051c Modify version string to post-release version 0.15.8~git 2009-12-27 08:31:47 -08:00
Avuton Olrich b1cc760aa5 mpd version 0.15.7 2009-12-27 08:31:47 -08:00
Max Kellermann d66c055fec dbUtils: return multiple tag values per song
When collecting tag values for the result set, add all of a song's tag
values of the searched type.  This affects the "list" command.
Previously, "list" only considered the first tag value of a song.
2009-12-27 16:49:04 +01:00
Max Kellermann bb4cef6a93 playlist/cue: fill song.start_ms, .end_ms
This patch adds practical usefulness to the CUE playlist plugin.
2009-12-27 16:08:53 +01:00
Max Kellermann 915d1d0738 decoder_thread: eliminate jitter after seek failure
Don't clear the music pipe when seeking has failed - check the
"seeking" flag instead of "command==SEEK".  Clear the "seeking" flag
in decoder_seek_error().
2009-12-26 02:58:30 +01:00
Max Kellermann 8a6d448aaf decoder/wavpack: allow fine-grained seeking
First multiply the floating point return value of
decoder_seek_where(), then cast to integer.
2009-12-26 02:58:30 +01:00
Max Kellermann 870436a592 output_init: use the normalize filter plugin
Use the plugin instead of the glue code in normalize.c.  This is used
wrapped inside a "autoconv" filter, to enable normalization for all
input file formats.
2009-12-25 17:51:08 +01:00
Max Kellermann bd97586cc4 archive/iso: renamed plugin to "iso9660"
Based on libiso9660.
2009-12-16 15:55:37 +01:00
Max Kellermann c959148ed1 archive/zip: renamed plugin to "zzip"
This plugin is based on libzzip.
2009-12-15 20:29:44 +01:00
Max Kellermann 530e480748 Merge branch 'v0.15.x'
Conflicts:
	src/archive/bz2_plugin.c
	src/archive_api.h
	src/input/file_input_plugin.c
	test/run_input.c
2009-12-15 20:26:38 +01:00
Max Kellermann 9179f108a5 iso, zip: fixed memory leak in destructor
Free the "context" pointer in the method archive_plugin.close().
2009-12-15 19:57:00 +01:00
Max Kellermann 3411f6cffd archive: close archive when stream is closed
Fixes a memory leak: the "archive" input plugin opens the archive, but
never closes it.  This patch moves the responsibility for doing that
to archive_plugin.open_stream().  This is an slight internal API
change, but it is the simplest and least intrusive fix for the memory
leak.
2009-12-15 19:45:50 +01:00
Max Kellermann 2234d491b7 input/archive: close the archive file on error
Fixed memory leak in error handler.
2009-12-15 19:41:00 +01:00
Max Kellermann f01d7d230b input/file: don't fall back to parent directory
This code has never made any sense, and has broken some of the archive
plugin.
2009-12-15 19:16:28 +01:00
Max Kellermann c3085d7b61 Merge branch 'v0.15.x'
Conflicts:
	src/decoder/ffmpeg_plugin.c
2009-12-14 17:40:50 +01:00
Max Kellermann 5a354a1ed4 mixer: explicitly close all mixers on shutdown
Mixers with the "global" flag set aren't closed automatically when the
output device is closed.  Thus, they might still be open when MPD
shuts down.
2009-12-08 08:47:47 +01:00
Max Kellermann f4b707b4ca mapper: apply filesystem_charset to playlists
This fixes an inconsistency in the stored playlist subsystem: when
obtaining the list of playlists (listplaylist, listplaylistinfo), the
file names in the playlist directory are converted to UTF-8 (according
to filesystem_charset), but when saving or loading playlists, the
filesystem_charset setting was ignored.
2009-12-08 08:33:14 +01:00
Max Kellermann cd69fee0a4 command: verify playlist name in the "rm" command
Call spl_valid_name() in spl_delete().
2009-12-08 08:32:26 +01:00
Max Kellermann 23e46b38ca mapper: fix memory leak when playlist_directory is not set
Don't allocate the file name before the playlist_dir==NULL check.
2009-12-08 08:06:10 +01:00
J. Shagam 4076523198 compress: upgraded to AudioCompress 2.0
Copied sources from
http://beesbuzz.biz/code/audiocompress/AudioCompress-2.0.tar.gz

[mk: created this patch under fluffy's name and fixed some gcc
signed/unsigned comparison warnings]
2009-12-02 18:11:53 +01:00
svitoos 7162fe85ce tag_id3: fix ID3v1 charset conversion
If we define id3v1_encoding, then the tags are not added to the
database.
2009-11-30 17:42:46 +01:00
Max Kellermann 16123f1b8e ffmpeg: don't try to force stereo
The plugin code tried to force libavcodec to supply stereo samples.
That however has never actually worked.  By removing this code, we are
able to play surround files for the first time.
2009-11-30 09:59:05 +01:00
Max Kellermann 300f936228 pcm_mix: implemented 32 bit support 2009-11-19 21:00:54 +01:00
Max Kellermann 1358428031 pcm_volume: implemented 32 bit support
Support 32 bit samples with software mixer.
2009-11-19 21:00:50 +01:00
Max Kellermann c33bbd947b Merged release 0.15.6 from branch 'v0.15.x'
Conflicts:

	NEWS
	configure.ac
2009-11-19 19:59:34 +01:00
Avuton Olrich d1aee3ae74 Modify version string to post-release version 0.15.7~git 2009-11-18 18:49:25 -08:00
Avuton Olrich 30847e6c77 mpd version 0.15.6 2009-11-18 18:49:25 -08:00
Max Kellermann 97f8e017c4 decoder/flac: fixed NULL pointer dereference in CUE code
The function flac_vtrack_tnum() was missing a strrchr()==NULL check.
2009-11-18 19:55:38 +01:00
Viliam Mateicka 5420f9ae76 encoder: introducing flac encoder plugin 2009-11-17 19:41:35 +01:00
Max Kellermann f51ba6464a id3: allow 4 MB RIFF/AIFF tags
Allow RIFF/AIFF ID3 tags up to 4 MB (old limit was 256 kB).  This
might still be too small for some users, and when somebody complains,
we might do something more clever (like streaming the data into
libid3tag?).
2009-11-15 18:44:53 +01:00
Max Kellermann 77b95d08a5 decoder/ffmpeg: align the output buffer
On some platforms, libavcodec wants the output buffer aligned to 16
bytes (because it uses SSE/Altivec internally).  It will segfault when
you don't obey this rule.
2009-11-15 17:39:09 +01:00
Max Kellermann 1648c7aa5b decoder/mikmod: sample rate is configurable
The new option "sample_rate" sets the sample rate for libmikmod.
2009-11-14 02:24:42 +01:00
Max Kellermann 59189160e3 decoder/wavpack: allow more than 2 channels
Remove the OPEN_2CH_MAX option.  MPD's support for surround sound is
still clunky, but we're working on it.
2009-11-11 23:03:20 +01:00
Max Kellermann ee5d3337a7 decoder/wavpack: activate 32 bit support
MPD has been supporting 32 bit samples since version 0.15.  This patch
changes one check, and removes the 32->24 conversion code.

Note that WavPack floating point samples have 32 bits, and MPD doesn't
have a special check for floating point - therefore, this WavPack
plugin still returns 24 bit integer samples as before (until we have
float support in the MPD core).
2009-11-11 21:49:00 +01:00
Max Kellermann 5cc3c4f503 Merge remote branch 'origin/v0.15.x' 2009-11-11 15:14:20 +01:00
Max Kellermann dca4d9cf83 decoder/flac: fixed CUE seeking range check
If flac_container_decode() gets a seek destination which is out of
range, it ignores the SEEK command (never finishes it).  This leads to
MPD lockup, because the player thread waits for completion.
2009-11-11 08:55:55 +01:00
Max Kellermann 68f77e4163 oggflac: rewind stream after FLAC detection
The oggflac plugin has been completely broken for quite a while and
nobody has noticed - maybe we should remove it?
2009-11-11 08:14:37 +01:00
Max Kellermann b722d3d7f3 configure.ac: require GLib 2.12
Drop the required GLib version from 2.16 to 2.12, because many current
systems still don't have GLib 2.16.  This requires several new
compatibility functions in glib_compat.h.
2009-11-10 21:14:22 +01:00
Max Kellermann de57c21a3b Merge branch 'v0.15.x'
Conflicts:
	src/input/lastfm_input_plugin.c
	src/song_save.c
2009-11-10 21:13:03 +01:00
Max Kellermann 93a13b42dd zzip: require libzzip 0.13
We need the function zzip_file_stat().
2009-11-10 21:00:10 +01:00
Max Kellermann 96fcf5e1a5 input/mms: require libmms 0.4
We're using API functions which are not available in 0.3.
2009-11-10 20:57:10 +01:00
Max Kellermann 937b2b1744 sticker: added fallback for sqlite3_prepare_v2()
This function was not present in SQLite < 3.4.
2009-11-10 20:55:29 +01:00
Max Kellermann 8c0680f6b9 input/lastfm: fixed variable name in GLib<2.16 code path
Should be "lastfm_user", not "lastfm_username".
2009-11-10 20:54:17 +01:00
Max Kellermann 54033c74e4 output/alsa: fill period buffer with silence before draining
ALSA passes full period buffers to the hardware.  If an application
doesn't finish writing a period, libasound will nonetheless send the
partial buffer (with undefined trailing data).  This causes noise at
the end of playback.  This patch attempts to track the current
position within the period buffer, and generates silence at the end,
before calling snd_pcm_drain().
2009-11-09 22:22:31 +01:00
Max Kellermann 8420f1420f player_thread: drain audio outputs at the end of the playlist
When there's no queued song, and the current one has finished playing,
first make sure that the hardware outputs have really finished playing
the last chunk: call the drain() method in all audio outputs.  Without
this patch, MPD stopped playback shortly before the ALSA sound card
had finished playing.
2009-11-09 22:22:27 +01:00
Max Kellermann e3af0032b2 set the close-on-exec flag on all file descriptors
Added the "fd_util" library, which attempts to use the new thread-safe
Linux system calls pipe2(), accept4() and the options O_CLOEXEC,
SOCK_CLOEXEC.  Without these, it falls back to FD_CLOEXEC, which is
not thread safe.

This is particularly important for the "pipe" output plugin (and
others, such as JACK/PulseAudio), because we were heavily leaking file
descriptors to child processes.
2009-11-07 18:55:16 +01:00
Max Kellermann c440faa94d log: redirect stdout/stderr to /dev/null if syslog is used
Don't hold a file descriptor on root's tty when syslog is used for
logging.
2009-11-07 17:48:57 +01:00
Max Kellermann 375fd5ed4c output/jack: added option "server_name" 2009-11-07 17:26:21 +01:00
Max Kellermann ba34d48cf0 output/jack: dynamic source port list
Same as the previous patch: create up to 16 configured source ports.
The plugin tries to do its best at guessing the right combination for
the given input file, the number of source and destination ports.
2009-11-06 18:58:35 +01:00
Max Kellermann fac6e9ecdb output/jack: renamed option "ports" to "destination_ports"
Be more clear which kind of port should be configured here.
2009-11-06 01:54:58 +01:00
Max Kellermann f3203b5de5 playlist: added extm3u plugin
This new plugin parses extm3u files.  Files without the "#EXTM3U"
header are still parsed by the plain old "m3u" plugin.
2009-11-06 00:41:42 +01:00