Commit Graph

4716 Commits

Author SHA1 Message Date
Max Kellermann
75f4772ba2 output: new output plugin "ffado"
Using libffado, to play on firewire audio devices.

Warning: this plugin was not tested successfully.  I just couldn't
keep libffado2 from crashing.  Use at your own risk.

For details, see my Debian bug reports:

  http://bugs.debian.org/601657
  http://bugs.debian.org/601659
2010-10-27 21:25:41 +02:00
Alder Hornbridge
fe1b626f76 decoder/sidplay: play mus, str, prg, x00 files 2010-10-27 21:18:43 +02:00
Alder Hornbridge
4e94516912 decoder/sidplay: play monaural SID tunes in mono 2010-10-27 21:16:24 +02:00
Tony Miller
dadb6747ad Container support for gme decoder. 2010-10-14 17:11:59 +02:00
Max Kellermann
188e1b440e playlist/rss: new playlist plugin for RSS feeds 2010-10-11 20:33:41 +02:00
Max Kellermann
a57f9e712d Merge release 0.15.13 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
	src/input/rewind_input_plugin.c
	src/output/httpd_output_plugin.c
2010-10-11 20:33:17 +02:00
Denis Krjuchkov
e6fc88a758 mixer: winmm_mixer implemented 2010-10-09 02:45:08 +06:00
Denis Krjuchkov
20004b7ee0 win32_output: renamed win32 output plugin to winmm
Win32 has many audio APIs. New name is slightly more correct.
2010-10-08 23:55:14 +06:00
Max Kellermann
84e037631d output/httpd: use the new server_socket library 2010-10-05 21:18:54 +02:00
Max Kellermann
18e3d0b504 listen: move generic code to server_socket.c 2010-10-05 21:18:54 +02:00
Max Kellermann
04c4398bfc output/httpd: don't close socket in open() failure
This cleanup call is obsolete, since we moved the binding code to
enable()/disable().
2010-10-05 21:18:54 +02:00
Max Kellermann
39e42394bd output_all: disable outputs on shutdown
Call output_plugin.disable() before output_plugin.finish().  This
ensures that all outputs are properly cleaned up, to make valgrind
happy.
2010-10-05 21:18:54 +02:00
Max Kellermann
5923cfcde3 output/httpd: MIME type audio/ogg for Ogg Vorbis
RFC 5334 10.3 defines the MIME type "audio/ogg".  We could use
"application/ogg" as well, but we know for sure that we only emit
audio data.
2010-10-03 16:22:03 +02:00
Denis Krjuchkov
e10b872fc3 main_win: replaced g_error usages with MPD_ERROR 2010-09-28 22:38:57 +06:00
Denis Krjuchkov
2b78358af5 mpd_error: more correct MPD_ERROR implementation
Original implementation does not handle
	if (...)
		MPD_ERROR("die");
	else
		...
case well. This change fixes handling of such cases.
2010-09-28 18:12:14 +02:00
Thomas Jansen
e3f4c7b91c input/rewind: enable for MMS 2010-09-28 12:56:47 +02:00
Andrew Morgan
a59ab3e2ee playlist: make single mode 'sticky' 2010-09-28 12:52:52 +02:00
Thomas Jansen
28bcb8bdf5 eliminate g_error() usage
Replaced all occurrences of g_error() with MPD_ERROR() located in a new header
file 'mpd_error.h'. This macro uses g_critical() to print the error message
and then exits gracefully in contrast to g_error() which would internally call
abort() to produce a core dump.

The macro name is distinctive and allows to find all places with dubious error
handling. The long-term goal is to get rid of MPD_ERROR() altogether. To
facilitate the eventual removal of this macro it was added in a new header
file rather than to an existing header file.

This fixes #2995 and #3007.
2010-09-25 15:00:43 +02:00
Thomas Jansen
9af9fd1400 output/httpd: bind_to_address support (including IPv6)
Added support for a new optional configuration setting for the httpd output
named "bind_to_address". Setting it to a specific IP address (v4 or v6) will
cause the httpd output to bind to that address exclusively. Supporting
multiple addresses in parallel is future work.

This implements the feature requests #2998 and #2646.
2010-09-25 15:00:43 +02:00
Thomas Jansen
0c80bd5fc0 conf: Whitespace cosmetics 2010-09-25 15:00:43 +02:00
Max Kellermann
a14cd97f56 playlist: fix "queued" check in playlist_sync()
The check was meant to fix an assertion failure, but it was the wrong
way around.  This broke cross-fading most of the time.
2010-09-23 23:29:36 +02:00
Max Kellermann
0955f33a86 decoder/mp4ff: support more variations of "album artist"
According to the mantis bug report 2847, there are several possible
variations of the "album artist" tag:

- "album artist"
- "album_artist"
- "albumartist"

This patch adds support for the latter two.
2010-09-23 21:19:41 +02:00
Max Kellermann
a016fb4048 listen: fix "unused parameter" warning on WIN32 2010-09-23 20:51:23 +02:00
Denis Krjuchkov
e8ebb1af91 main: Add Windows Service support
I've added PIPE_EVENT_SHUTDOWN because calling g_main_loop_quit() do not work when called from another thread.
Main thread was sleeping in g_poll() so I needed some way to wake it up.

By some strange reason call close(event_pipe[0]) in event_pipe_deinit() hangs.
In current implementation that code never reached so that was not a problem :-)
I've added a conditional to leave event_pipe[0] open on Win32.
2010-09-23 20:42:33 +02:00
Thomas Jansen
9fa3d7c4fa playlist_state: Fix the "state" line in the output
An '\n' was erroneously inserted in the line containing the state, e.g.
"state: \nplay" instead of "state: play".

