Commit Graph

2157 Commits

Author SHA1 Message Date
Max Kellermann e56a90f3b3 fluidsynth: new decoder plugin for MIDI files
There are a few problems left in this plugin:

- fluidsynth decodes in real time, while MPD prefers to buffer as
  quickly as possible; as a workaround, this plugin uses a timer
  object to synchronize with real-time playback

- I don't know yet how fluidsynth tells me when the song has ended

- the "soundfont" configuration setting is not yet documented, and it
  will likely change soon (in favor of a per-decoder configuration
  block)
2009-02-12 08:43:26 +01:00
Max Kellermann 1136f6fb7a sidplay: new decoder plugin for playing C64 SID files 2009-02-11 20:31:17 +01:00
Max Kellermann 550b9c3f23 ffmpeg: added TTA support
The ffmpeg library supports the "True Audio Codec".  The entry in
ffmpeg_suffixes was missing.
2009-02-11 18:27:11 +01:00
Max Kellermann bee688e99a configure.ac: define HAVE_FFMPEG after all checks
Don't define HAVE_FFMPEG if the ffmpeg libraries were found via
pkg-config, but ffmpeg support was disabled because
avcodec_decode_audio2() is not available.
2009-02-09 22:22:54 +01:00
Max Kellermann 1ac328b553 shout: clear buffer before calling the encoder
Always assume the buffer is empty before calling the encoder.  Always
flush the buffer immediately after there has been added something.
This reduces the risk of buffer overruns, because there will never be
a "rest" in the current buffer.
2009-02-09 16:38:25 +01:00
Max Kellermann 7fc25ad567 shout: don't postpone metadata
Don't duplicate the tag received by the send_metadata() method - send
it to the shout server directly.
2009-02-09 16:38:22 +01:00
Max Kellermann f5c43889c3 shout: use libshout's synchronization
Removed the manual timer synchronization from the shout plugin.
libshout's shout_sync() function does it for us.
2009-02-09 16:38:20 +01:00
Max Kellermann f6455d5f79 shout: switch to blocking mode
The non-blocking mode of libshout is sparsely documented, and MPD's
implementation had several bugs.  Also removed connect throttling
code, that is done by the MPD core since 0.14.
2009-02-09 16:38:03 +01:00
Max Kellermann 824d299eb1 ffmpeg: fixed seek integer overflow
The "current" variable is used for calculating the seek destination,
and was declared as "int".  With very long song files, the 32 bit
integer can overflow.  ffmpeg expects an int64_t, which is very
unlikely to overflow.  Switch to int64_t.
2009-02-03 22:51:44 +01:00
Max Kellermann f3b73b824f ffmpeg: check if the time stamp is valid
When ffmpeg cannot estimate the elapsed time, it sets
AVPacket.pts=AV_NOPTS_VALUE.  Our ffmpeg decoder plugin did not check
for that special value.
2009-02-03 22:51:41 +01:00
Max Kellermann 81b6c0d77b ffmpeg: don't warn of empty packet output
If avcodec_decode_audio2() returns no output for an AVPacket,
libavcodec may buffer some data, and return a larger chunk of output
later.  This patch disables a lot of bogus warnings.
2009-02-03 22:51:38 +01:00
Max Kellermann 3b0a78fe0d shout_mp3: call lame_close() in clear_encoder() method
The shout_mp3 encoder had two bugs: when no song was ever played, MPD
segfaulted during cleanup.  Second bug: memory leak, each time the
shout device was opened, lame_init() was called again, and
lame_close() is only called once during shutdown.

Fix this by shutting down LAME each time the clear_encoder() method is
called.
2009-02-02 18:22:56 +01:00
Max Kellermann 4b7c28f98e player_thread: set player error when output device fails
When the output device fails to play a chunk, set pc.error to
PLAYER_ERROR_AUDIO.  This way, the playlist knows that it should not
queue the next song.
2009-02-02 18:22:41 +01:00
Matthias Drochner 5b85288664 mikmod: call MikMod_Exit() only in the finish() method
Hi -
independently of libmikmod's other problems - there seems
to be a problem in mpd's wrapper: MikMod_Exit() is called
after the first file is decoded, which frees some ressources
within the mikmod library. An attempt to play a second file
leads to a crash. The appended patch fixes this for me.
(I don't know what the "dup" entry is good for - someone
who knows should review that too.)
best regards
Matthias

