Commit Graph

5271 Commits

Author SHA1 Message Date
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
f672657388 Makefile.am: remove sticker.xml 2010-02-08 11:55:03 +01:00
Max Kellermann
32441175f4 doc: deleted sticker specification proposal
This document has been unmaintained for more than a year now (since
the day it was submitted).
2010-02-08 11:39:16 +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
Max Kellermann
7a24e496d5 configure.ac: new libwrap autoconf test
Use MPD_AUTO_RESULT().  Don't force libwrap by default.
2010-01-20 21:42:43 +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
Max Kellermann
5477c31160 decoder/ffmpeg: optimized the stream_tag() method
Don't use the function ffmpeg_helper(), don't initialize the codec.
2010-01-18 11:06:04 +01:00
Max Kellermann
acd3f8cd91 decoder/ffmpeg: free AVFormatContext on error
Fix a memory leak in some code paths.
2010-01-18 11:05:15 +01:00
Max Kellermann
ca1fc13116 decoder_api: removed function decoder_get_uri()
Use input_stream.uri.
2010-01-18 10:21:57 +01:00
Max Kellermann
9cb7760c5e input_stream: added attribute "uri" 2010-01-18 10:18:41 +01:00
Max Kellermann
fb9bd53328 input_stream: added function input_stream_deinit()
All close() implementations must call this method.
2010-01-18 09:57:53 +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
2579a2f924 decoder/ffmpeg: added more MIME types
Taken from the ffmpeg sources.
2010-01-17 16:00:14 +01:00
Max Kellermann
006f4be71c fd_util: include ws2tcpip.h for socklen_t 2010-01-17 14:48:52 +01:00
Max Kellermann
163e05f5a0 fd_util: fixed WIN32 versions of pipe()
Use the correct parameter name.
2010-01-17 14:43:15 +01:00
Max Kellermann
02526eda86 text_file: don't strip trailing whitespace
Only delete the newline characters (\n and optionally \r).  This
allows the database file to store file names with trailing whitespace.
2010-01-17 12:52:11 +01:00
Max Kellermann
828a5f552f output/pulse: clear the "mainloop" attribute on error
When enabling the pulse device fails, clear po->mainloop after
pa_threaded_mainloop_free() has finished.  This is important for the
assertions.

Two wrong g_free() calls were also removed.
2010-01-17 12:03:22 +01:00
Max Kellermann
a7664b98ba Makefile.am: link test/run_decoder and test/read_tags with timer.c
Needed for the fluidsynth decoder plugin.
2010-01-17 11:21:35 +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
e43bf52cbb configure.ac: disable -Wdeclaration-after-statement
Allow declaration after statement.
2010-01-17 02:36:03 +01:00
Max Kellermann
26841b6058 output/alsa: support packed 24 bit samples 2010-01-17 00:43:24 +01:00
Max Kellermann
1abfcc56af audio_format: support packed 24 bit samples 2010-01-16 23:44:54 +01:00
Max Kellermann
da47afe7d1 output/alsa: probe all sample formats in a loop
More code simplification.  Probe all formats, no matter which input
format.
2010-01-16 23:44:52 +01:00
Max Kellermann
96546c1a8a output/alsa: merged code into alsa_output_try_format()
Remove the debug log messages, because they are duplicate (see
ao_open() in output_thread.c).
2010-01-16 23:44:50 +01:00
Max Kellermann
579a8a96ea output/alsa: pass sample_format to get_bitformat() 2010-01-16 23:44:48 +01:00
Max Kellermann
79848e3414 output/alsa: moved code to alsa_output_setup_format() 2010-01-16 23:44:42 +01:00
Max Kellermann
87c861cae3 test/run_convert: implement a GLib log callback
Log to stderr instead of the default stdout.  We need a pristine
stdout for the conversion result.
2010-01-16 23:44:40 +01:00
Max Kellermann
8f326a33ee test/run_convert: use fifo_buffer to adapt to odd sample sizes
Ensure that the pcm_convert() length argument is aligned to the sample
size.
2010-01-16 23:25:58 +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
de0cdee4aa decoder/flac: pass bits_per_sample to flac_sample_format()
Easier to reuse the function.
2010-01-06 09:55:20 +01:00
Max Kellermann
550c9319e9 decoder/flac: moved decoder initialization to _flac_common.c
Invoke decoder_initialized() in the libFLAC metadata callback.  This
merges code from the FLAC and the OggFLAC decoder plugin into the
common library.
2010-01-06 09:50:34 +01:00