Fix for bug #2992.
2010-09-23 20:41:23 +02:00
Thomas Jansen
54294366d5 rewind_input_plugin: Update MIME not only once
The assumption that MIME type is set only once is not valid with CURL,
as URL redirections may update the MIME type.

This fixes bug #3044.
2010-09-23 20:39:13 +02:00
Max Kellermann
9423b456a1 zeroconf-bonjour: use g_htons() instead of htons()
htons() is not available if netinet/in.h is not included.
2010-09-23 09:01:37 +02:00
Max Kellermann
64209749fb directory: cast DEVICE_INARCHIVE, DEVICE_CONTAINER to dev_t
Fix gcc warning.
2010-09-23 09:01:25 +02:00
Max Kellermann
586b7601c6 playlist_database: initialize pm.mtime 2010-09-23 09:01:23 +02:00
Max Kellermann
4425989898 fd_util: work around aliasing warning in recvmsg_cloexec() 2010-09-23 09:01:20 +02:00
Max Kellermann
5b996ab880 output/httpd: access sockaddr_storage object directly
Work around aliasing warning.
2010-09-23 09:01:17 +02:00
Max Kellermann
635cfbae13 decoder_control: use g_free() to manage mixramp allocations
Be consistent with the rest of MPD, and don't use the non-portable
header "malloc.h".
2010-09-23 08:49:21 +02:00
Qball Cow
4a7abc9d44 Correctly terminate stream_title.
This caused random data to be send via icy-server if the played
song had no tags.
2010-09-08 13:19:59 +02:00
Max Kellermann
589bb54111 input/curl: fix version check for curl_multi_timeout()
According to the CURL web site, curl_multi_timeout() was added in
version 7.15.4:

 http://curl.haxx.se/libcurl/c/curl_multi_timeout.html
2010-09-07 21:40:56 +02:00
Max Kellermann
d953225531 update_walk: update existing playlist entry
Fixes duplicate playlist entries.
2010-09-07 20:22:05 +02:00
Max Kellermann
663815ead8 playlist_vector: update_or_add() returns bool
False if the vector was not modified.
2010-09-07 20:21:19 +02:00
Max Kellermann
917434269c output/httpd: implement "pause"
Send silence to all connected clients while paused, to avoid
connection interruption.
2010-08-31 06:50:14 +02:00
Max Kellermann
a77506ae21 output/httpd: forced flush after 32 kB of input data
Avoid buffer underruns on the streaming client, if the encoder is "too
efficient" (e.g. when encoding silence while paused).
2010-08-31 06:49:06 +02:00
Johan Kiviniemi
ed5d297301 ReplayGain filter: allow gain > 100 %
The ReplayGain filter clamped the gain to max. 100 % even if the
algorithm determined the signal needed a boost. That would result in any
such tracks being played with too low volume, effectively defeating the
purpose of the filter.
2010-08-23 16:34:11 +03:00
Max Kellermann
64dacd175a output_thread: fix race condition after CANCEL command
Clear the notification before finishing the CANCEL command, so the
notify_wait() after that will always wait for the right notification,
sent by audio_output_all_cancel().
2010-08-19 11:05:24 +02:00
Max Kellermann
625e4755d1 notify: add function notify_clear() 2010-08-19 11:03:53 +02:00
Max Kellermann
68c02fc95a fd_util: add function dup_cloexec()
Unfortunately, there's no "optimized" implementation here.  We can't
use Linux's proprietary system call dup3(), because it would require
us to specify the new descriptor.
2010-08-03 18:03:55 +02:00
Max Kellermann
d18c1b1a0a fd_util: add function recvmsg_cloexec() 2010-08-03 17:51:35 +02:00
Max Kellermann
c980fc653d fd_util: add function socketpair_cloexec() 2010-08-03 17:51:35 +02:00
Max Kellermann
013ebb638a playlist_song: fix memory leak
Free the temporary path string in apply_song_metadata().
2010-07-25 13:35:59 +02:00
Max Kellermann
bedb82bf4d directory: free playlist vector in directory_free() 2010-07-25 13:31:39 +02:00
Max Kellermann
cbb1ab58cd queue_save: save tags and range of non-database songs
Use the functions song_save() and song_load() to use the same format
as in the database file for those songs which need the tags.
2010-07-25 13:28:54 +02:00
Max Kellermann
b01235e330 song_save: save start_ms and end_ms
While this is not useful for the database, it may become useful for
reusing this code for the state file.
2010-07-25 13:28:52 +02:00
Max Kellermann
8341a9f7b2 queue_save: simplify get_song()
Don't try db_get_song() if the URI has a scheme.
2010-07-25 13:28:48 +02:00
Max Kellermann
b233c145fa {queue,song}_print: print relative paths if possible
If a song with an absolute path points inside the music directory,
print only the relative part.  This happens when partial songs from a
playlist file were loaded.
2010-07-25 13:28:39 +02:00
Max Kellermann
9de5bb9e23 queue_print: hide HTTP password in the "playlist" command
I've already changed the "playlistinfo" command to hide HTTP
passwords, but forgot to do the same for the simpler "playlist"
command.  This patch changes queue_print_uris() to use the code from
song_print_uri().
2010-07-25 13:24:19 +02:00
Max Kellermann
0c5305c51f queue_save: move code to queue_save_song() 2010-07-25 12:43:54 +02:00
Max Kellermann
63c9a20f96 queue_save: queue_load_song() returns void
The only caller doesn't use its return value, and the value isn't
useful anyway.
2010-07-25 12:43:18 +02:00
Max Kellermann
b40c0811f4 song_save: song_load() returns NULL instead of false 2010-07-25 12:23:52 +02:00
Max Kellermann
838790fc2d state_file: use the text_file library
Don't use a large stack buffer.
2010-07-25 12:01:59 +02:00
Max Kellermann
1ff2d5b689 playlist_state: simplify printf() calls
Let the C compiler concatenate string constants.
2010-07-25 12:01:59 +02:00
Max Kellermann
e4b7a113fd database, ...: remove EINTR checks after stdio calls
MPD doesn't have child processes anymore, and thus we're not expecting
to receive SIGCHLD very often.  Since hard disk access isn't
interrupted by signals anyway, we don't need those excessive checks.
2010-07-25 12:01:59 +02:00
Max Kellermann
7820ebb82e directory_save: duplicate the playlist name
The function playlist_metadata_load() will overwrite the input buffer
before using the "name" parameter; since "name" points to the same
buffer, we'll get a corrupted string.
2010-07-25 12:01:59 +02:00
Rasi
31ab0b3df1 Added album tag support for libgme decoder 2010-07-23 23:13:03 +02:00
Max Kellermann
e598922133 update: store playlist files in database
Don't open the music directory for each "lsinfo" call.  Get the list
of playlist files from the memory database.
2010-07-21 09:26:50 +02:00
Max Kellermann
e21ad70f3f song_save: pass const songvec to songvec_save() 2010-07-21 09:26:50 +02:00
Max Kellermann
a81cb932c2 song_save: include cleanup 2010-07-21 09:26:46 +02:00
Max Kellermann
3d66a4fee8 database: remove outdated comment 2010-07-21 09:20:14 +02:00
Max Kellermann
dea5601e79 tag_rva2: move code to rva2_apply_data() 2010-07-20 23:05:24 +02:00
Max Kellermann
43a840552f tag_rva2: add struct rva2_data
.. and several accessor inline functions, to simplify the calling
code.
2010-07-20 23:05:06 +02:00
Max Kellermann
2f16f8e9f7 tag_rva2: name the CHANNEL_* enum 2010-07-20 23:05:01 +02:00
Max Kellermann
4364b30c42 decoder/mad: move RVA2 code to tag_rva2.c 2010-07-20 23:03:54 +02:00
Max Kellermann
c0da938d4f Merge release 0.15.12 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
2010-07-20 23:03:06 +02:00
Max Kellermann
fb19aa355e replay_gain_info: fix indentation 2010-07-20 22:59:04 +02:00
Max Kellermann
1f976d6e54 input/curl: remove assertion after curl_multi_fdset()
Some users reported that MPD crashes when using a new CURL version
with the threaded DNS resolver enabled.  It seems that
curl_multi_fdset() returns no file descriptor when the DNS resolver
runs in another thread, so MPD does not have any event to wait for.