[mk: removed 3 more MikMod_Exit() invocations]
2009-01-30 17:51:16 +01:00
Max Kellermann 02bfb0c4e4 wavpack: pass NULL if the .wvc file fails to open
The wavpack library seems to use the .wvc stream even if the OPEN_WVC
flag is not set.  In this case, pass NULL to be sure libwavpack won't
use it.
2009-01-30 16:05:02 +01:00
Max Kellermann e3d4fa6946 mapper: remove trailing slashes from music_directory
When the user configures a music_directory with a trailing slash, it
may break playlist loading, because MPD expects a double slash.  Chop
off the trailing slash.
2009-01-30 13:50:24 +01:00
David Horn efb04532df ffmeg: added support for the tags comment, genre, year
ffmpeg_tag_internal() does not look for a few tags that mpd
supports. Most noteably:

 comment -> TAG_ITEM_COMMENT -> Description
 genre -> TAG_ITEM_GENRE -> WM/Genre (not WM/GenreID)
 year -> TAG_ITEM_DATE -> WM/Year

I *think* that this is the last of the tags that AVFormatContext() in
ffmpeg supports that mpd also uses.
2009-01-30 09:42:49 +01:00
Max Kellermann caa4d28f04 added support for the MMS protocol
This patch implements the MMS protocol, by using libmms.  It is quite
experimental: it does not support seeking yet, and it is currently
using synchronous I/O, which causes MPD to hang while waiting for the
server.
2009-01-29 21:42:10 +01:00
Max Kellermann a73266962f jack: reduced sleep time to 1ms
When waiting for free space in the ring buffer, the JACK plugin
sleeped 10ms until there is enough space.  This delay was too large
for low-latency setups (<10ms), and created a lot of xruns.  Work
around that by reducing the sleep time to 1ms.

A proper solution for this would be to use an event based approach,
and we will do it, just not now.
2009-01-29 18:13:09 +01:00
Max Kellermann 1e0ceb3d88 jack: clear "shutdown" flag on reconnect
When the connection failed once, you had to restart MPD, because it
never cleared the jack_data.shutdown flag.  Instead, it refused to
play anything "because there is no client thread" (which is wrong at
that point).
2009-01-29 18:13:03 +01:00
Max Kellermann 3a070d3d23 jack: allocate ring buffers before connecting
If the ring buffers are allocated after jack_activate(),
mpd_jack_process() might segfault because it attempts to access them.
2009-01-29 18:12:52 +01:00
Avuton Olrich 9ef6c79991 Modify version string to post-release version 0.14.2~git 2009-01-29 18:10:02 +01:00
Max Kellermann 30e2880675 tag: added support for MusicBrainz tags
Added all important id tags from the MusicBrainz wiki:

 http://musicbrainz.org/doc/MusicBrainzTag

This should automatically enable its suport in the vorbis and flac
decoder plugins.
2009-01-24 20:02:55 +01:00
Max Kellermann 276843edd5 playlist: don't unpause on delete
When you delete a song from the playlist which was paused, MPD forgot
that it was paused and started playing the next song.
2009-01-23 16:17:21 +01:00
Max Kellermann 9cad342056 playlist: recalculate the queued song after random is toggled
When the random mode is toggled, MPD did not clear the queue.  Because
of this, MPD continued with the next (random or non-random) song
according to the previous mode.  Clear the queued song to fix that.
2009-01-23 00:07:10 +01:00
Max Kellermann d47be76ce0 null: added option to disable timer synchronization
The null plugin synchronizes the playback so it will happen in real
time.  This patch adds a configuration option which disables this: the
playback will then be as fast as possible.  This can be useful to
profile MPD.
2009-01-22 16:06:47 +01:00
Max Kellermann eefe97bdb1 NEWS: update change log 2009-01-22 16:06:39 +01:00
Max Kellermann 1f0dfb4407 mapper: make the music_directory optional
Without a music_directory, MPD is an excellent streaming client.
2009-01-18 16:56:07 +01:00
Max Kellermann 9933144de7 mapper: make the playlist directory optional 2009-01-18 16:15:45 +01:00
Avuton Olrich e8c148ab02 mpd version 0.14.1 2009-01-18 14:08:42 +01:00
Max Kellermann d83eff80a5 oggvorbis: disable seeking on remote songs
When libvorbis knows that a song is seekable, it seeks around like
crazy in the file before starting to decode it.  This is very
expensive on remote HTTP resources, and delays MPD for 10 or 20
seconds.

