Max Kellermann
f6bbe1332f
replay_gain_ape: parse replay gain from APE tags
...
Based on the APE reader.
2010-11-18 22:26:06 +01:00
Max Kellermann
11613347be
tag_ape: move code to ape.c
...
Generic library for scanning APE tags. Eliminated one "goto"!
2010-11-18 21:44:24 +01:00
Max Kellermann
8f46f1520c
timer: fix integer overflow in timer_delay()
...
Fixes a regression: for output_plugin.delay(), we added a method to
the timer class which returns the delay in milliseconds. This fails
to detect negative values, because the unsigned integer is divided by
1000, and then casted to signed.
2010-11-18 21:29:03 +01:00
Max Kellermann
46ab8d18e2
playlist_song: calculate duration of last CUE track
2010-11-08 20:16:26 +01:00
Max Kellermann
f384f8da93
Merge release 0.15.15 from branch 'v0.15.x'
...
Conflicts:
NEWS
configure.ac
2010-11-08 18:50:22 +01:00
Max Kellermann
cc1debc948
output/shout: artist comes first in stream title
...
After popular demand, I've switched the order of "artist" and "title"
in the stream title. There is no standard, and there is no reliable
way to parse those from the stream title.
2010-11-08 18:46:14 +01:00
Max Kellermann
5a3aa1262a
update_walk: explicitly check for permission problems
...
Call access() and print an extra error message when EACCES is
returned. Hopefully this will reduce the number of support requests
due to wrong file permissions.
2010-11-08 18:24:19 +01:00
Max Kellermann
ad52eb236d
input/rewind: fix assertion failure
...
The assertion added in MPD 0.15.14 was too much, it failed when the
MIME type of a stream was NULL.
2010-11-08 10:37:09 +01:00
Max Kellermann
4478b3ef74
Merge release 0.15.14 from branch 'v0.15.x'
...
Conflicts:
NEWS
configure.ac
src/decoder_control.c
src/decoder_control.h
src/input/rewind_input_plugin.c
src/output_control.c
src/output_thread.c
src/player_thread.c
2010-11-07 15:30:18 +01:00
Max Kellermann
83ec0e5552
player_thread: fix assertion failure due to wrong music pipe on seek
...
When one song is played twice, and the decoder is working on the
second "instance", but the first should be seeked, the check in
player_seek_decoder() may assume that it can reuse the decoder without
exchanging pipes. The last thing was the mistake: the pipe pointer
was different, which led to an assertion failure. This patch adds
another check which exchanges the player pipe.
2010-11-05 19:24:42 +01:00
Max Kellermann
cc261872c2
decoder_control: pass music_pipe to dc_start()
...
More abstraction for decoder_control.pipe.
2010-11-05 19:18:44 +01:00
Max Kellermann
5223261f19
player_thread: add helper function player_dc_at_next_song()
...
Some abstraction for decoder_control.pipe access.
2010-11-05 19:08:59 +01:00
Max Kellermann
c594afeee7
pipe: add helper function music_pipe_empty()
2010-11-05 18:40:23 +01:00
Max Kellermann
32d10eedbd
input/rewind: remove redundant NULL check before g_free() call
2010-11-05 18:40:14 +01:00
Max Kellermann
dfd98eede7
input/rewind: add two assertions
2010-11-05 18:40:07 +01:00
Max Kellermann
a728d7a026
input/rewind: fix double free bug
...
Duplicate the "mime" attribute of the inner input_stream object,
instead of copying the pointer.
2010-11-05 18:39:40 +01:00
Max Kellermann
5a26320680
output/alsa: dump buffer and period limits
2010-11-05 10:35:46 +01:00
Max Kellermann
90dc880e67
output/httpd: implement delay()
2010-11-05 09:49:22 +01:00
Max Kellermann
e11ff967d0
output/shout: implement delay()
...
This makes the plugin more responsive to control commands, because it
will listen to control events while waiting.
2010-11-05 09:49:20 +01:00
Max Kellermann
2dc6ed7b3a
output_plugin: add method delay()
...
This method is used to reduce the delay of commands issued to the
shout plugin.
2010-11-05 09:47:43 +01:00
Max Kellermann
ad430c6617
timer: add function timer_delay()
2010-11-05 09:39:56 +01:00
Max Kellermann
e8d8bd4c0d
decoder/{mp4ff,ffmpeg}: add extension ".m4b" (audio book)
...
Same as ".m4a".
2010-11-05 02:01:35 +01:00
Max Kellermann
8d5fa754e8
output_thread: fix assertion failure due to race condition in OPEN
...
Change the assertion on "fail_timer==NULL" in OPEN to a runtime check.
This assertion crashed when the output thread failed while the player
thread was calling audio_output_open().
2010-11-04 23:44:23 +01:00
Max Kellermann
2ee047a1dd
output_internal: protect attribute "fail_timer" with mutex
2010-11-04 23:40:43 +01:00
Max Kellermann
9562f66741
output_control: lock object in audio_output_open()
...
Protect the attributes "open" and "fail_timer".
2010-11-04 23:28:18 +01:00
Max Kellermann
21223154aa
output_control: lock object in audio_output_close()
...
Protect the attributes "open" and "fail_timer".
2010-11-04 21:51:02 +01:00
Mantas Mikulenas
ec48b5ea3a
server_socket: remove AI_ADDRCONFIG
...
When you pass the flag AI_ADDRCONFIG to getaddrinfo(), it does not
consider address families on the loopback device. When run on a
machine without an external network card, just with "lo", it was
unable to look up any address.
2010-11-04 20:17:45 +01:00
Max Kellermann
754015544f
output/ffado: transfer_playback_buffers() returns a boolean
...
libffado documentation says this function returns -1 on error, but
that is a lie - it returns a boolean value, and "false" means error.
2010-11-04 20:08:04 +01:00
Max Kellermann
3f89f77429
decoder/ffmpeg: check AVCodecContext.sample_fmt value
...
.. instead of av_get_bits_per_sample_format(). The SampleFormat enum
value is authoritative.
2010-11-04 20:04:15 +01:00
Denis Krjuchkov
9dee419b7c
winmm_output: handle empty string case when parsing device id
2010-11-04 11:09:50 +05:00
Denis Krjuchkov
7612bf1bfa
winmm_output: added "device" configuration option
...
Device can be specified either by magic index (starting with 0)
or by device name.
2010-11-04 00:51:18 +05:00
Denis Krjuchkov
ad56e10e5b
winmm_output: improved test_default_device
...
If no device is available test_default_device returns false.
2010-11-03 23:31:49 +05:00
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