On the CURL mailing list, somebody suggested to sleep for a fixed
amount of time.  This is not an elegant solution, because daemons
should never have to sleep without waiting for an event.  I hope the
CURL developers will review the API and remove the threaded DNS
resolver.

Meanwhile, I'm removing the assertion in question, to allow those
unfortunate users running the latest CURL version to continue using
MPD.
2010-07-20 22:55:13 +02:00
Max Kellermann
a4908dca42 input/curl: query timeout from CURL
Use curl_multi_timeout() to determine the select() timeout, instead of
hard-coding one second.
2010-07-20 22:37:34 +02:00
Max Kellermann
8b055c3127 tag_rva2: set "gain", not "peak"
RVA2 tags only store the "gain" value, there is no "peak" attribute.
2010-07-20 22:32:55 +02:00
Max Kellermann
172182b18f decoder/mad: parse_rva2() returns bool 2010-07-20 18:27:11 +02:00
Max Kellermann
898a13f196 decoder/wildmidi: support version 0.2.3
In libwildmidi 0.2.3, the function WildMidi_SampledSeek() was removed,
without changing the SO name.  This patch adds an autoconf check for
that function.  Fall back to WildMidi_FastSeek() if
WildMidi_SampledSeek() is not available anymore.
2010-07-20 18:23:56 +02:00
Max Kellermann
2bc5161e95 Merge release 0.15.11 from branch 'v0.15.x
Conflicts:
	NEWS
	configure.ac
	src/decoder/ffmpeg_decoder_plugin.c
	src/decoder/mikmod_decoder_plugin.c
	src/decoder/mp4ff_decoder_plugin.c
	src/decoder/vorbis_decoder_plugin.c
	src/directory_print.c
	src/playlist_control.c
	src/tag_ape.c
2010-07-19 23:49:15 +02:00
Max Kellermann
e2e8d0d2f3 decoder/ffmpeg: fix libavformat 0.6 by using av_open_input_stream()
libavformat 0.6 does not pass the original URI pointer to the "open"
method, which leads to a crash because MPD was using a dirty hack to
pass a pointer to that method.

This patch switches to av_open_input_stream() with a custom
ByteIOContext class, instead of doing the URI string hack with
av_open_input_file().

Loosely based on a patch from Jasper St. Pierre.
2010-07-19 23:03:06 +02:00
Max Kellermann
b2e3c0757b decoder/ffmpeg: manual format probing
Use the libavformat function av_probe_input_format() to probe the
AVInputFormat, instead of letting av_open_input_file() do it
implicitly.  We will switch to av_open_input_stream() very soon, which
does not have the probing code.

Loosely based on a patch from Jasper St. Pierre.
2010-07-19 22:59:59 +02:00
Anton Khirnov
0fc0196dba ffmpeg: read the audio stream metadata in addition to global
in some formats, e.g. vorbis, the metadata is stored per-stream.
2010-07-12 11:36:55 +02:00
Anton Khirnov
1492324c76 ffmpeg: factor tag_type <-> ffmpeg tag name maps into a table. 2010-07-12 11:36:55 +02:00
Max Kellermann
49bc317fb8 decoder/ffmpeg: fix libavformat 0.6 by using av_open_input_stream()
libavformat 0.6 does not pass the original URI pointer to the "open"
method, which leads to a crash because MPD was using a dirty hack to
pass a pointer to that method.