This patch disables seeking on remote songs, because the advantages of
quickly playing a song seem to weigh more than the theoretical ability
of seeking for most MPD users.  If users feel this feature is needed,
we will make a configuration option for that.
2009-01-17 11:46:31 +01:00
Max Kellermann 953b258e5e pcm_resample_fallback: corrected the sample calculation
Due to rounding errors, it was possible that the fallback resampler
returned partial frames.
2009-01-16 18:52:01 +01:00
Max Kellermann c77c61bf3f oggvorbis: define HAVE_OGGVORBIS when tremor is enabled
When tremor (libvorbisidec) is used, HAVE_OGGVORBIS was not defined.
2009-01-15 22:54:31 +01:00
Max Kellermann f1790fc8bf input_curl: set "ready" flag on EOF
Set the "ready" flag for empty resources.
2009-01-15 16:16:55 +01:00
Max Kellermann fa3899f7b0 input_curl: call curl_multi_info_read() in constructor
To check for early connect failures, call curl_multi_info_read() in
the constructor input_curl_open().  This fixes an assertion failure.
2009-01-15 16:16:53 +01:00
Max Kellermann 09e06d9416 NEWS: merge from v0.14.x
Copy changelog items from the upcoming 0.14.1 release.
2009-01-15 16:16:37 +01:00
Max Kellermann 2c540ee8a4 playlist: safely search the playlist for deleted song
When a song file is deleted during database update, all pointers to it
must be removed from the playlist.  The "for" loop in
deleteASongFromPlaylist() did not deal with multiple copies of the
deleted song properly, and left instances of the (to-be-invalidated)
pointer in.  Fix this by reversing the loop.
2009-01-14 11:42:45 +01:00
Joe Milbourn 45598d50e3 input_curl: honour http_proxy_* config directives
If http_proxy_{host, port, user, password} are provided in mpd.conf
they are not passed on to libcurl. As a result mpd cannot stream from
behind an http proxy.

The attached patch `http_proxy.patch` makes the relevant calls to
curl_easy_setopt(...) for all proxy configuration parameters, but is
only tested for host and port.
2009-01-13 22:57:05 +01:00
Max Kellermann e4a53df7db don't exit after --create-db
Start the daemon after --create-db.  This makes --create-db a flag
which discards the old database and starts with a fresh one.
2009-01-04 20:31:23 +01:00
Max Kellermann 55b6fd2f0c player_thread: fix cross-fading duplicate chunk bug
When the decoder of the new song is not fast enough, the player thread
has to wait for it for a moment.  However the variable "nextChunk" was
reset to -1 during that, making the next loop iteration assume that
cross-fading has not begun yet.  This patch overwrites it with "0"
while waiting.
2009-01-04 14:55:02 +01:00
Max Kellermann 96c18e7d15 input_curl: enabled Icy-Metadata support 2009-01-03 23:55:03 +01:00
Max Kellermann 149f4e10cf decoder_api: moved code to do_send_tag(), free temporary tag
This patch fixes a minor memory leak: when decoder_tag() attempted to
send a merged tag object (created by tag_add_stream_tags()), and was
interrupted by a decoder command, it did not free the temporary merged
tag object.
2009-01-03 23:28:51 +01:00
Max Kellermann dcff29e5aa state_file: errors are non-fatal in read_state_file()
If the state file cannot be read, for whatever reason, don't abort
MPD.  The state file isn't _that_ important.
2009-01-03 14:53:23 +01:00
Max Kellermann 886ed1b225 mapper: fall back to XDG music directory
If no music_directory is configured, fall back to the XDG music
directory, determined by
g_get_user_special_dir(G_USER_DIRECTORY_MUSIC).
2009-01-01 19:07:38 +01:00
Viliam Mateicka 9a70c4d06d Moving mixers to audio outputs 2008-12-31 16:46:41 +01:00
Max Kellermann c01aa53e6a log: support syslog()
Allow logging to syslog if log_file is configured to "syslog".
2008-12-28 19:48:53 +01:00
Max Kellermann 8dc92ad284 log: deprecated "error_file" option
Removed the "error_file" option.  There is only one log file now.  If
a user wants to see only the errors, he should configure a log_level.
2008-12-28 19:48:52 +01:00
Avuton Olrich 4654bb4628 Update news with RVA2 and Audio archive support. 2008-12-28 13:02:41 +01:00
Avuton Olrich 571b789dd0 Modify version string to post-release version 0.15~git 2008-12-25 13:18:46 -08:00
Avuton Olrich 8b7d7f8abd MPD version 0.14 2008-12-25 13:18:46 -08:00
Max Kellermann 7950a6d612 configure.ac: disable the mikmod plugin by default
libmikmod seems to be unmaintained, and has several critical bugs
which make MPD crash.

 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461519
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476339

Disable the plugin by default to minimize harm.  Users should
explicitly enable the mikmod decoder (--enable-mod) if they wish to
have it anyway.
2008-12-24 03:24:23 +01:00
Avuton Olrich b1838b4976 Word wrap to 80 char lines 2008-12-20 19:27:02 -08:00
Avuton Olrich f2aa7c4d15 Start off with a disclaimer about the NEWS file information 2008-12-20 19:20:19 -08:00
Max Kellermann b84f20257a NEWS: added new features 2008-12-02 19:15:41 +01:00
Max Kellermann fce8fa0b31 NEWS: updated 0.14 changelog
Adding some of the most important changes since 0.13.
2008-11-05 21:30:05 +01:00
Max Kellermann 2916ef84e4 NEWS: reformatted 0.14 items
Trying to bring a little bit of structure into that list.
2008-11-05 21:29:25 +01:00
Max Kellermann c7d556f739 renamed ChangeLog to NEWS
The file name "NEWS" is standardized.
2008-10-25 21:31:13 +02:00