Commit Graph

5102 Commits

Author SHA1 Message Date
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
Max Kellermann e69bb3b337 Makefile.am: distribute pcm_pack.h
Fix distcheck.
2010-03-28 19:31:02 +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
Avuton Olrich d612e5e0ab mpd version 0.15.9 2010-03-21 17:25:18 -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 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