This patch switches to av_open_input_stream() with a custom
ByteIOContext class, instead of doing the URI string hack with
av_open_input_file().

Loosely based on a patch from Jasper St. Pierre.
2010-06-30 23:41:32 +02:00
Max Kellermann
375a09d6f6 decoder/ffmpeg: manual format probing
Use the libavformat function av_probe_input_format() to probe the
AVInputFormat, instead of letting av_open_input_file() do it
implicitly.  We will switch to av_open_input_stream() very soon, which
does not have the probing code.

Loosely based on a patch from Jasper St. Pierre.
2010-06-30 23:40:31 +02:00
Max Kellermann
0265c34bed decoder/ffmpeg: free URI, fix memory leak
Free the string allocated by decoder_get_uri().
2010-06-30 23:40:04 +02:00
Max Kellermann
a1882f48be decoder/vorbis: handle uri==NULL
This fixes a theoretical crash, which has never occurred in practice.
2010-06-30 23:38:49 +02:00
Anton Khirnov
c3569814bd ffmpeg: read more metadata. 2010-06-30 23:18:45 +02:00
Max Kellermann
814daac5ba decoder/ffmpeg: free AVFormatContext on error
Fix a memory leak in some code paths.
2010-06-30 23:14:43 +02:00
Max Kellermann
768be22f7c pcm_buffer: make the buffer pointer "void" 2010-06-30 21:55:46 +02:00
Max Kellermann
ec89ce5a8a decoder/mp4ff: support tag "album artist"
We already supported "albumartist", but it seems some folks also use
"album artist" (with a space).
2010-06-30 21:55:03 +02:00
Andreas Vögele
34415bf0b6 Make get_remote_uid() work on BSD
I've attached a patch that will make file URIs work on operating systems
that provide the getpeereid() function call to check the user ID of the
peer connected to a UNIX domain socket.
2010-06-30 21:42:01 +02:00
Max Kellermann
0a0c78674f playlist: emit IDLE_OPTIONS when resetting single mode 2010-06-30 21:40:33 +02:00
Max Kellermann
1bffdabe41 directory_print: return void
There is no useful return value here.
2010-06-30 21:39:34 +02:00
Max Kellermann
77e6810c14 decoder/mikmod: fix memory leak
The return value of Player_LoadTitle() is allocated with malloc(), and
must be freed by the caller.
2010-06-30 19:37:36 +00:00
Max Kellermann
5ebe33653c decoder/mp4ff: remove duplicate entries in the tag name table
Reuse the function tag_name_parse_i().
2010-06-30 21:36:15 +02:00
Max Kellermann
8e3eace289 decoder/mp4ff: moved code to mp4ff_tag_name_parse() 2010-06-30 21:36:00 +02:00
Max Kellermann
284659034d tag_ape: remove duplicate entries in the tag name table
Reuse the function tag_name_parse_i().
2010-06-30 21:33:19 +02:00
Max Kellermann
9550c87327 tag: added function tag_name_parse()
Convert a string into a tag_type enum.
2010-06-30 21:31:45 +02:00
Max Kellermann
e223e8a5b5 tag_ape: move code to tag_ape_name_parse() 2010-06-30 21:30:21 +02:00
Max Kellermann
4d6d372a5b decoder/vorbis: use single global ov_callbacks constant
Initialize the ov_callbacks struct at compile time.
2010-06-30 19:24:41 +00:00
Max Kellermann
0aeec90590 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-06-30 21:22:13 +02:00
Max Kellermann
cfcd84655c decoder/mp4ff: use tag_table.h to parse tag names
Convert if/else/else/... to a loop.
2010-06-30 21:19:30 +02:00
Max Kellermann
5092eaf1cc tag_ape: move table lookup to tag_table.h
Allow code sharing.
2010-06-30 21:18:27 +02:00
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
026bd15872 tag_ape: simplified the apeItems array
Make "enum tag_type" the array index, and convert apeItems to a sparse
array.
2010-06-30 21:15:52 +02:00
Max Kellermann
7cca55549b tag_ape: moved code to tag_ape_import_item()
Improve code readability.
2010-06-30 21:15:39 +02:00
Max Kellermann
c7e89ea3a3 tag_ape: converted apeItems and tagItems to global vars
Don't initialize those arrays each time tag_ape_load() is called.
2010-06-30 21:15:14 +02:00
Max Kellermann
5a2820ca3d pcm_buffer: make the buffer pointer "void" 2010-06-30 08:21:48 +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
5216cfb3c8 playlist_print: use playlist_open_any()
Allow printing remote playlists with the commands "listplaylist" and
"listplaylistinfo".
2010-06-25 22:43:52 +02:00
Max Kellermann
373d1843a8 playlist_queue: use playlist_open_any() 2010-06-25 22:43:52 +02:00
Max Kellermann
82ee278f53 playlist_any: new library to simplify opening playlist files
The new function playlist_open_any() combines playlist_mapper_open(),
playlist_list_open_uri() and playlist_list_open_stream(), providing an
easy API for all of them.
2010-06-25 22:43:52 +02:00
Max Kellermann
c27fc26ecd playlist_list: probe plugin without MIME attributes
If the MIME type of a stream contains a semicolon, remove it and the
text after it to probe for a playlist plugin.
2010-06-25 22:43:52 +02:00
Max Kellermann
fba13bd5d2 playlist_queue: simplify error handler
Return early on error, save one level of indent.
2010-06-25 22:37:34 +02:00
Max Kellermann
68f75955d8 playlist_list: moved input_stream.ready loop to calling function
Merged both loops into playlist_list_open_stream().  This is needed
because playlist_list_open_stream() needs to know the MIME type, which
is only known after the stream has become "ready".
2010-06-25 22:37:34 +02:00
Max Kellermann
cd21cfc115 uri: really count dots in verify_uri_segment()
This buggy implementation failed to allow "..." sequences, because the
dot count was always zero.  The usefulness of allowing "..." (or more
dots) is debatable, but since it's a valid file name, we allow it.
2010-06-25 21:56:12 +02:00
Max Kellermann
1ea10db953 playlist/cue: last track ends at end of file
libcue's track_get_length() returns 0 for the last track, because that
information is not available in the CUE sheet.  This makes MPD quit
playing the last track immediately.  If we set "song.end_ms=0", MPD
will play the track until the end of the song file, which is what we
want.
2010-06-25 20:02:55 +02:00
Max Kellermann
6bb7a7439d song_print: simplified start_ms/end_ms check 2010-06-25 20:02:55 +02:00
Aaron Griffith
ca6110d92f playlist_list: wait for input stream to become ready
Fixes an assertion failure in the input_stream_seek() call.
2010-06-25 19:20:20 +02:00
Andreas Vögele
dda5415def Make get_remote_uid() work on BSD
I've attached a patch that will make file URIs work on operating systems
that provide the getpeereid() function call to check the user ID of the
peer connected to a UNIX domain socket.
2010-06-19 13:47:10 +02:00
Andrzej Rybczak
4347114455 client: increase send_buf from 4kB to 16kB
this greatly improves performance of commands that return a lot
of data, e.g. search results or recursive content of a directory,
while being connected to local mpd via tcp/ip socket.
2010-06-19 13:45:54 +02:00
Max Kellermann
9fb26b5617 playlist: check "queued" before calling playlist_update_queued_song()
Workaround for an assertion failure.
2010-06-19 13:45:15 +02:00
Max Kellermann
442b327582 playlist: protect acess to player state in playlist_sync() 2010-06-19 13:33:39 +02:00
Max Kellermann
cff727644d playlist: move checks out of playlist_sync_with_queue()
Rename the function to playlist_song_started(), which gets only called
if the song has actually started.
2010-06-19 13:33:32 +02:00
Max Kellermann
7f80349494 player_control: hold mutex in pc_play(), pc_pause()
Race condition fix.
2010-06-19 13:19:30 +02:00
Max Kellermann
d0d2d6ed1b filter/route: fixed unsigned/signed comparison
Fixes a clang warning.
2010-06-06 21:56:30 +02:00
Tim Phipps
4e83b79d2b output/httpd: add libwrap support
libwrap support is in MPD but only for the control port.  This patch
adds support for the http port.  The code is copied from
src/client_new.c
2010-06-06 21:53:24 +02:00
Max Kellermann
37e69a89b9 directory_print: print a list of playlist files in "lsinfo"
Print those files which can be handled by a playlist plugin.
2010-06-01 10:00:01 +02:00
Max Kellermann
6f28eb4c0a playlist_list: export playlist_suffix_supported() 2010-06-01 09:59:56 +02:00
Max Kellermann
caf93d9a2c playlist_list: playlist_list_open_path() returns input_stream
Memory leak fix.  The input_stream object passed to
playlist_list_open_stream_suffix() must be closed by the caller - this
however never happens in playlist_list_open_path(), because it does
not return it to the caller.
2010-06-01 09:59:54 +02:00
Max Kellermann
747e945d29 playlist_list: move fallback g_uri_parse_scheme() to glib_compat.h 2010-06-01 09:59:52 +02:00
Max Kellermann
067d7212bf playlist: emit IDLE_OPTIONS when resetting single mode 2010-06-01 09:59:46 +02:00
Romain Bignon
867b93a5b2 single mode: at the end of the song, pause on the next song instead of stop 2010-05-31 23:36:16 +02:00
Max Kellermann
53647c8ba1 directory_print: return void
There is no useful return value here.
2010-05-31 22:16:03 +02:00
Romain Bignon
b571ba27a4 fix crash when decoder is NULL 2010-05-31 22:11:59 +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
2c1c588868 decoder/mikmod: duplicate the path only once 2010-05-31 10:22:08 +02:00
Max Kellermann
e271f69a34 decoder/mikdmod: moved local variable declarations in tag_dup() 2010-05-31 10:16:09 +02:00
Max Kellermann
39105f2119 decoder/wildmidi: moved local variable declarations in tag_dup() 2010-05-31 10:14:48 +02:00
Max Kellermann
4e080a9b06 decoder/gme: replace macro GME_BUF_SIZE
Added macros with better names: GME_BUFFER_FRAMES, GME_BUFFER_SAMPLES
(the former only used to calculate the latter).
2010-05-31 10:03:43 +02:00
Max Kellermann
d55740808d decoder/gme: added constants for sample rate and channels
Move into enums.
2010-05-31 10:02:43 +02:00
Max Kellermann
6566038df9 decoder/gme: pass the whole buffer to decoder_data()
Pass sizeof(buf) to decoder_data(), not the number of samples (which
is half the size).  At the same time, pass GME_BUF_SIZE to gme_play()
- libgme really wants to get the number of samples, not the number of
stereo frames.  Previously, this plugin had been using only the first
half of the buffer.
2010-05-31 09:57:15 +02:00
Max Kellermann
f0faf00320 decoder/gme: allocate tag later, fixes memory leak
Allocate the "tag" object after the file has been opened successfully.
2010-05-31 09:43:25 +02:00
Max Kellermann
51c7577c8f decoder/mp4ff: rename and move local variable
Allocate the "tag" object after the file has been checked.  That
removes one tag_free() call in an error handler.
2010-05-31 09:35:49 +02:00
Max Kellermann
be308c6657 decoder/mp4ff: merge code into mp4ff_input_stream_open() 2010-05-31 09:29:45 +02:00
Max Kellermann
1729a0b437 decoder/mp4ff: move mp4ff_callback_t into mp4ff_input_stream
Allocate only one item on the stack.
2010-05-31 09:23:27 +02:00
Max Kellermann
1b2fc2ae19 decoder/mp4ff: rename mp4_context to mp4ff_input_stream 2010-05-31 09:22:42 +02:00
Max Kellermann
58a75f0b78 decoder/mp4ff: remove duplicate entries in the tag name table
Reuse the function tag_name_parse_i().
2010-05-31 08:48:41 +02:00
Max Kellermann
daf6e2b5da decoder/mp4ff: moved code to mp4ff_tag_name_parse() 2010-05-31 08:47:59 +02:00
Max Kellermann
71da5b026c tag_ape: remove duplicate entries in the tag name table
Reuse the function tag_name_parse_i().
2010-05-31 08:24:05 +02:00
Max Kellermann
2f68ea635b tag_ape: move code to tag_ape_name_parse() 2010-05-31 08:22:53 +02:00
Max Kellermann
ca08c4dbf4 decoder/vorbis: rename local variable "ret" 2010-05-31 00:06:37 +02:00
Max Kellermann
8af52fa205 decoder/vorbis: implement method stream_tag()
This allows tags in archive files.
2010-05-31 00:02:57 +02:00
Max Kellermann
3b0bf856c4 decoder/vorbis: move code to vorbis_open_stream() 2010-05-31 00:00:04 +02:00
Max Kellermann
28f5803d34 decoder/vorbis: use single global ov_callbacks constant
Initialize the ov_callbacks struct at compile time.
2010-05-30 23:59:36 +02:00
Max Kellermann
0b72299857 decoder/vorbis: rename struct vorbis_decoder_data to vorbis_is 2010-05-30 23:57:58 +02:00
Max Kellermann
4a2302c2ed inotify_update: follow symlinks
This is probably unsafe, and doesn't protect against symlink loops,
but we will eventually add this when we bring update*.c and inotify*.c
closer together.
2010-05-30 23:45:47 +02:00
Max Kellermann
980201a665 inotify_update: fix assertion failure when music dir is deleted
This shouldn't really happen, but insane users might delete/rename the
music directory while MPD runs.  What was even more insane was that
MPD crashed due to this.  This is a workaround - there is currently
nothing useful we can do in this case; except maybe poll for the music
directory to reappear, but that's too much trouble for a user error.
2010-05-30 23:45:46 +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
4028d03a6e decoder/mp4ff: use tag_table.h to parse tag names
Convert if/else/else/... to a loop.
2010-05-30 22:52:45 +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
8c581eca4d tag_ape: move table lookup to tag_table.h
Allow code sharing.
2010-05-30 22:52:19 +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
Max Kellermann
442d2e74e3 decoder/mad: fix buffer variable name on !HAVE_ID3TAG 2010-05-30 17:27:03 +02:00
Daniel Seuthe
e8310211e2 filter/replay_gain: added option "replaygain_limit" 2010-05-30 17:06:08 +02:00
Avuton Olrich
894573657d cmdline: Add default config paths for win32. 2010-05-20 06:56:43 -07:00
Max Kellermann
9cce1d749a output/win32: new output plugin for Windows Wave 2010-05-20 09:33:05 +02:00
Max Kellermann
ed0b48040c pcm_buffer: 8 kB alignment instead of 64 kB
Reduce the overhead.  Most buffers used by MPD are around 2 to 4 kB.
8 kB seems large enough to keep heap fragmentation low.

