Max Kellermann
69d9716f8b
update: added missing config.h includes
...
This broke sticker and archive support.
2009-11-11 14:13:24 +01:00
Max Kellermann
707b9fea17
decoder/flac: removed redundant NULL checks
...
After the decoder loop, "flac_dec" is always set.
2009-11-11 08:37:21 +01:00
Max Kellermann
d605329f83
decoder/flac: moved code to flac_pcm.c
2009-11-11 07:59:22 +01:00
Max Kellermann
f6e7dffada
decoder/flac: moved code to flac_metadata.c
2009-11-11 07:50:40 +01:00
Max Kellermann
43549db718
decoder/flac: return replay_gain_info object from helper function
...
Make the function more generic by not passing "struct flac_data" to
it.
2009-11-11 07:35:16 +01:00
Max Kellermann
7c0c8ca8d7
Merge branch 'master' of git://git.musicpd.org/metyl/mpd
2009-11-11 06:45:23 +01:00
Max Kellermann
884be8e2b3
decoder/flac: merged some code into flac_tag_apply_metadata()
2009-11-11 00:05:14 +01:00
Max Kellermann
305de100a7
decoder/oggflac: initialize the "tag" variable
2009-11-10 23:56:59 +01:00
Viliam Mateicka
79035d7ed9
wave_encoder: new encoder for streaming PCM wave files.
...
When using wave encoder with httpd audio output mpd can input this stream via http and audiofile decoder.
This for example opens simple way to configure lossless audio streaming port(like jack or pulseaudio does but without overhead).
Another possibility can be using it for gathering raw data for visualization plugins (If sync issue will be resolved)
2009-11-10 22:29:54 +00:00
Max Kellermann
c1a999c492
decoder/flac: don't use float to calculate song duration
...
Simple (up-rounding) integer division is good enough. We're casting
the result back to an integer anyway.
2009-11-10 22:03:58 +01:00
Max Kellermann
e51d9fc6a9
decoder/flac: pass VorbisComment to comments_to_tag()
2009-11-10 21:58:19 +01:00
Max Kellermann
2f69831fb8
decoder/flac: use pcm_buffer instead of fixed buffer
...
This is a great simplification for flac_common_write(), because we can
convert and submit all of the buffer in one turn. No more partial
buffers with complicated formulas.
2009-11-10 21:46:10 +01:00
Max Kellermann
b6a2ffd3d7
decoder/flac: added function flac_data_deinit()
...
Clean up tag and replay_gain_info there.
2009-11-10 21:42:15 +01:00
Max Kellermann
6a5f4651a1
test: fixed the read_mixer program on !HAVE_PULSE
2009-11-10 21:38:20 +01:00
Max Kellermann
70106464d3
configure.ac: enable_audiofile defaults to "auto"
...
Since we're using MPD_AUTO_PKG, we can auto-detect this option. Also
fix the --enable-audiofile help string.
2009-11-10 21:27:55 +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
84917721c7
moved GLib compatibility code to glib_compat.h
2009-11-10 21:07:54 +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
118495d372
decoder/flac: pass void pointer to flac_convert()
...
That function diverts into various bit formats; it doesn't need a
typed pointer.
2009-11-10 19:57:58 +01:00
Max Kellermann
a6bee71f1a
decoder/flac: pass audio_format.bits to flac_convert()
...
Don't use audio_format_sample_size() for identifying the sample
format.
2009-11-10 19:57:28 +01:00
Max Kellermann
e0e6813a1d
fd_util: removed creat_cloexec()
...
Add a "mode" argument to open_cloexec() instead.
2009-11-10 16:53:24 +01:00
Max Kellermann
3d2a9d3545
fd_util: added function pipe_cloexec()
...
Same as pipe_cloexec_nonblock(), but doesn't set non-blocking mode.
2009-11-10 16:53:20 +01:00
Max Kellermann
6975c087e0
decoder_list: fix decoder_plugin_from_mime_type()
...
Copy'n'paste error: call decoder_plugin_supports_mime_type() instead
of decoder_plugin_supports_suffix().
2009-11-09 22:49:05 +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
3359f8785e
output_thread: added command DRAIN
...
This command manually drains the hardware buffer. This is useful when
the player thread want to make sure that everything has been played.
2009-11-09 22:16:26 +01:00
Max Kellermann
96b974bc45
player_control: removed the "volatile" attribute
...
Our use of the "volatile" keyword was wrong from the start, and now
that we have proper locking, we can safely remove all of them.
2009-11-09 20:33:45 +01:00
Max Kellermann
1a4025420c
fd_util: added missing NONBLOCK fallback for socket()
2009-11-08 22:24:02 +01:00
Max Kellermann
223b0db5bd
fd_util: relicense under BSD 2-clause
...
We'll copy this code to libmpdclient, and that's easier if its license
is BSD.
2009-11-08 22:15:22 +01:00
Max Kellermann
2f4144e1cd
utils: removed function set_nonblocking()
...
It's not used anymore, its features have been moved to fd_util.c.
2009-11-08 22:11:37 +01:00
Max Kellermann
f66edccffd
fd_util: added O_NONBLOCK functions
...
Changed the wrappers for pipe(), socket(), accept(). On WIN32, this
does not work for pipe().
2009-11-08 22:11:35 +01:00
Max Kellermann
b043ade456
fd_util: fixed typo in API documentation
2009-11-08 22:07:14 +01:00
Max Kellermann
217b494cc5
encoder/null: removed empty close() method
...
That's an optional method.
2009-11-08 21:44:01 +01:00
Max Kellermann
5ef62312af
encoder/null: removed unused audio_format attribute
2009-11-08 21:43:19 +01:00
Max Kellermann
5479ed7cfb
fd_util: added API documentation
2009-11-08 21:38:52 +01:00
Max Kellermann
cac63bfd21
fd_util: unexport fd_set_cloexec()
...
This function is used only internally.
2009-11-08 21:38:38 +01:00
Max Kellermann
1573ea1485
inotify: set close-on-exec flag
...
Added wrapper for inotify_init1() to fd_util.c.
2009-11-07 19:02:53 +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
9b21152600
decoder_thread: close input file
...
An input_stream_close() call was missing after today's code
reorganization.
2009-11-07 17:58:52 +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
ec25cda68b
output_all: automatically attempt to re-enable failed outputs
...
When an output's enable() method has failed, and playback starts,
retry to enable it. Without this, the user may be confused, because
he sees the device is "enabled" but cannot use it, and currently there
is no error message in the log.
2009-11-07 17:22:34 +01:00
Max Kellermann
c9f726048c
output/httpd: moved code to httpd_output_bind()
2009-11-07 16:52:44 +01:00
Max Kellermann
c2251dc5a2
exclude: use GPatternSpec instead of fnmatch()
...
GLib's version of fnmatch() is more portable.
2009-11-07 16:29:29 +01:00
Max Kellermann
a505cbc6c9
added missing source file decoder_print.c
2009-11-07 16:28:21 +01:00
Max Kellermann
c422344190
database: I/O error handling in db_save()
...
Check ferror() instead of the fprintf() return value.
2009-11-07 16:20:07 +01:00