Additionally, this patch fixes an off-by-one error in the alignment
formula.
2010-05-20 09:31:51 +02:00
Max Kellermann
eda46bc07f tag_{id3,ape}: explicitly open files in binary mode
Add the flag "b" to fopen().  Windows compatibility.
2010-05-20 09:14:11 +02:00
Max Kellermann
c727e86980 input/file, output/{fifo,recorder}: add O_BINARY to open() flags
Windows compatibility.
2010-05-20 09:13:39 +02:00
Max Kellermann
57b4013306 client: use sprintf() on WIN32
On mingw32, snprintf() expects a 64 bit integer instead of a "long
int" for "%li" - this is not consistent with our expectation, so we're
using plain sprintf().
2010-05-19 13:12:37 +02:00
Max Kellermann
8248f498b2 event_pipe: use g_io_channel_read_chars() to drain the pipe
For some unknown reason, read() blocks on WIN32, even though it was
invoked inside the G_IO_IN callback.  By switching to GIOChannel
functions, this problem is solved, and it works on both Linux and
Windows.
2010-05-19 11:37:39 +02:00
Max Kellermann
22f3ffb099 event_pipe: call g_io_channel_win32_new_fd()
On WIN32, use g_io_channel_win32_new_fd() instead of
g_io_channel_unix_new().  There doesn't seem to be a practical
difference, but it seems more correct.
2010-05-19 11:37:22 +02:00
Max Kellermann
81bd8ef73c update_walk: don't check recursive symlinks on WIN32
inode numbers don't work on WIN32, and very few WIN32 users actually
use symlinks - seems ok to disable that check.
2010-05-19 11:36:07 +02:00
Max Kellermann
bedc172eab crossfade: emulate strtok_r() on WIN32 with a function
Not a CPP macro.  This adds the "unused" attribute to "saveptr", which
eliminates one gcc warning.
2010-05-18 23:56:53 +02:00
Max Kellermann
0a9b0dd070 command: fallback strftime() formats on WIN32
On WIN32, "%F" and "%T" are not implemented.
2010-05-18 23:54:12 +02:00
Max Kellermann
6aa0f61e15 socket_util: fix setsockopt() argument type on WIN32
In the winsock headers, the setsockopt() argument is declared as
"const char *", not "const void *".
2010-05-18 23:13:05 +02:00
Max Kellermann
4461c3d5d1 daemon: include glib.h on WIN32 for g_error() 2010-05-18 23:13:05 +02:00
Max Kellermann
fef46bcf49 fd_util: fd_set_cloexec() returns a value on WIN32
This function is empty on WIN32, but we need to return a value.
2010-05-18 23:09:07 +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
6b2b91ff01 input/mms: removed empty method buffer()
input_stream_buffer() has a check for "buffer==NULL", so we don't need
an explicit empty implementation.
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
Daniel Seuthe
733962db2f decoder_api: return effective replay gain
Pay attention to the ReplayGain mode "auto" and the
replay_gain_missing_preamp parameter inside of decoder_replay_gain().
2010-05-18 20:39:32 +02:00
Daniel Seuthe
f824ecdfa1 replay_gain_config: added function replay_gain_get_real_mode() 2010-05-18 20:30:03 +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
Max Kellermann
67c48f66a6 output/oss: rewrite of the audio format detection
Removed the "supported" / "unsupported" arrays, and auto-detect on
every open() call, just like the ALSA output plugin.
2010-05-13 14:42:09 +02:00
Max Kellermann
5fa1c703de output/oss: use the *_NE macros
Removed the macro AFMT_S16_MPD.
2010-05-13 14:34:22 +02:00
Avuton Olrich
bead892e21 AudioCompress: include stdint.h for int16_t definition.
In mingw32, int16_t is not defined by sys/types.h, but it is by stdint.h,
and it is in the int16_t man page as being defined in stdint.h. Thanks to
mithi for help debugging.
2010-05-11 18:48:22 -07:00
Avuton Olrich
8341daca4a client_new: Send greeting using send() rather than write().
This is portable for win32 and fixes client logins there.
2010-05-08 16:48:01 -07:00
Tim Phipps
136759a298 mixramp: Remove maths from pcm_mix when using MixRamp overlaps. 2010-05-08 09:28:06 +02:00
Tim Phipps
0ac5b6e613 mixramp: Adjust MixRamp threshold to account for ReplayGain. 2010-05-08 00:19:44 -07:00
Avuton Olrich
eb5208c4f9 log: /dev/null doesn't exist on win32. 2010-05-08 00:17:34 -07:00
Max Kellermann
d88c3c8462 output_thread: call replay gain filter manually
Don't add it to the filter chain, because we need to apply replay gain
before cross-fading with the next song.  Add a second replay_gain
filter which is used for the song being faded in (chunk->other).
2010-05-02 18:21:16 +02:00
Max Kellermann
5399a72ec1 player_thread: move cross-fading to output thread
Remove cross_fade_apply(), and call pcm_mix() in the output thread,
mixing the chunk and chunk->other together.
2010-05-02 17:46:07 +02:00
Max Kellermann
d093fb2441 chunk: added attribute "other"
Preparation for cross-fading support in the output thread.
2010-05-02 17:46:06 +02:00
Max Kellermann
0140804ef9 output_thread: moved code to ao_filter_open(), ao_filter_close() 2010-05-02 17:38:16 +02:00
Max Kellermann
ecb5f68ba8 output_thread: moved filter invocation to ao_filter_chunk() 2010-05-02 17:34:35 +02:00
Max Kellermann
55bf242635 filter/replay_gain: removed duplicate *dest_size_r assignment 2010-05-02 17:34:27 +02:00
Daniel Seuthe
92e66e5ab2 replay_gain: added mode "auto" 2010-04-25 13:51:58 +02:00
Max Kellermann
cf3ada3d04 Merge branch 'master' of git://github.com/mcfiredrill/mpd 2010-04-20 21:16:39 +02:00
Max Kellermann
8d631b346a inotify_update: start update when directory is created
This is useful at the maximum depth level, to update newly created
directories.  It is however questionable if the hard-coded 5 seconds
delay is enough to create new directory trees with all of their files,
but we might make that delay configurable in the future.
2010-04-13 23:37:44 +02:00
Max Kellermann
393bcd961a inotify: added setting "auto_update_depth"
Limits the depth of the watched directories.  This is useful to keep
resource usage down and speed up MPD startup.
2010-04-13 21:31:57 +02:00
Max Kellermann
4d1eedbaa2 conf: added function config_get_unsigned() 2010-04-13 21:19:07 +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
Charles Kerr
6a95898038 decoder/ffmpeg: fix crash on startup in mpd_ffmpeg_log_callback()
What's happening is the `ptr' argument to that function is NULL for me
every time. `ptr' is unconditionally dereferenced to generate a log
message, and this is where mpd crashes.

Attached is a simple patch that tests for NULL and omits the log. With
this patch the crash disappeared and mpd went back to working well.
2010-04-11 19:18:30 +02:00
Tony Miller
9d55b16998 Decoder for game music emulation library.
Supports a number of videogame music formats, more info here:
http://www.fly.net/~ant/libs/audio.html

I wrote this plugin for the latest svn, get it here:
http://code.google.com/p/game-music-emu/source/checkout
2010-04-10 01:05:16 -07:00
James Pike
c52f469c9c output/httpd: added name/genre/website configuration 2010-04-05 13:11:10 +02:00
Orivej Desh
50c0c4b701 cue: fix code style 2010-04-01 08:12:25 +02:00
Max Kellermann
8446b70ddc decoder/ffmpeg: print item name in log callback 2010-03-28 19:48:57 +02:00
Orivej Desh
635791d1cd cue: prepend pregap to the beginning of the track
.. rather then append to the end of the previous one

Cuebreakpoints from the cuetools package has three modes of operation,
and the default is to append pregap (INDEX 00) to the end of the
previous track. This is the behavior most compliant to the existing
cue files.

Here is the patch which fixes the issue. I borrowed bits of
implementation from cuebreakpoints. I assumed that the whole audio
file must be covered by head-to-head going tracks, which is how
hardware CD players probably work. In cue_tag I changed rounding from
rounding up to rounding down because the thing in mpd which calculates
actual track duration (and current position) rounds it down, and I
didn't want to see in my playlist values different from whose in a
now-playing progress bar.

I've compared the resultant mpd behaviour with "mplayer -ss MM:SS.MS"
where the time was supplied by cuebreakpoints and noticed that mplayer
started each track a bit earlier then mpd, though this was the same
before the patch.
2010-03-28 19:34:16 +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
06f86b4532 Add support for building httpd_output plugin for win32 2010-03-22 07:15:39 -07:00
Avuton Olrich
68ece2fef3 Define winnt or greater on mingw32 to take advantage of get*info(). 2010-03-21 18:45:32 -07:00
Avuton Olrich
4953ea90c2 strtok() is recursive by default on win32. 2010-03-21 18:24:24 -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
Max Kellermann
2e72a9b262 tag: added function tag_merge_replace()
Like tag_merge(), but can deal with NULL parameters, and frees both
tag objects.
2010-03-17 23:12:21 +01:00
Max Kellermann
e9b75d462c AudioCompress: explicitly include stdint.h
For int16_t.
2010-03-17 18:29:56 +01:00
Max Kellermann
68017b1254 decoder_api: use the correct format to calculate elapsed time
When decoder->timestamp is calculated, the PCM data is already
converted to out_audio_format; using in_audio_format may cause funny
speedups/slowdowns.
2010-03-17 18:26:36 +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
469c9b5def command: allow "update" with slash or empty path
When handle_update() was modified to use uri_safe_local(), suddently
"mpc update ''" and "mpc update '/'" stopped working, because both are
not a "safe" local URI.  This patch adds a special case for these, to
retain backwards compatibility.
2010-03-12 17:58:16 +01:00
Max Kellermann
e686d19154 output: added option "always_on" for radio stations
Did you ever accidently click "stop" while feeding a radio station?
This option sets the output device to "pause" to disable the "close"
method.  It falls back to "pause" then, which is specific to the
plugin.  Some plugins implement it by feeding silence.
2010-03-10 19:49:31 +01:00
Max Kellermann
762565e9d1 output/jack: drain the ring buffers during pause
If we're not doing this, and a new song is played after pause ends,
then you will hear the rest of the previous song.
2010-03-10 19:48:49 +01:00
Max Kellermann
41a4662c8c output/jack: synchronize all channels
Always use the same number of samples from each channel's ring
buffer.  This ensures that all channels are kept in sync.
2010-03-10 19:48:34 +01:00
Max Kellermann
5842015b90 decoder/ffmpeg: fix indentation 2010-03-07 19:20:34 +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
4e364854ab decoder/ffmpeg: don't close the AVFormatContext after open failure
The pointer is invalid if av_open_input_file() fails.
2010-02-27 19:25:56 +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
43cf4e97b9 uri: allow leading dots, but explicitly exclude "." and ".."
Dots at the beginning of an URI segment are ok, as long as the special
names "." and ".." are not used.
2010-02-27 18:56:47 +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
795578ef95 update: log start/finish of the update thread 2010-02-27 16:41:54 +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
Max Kellermann
5e0117b444 replay_gain_info: allocate the struct statically
Don't allocate each replay_gain_info object on the heap.  Those
objects who held a pointer now store a full replay_gain_info object.
This reduces the number of allocations and heap fragmentation.
2010-02-17 07:22:44 +01:00
Max Kellermann
c05e6a1275 replay_gain_info: use INFINITY to mark undefined values
The previous patch not only moved code, it also changed the check.
Negative gain values seem to be valid after all, there just was the
"magic" value 0.0 which means "not available".  This patch changes the
"magic" value to "INFINITY", and uses the C99 function isinf() to
check.  It might have been a better idea to use "NAN", but the "NAN"
macro is a GNU extension.
2010-02-17 07:07:00 +01:00
Max Kellermann
b21e4d9a58 replay_gain_state: moved code to replay_gain_tuple_scale()
Moved (and renamed) the function calc_replay_gain_scale() to
replay_gain_info.c.
2010-02-15 21:23:24 +01:00
Max Kellermann
eeef501ed8 replay_gain: added function defined()
This function determines whether replay gain data is available.
2010-02-15 19:09:24 +01:00
Max Kellermann
f4e9275f7c filter/volume: assign dest_size_r early, eliminate one 2010-02-15 19:09:09 +01:00
Max Kellermann
059d1dc7f2 command: "listplaylist" dumps playlist files
Same for "listplaylistinfo".
2010-02-08 11:11:43 +01:00
Max Kellermann
7fbb856eee playlist_queue: moved code to playlist_mapper.c 2010-02-08 10:56:28 +01:00
Max Kellermann
bb2aa70ec6 playlist_queue: moved check_translate_song() to playlist_song.c 2010-02-08 10:28:12 +01:00
Max Kellermann
8e34c59c82 song_print: song_print() returns void
The only "return" statement always returns 0.
2010-02-08 10:21:15 +01:00
Anton Khirnov
766b9fd453 ffmpeg: read more metadata. 2010-02-02 17:55:58 +01:00
Tim Phipps
891dab7b91 decoder/flac: fix replay gain (short-circuiting "or") 2010-01-28 20:54:04 +01:00
Davide Camurri
7a62818ffd client: optionally use libwrap 2010-01-20 21:04:07 +01:00
Max Kellermann
acb0ff1ea8 decoder/wavpack: fixed WVC URI
Pass the current URI to wavpack_open_wvc().
2010-01-20 12:08:44 +01:00
Max Kellermann
2acad9fe1e decoder/ffmpeg: call decoder_timestamp() once per packet 2010-01-18 13:11:04 +01:00
Max Kellermann
8914ebc964 decoder/ffmpeg: merged ffmpeg_helper() into ffmpeg_decode() 2010-01-18 11:06:09 +01:00