Commit Graph

3947 Commits

Author SHA1 Message Date
Max Kellermann eb2e3a554d chunk: added music_chunk_is_empty() 2009-03-07 21:40:27 +01:00
Max Kellermann f8aebc52b5 music_pipe: poison music_chunk.next
The value of music_chunk.next is undefined for a chunk returned by
music_pipe_shift().  For more pedantic debugging, poison the reference
before returning the chunk.
2009-03-07 21:40:13 +01:00
Max Kellermann 39d3521956 music_pipe: added music_pipe_peek()
music_pipe_peek() is similar to music_pipe_shift(), but doesn't remove
the chunk.  This allows it to be used with a "const" music_pipe.
2009-03-07 19:56:31 +01:00
Max Kellermann b13cd03f75 output_all: audio_output_all_update() returns bool
audio_output_all_update() returns true when there is at least open
output device which is open.
2009-03-07 19:55:57 +01:00
David Guibert 498ec26f25 pulse_mixer: allow mpd to reconnect to the pulse mixer
This patch follows the commit 21bb10f4b.

>From Max Kellermann:
> I removed the daemonization changes in main.c.  Please explain why you
> changed that.  If you need it for some reason, make that a separate
> patch with a good description of your rationale.

> That's the biggest flaw of your code: it opens the mixer device in the
> init() method, while the open() method is empty.  When the pulse
> daemon is not available (either during MPD startup or when it dies
> while MPD runs), the plugin will not even attempt to reconnect to
> pulse.  Please move the code to the open() method, to make that work.

I changed the daemonize call as the fork losts the connection to the
pulse server. According to your remark, the init() method should be
moved to the open() ones.

With the modification, mpd is able to reconnect the pulse mixer after
restarting the pulseaudio daemon.

Signed-off-by: David Guibert <david.guibert@gmail.com>
Signed-off-by: Max Kellermann <max@duempel.org>
2009-03-07 19:55:09 +01:00
Max Kellermann a1534ba7c2 AUTHORS: added Romain Bignon, Rasmus Steinke
Added two new team members.  Updated the description of older
contributors.  Moved José Anarch and Patrik Weiskircher to "former
developers".
2009-03-07 16:13:23 +01:00
Max Kellermann 5ffb2dd88c pulse_mixer: added missing copyright header 2009-03-07 15:59:29 +01:00
Max Kellermann b1137fe81a pulse_mixer: added GLib log domain
Shorten some log messages, let GLib add the "pulse_mixer" prefix.
2009-03-07 15:59:26 +01:00
Max Kellermann 6069cafda0 pulse: clean up includes
Don't include output_api.h - this is not an output plugin.  Added
missing explicit conf.h and string.h includes.
2009-03-07 15:59:22 +01:00
David Guibert 21bb10f4bf pulse mixer
This patch introduces the mixer for the pulse output.

Technically speaking, the pulse index is needed to get or set
the volume. You must define callback fonctions to get this index since
the pulse output in mpd is done using the simpe api. The pulse simple api
does not provide the index of the newly defined output.

So callback fonctions are associated to the pulse context.
The list of all the sink input is then retreived.
Then we select the name of the mpd pulse output and control
its volume by its associated index number.

Signed-off-by: Patrice Linel <patnathanael@gmail.com>
Signed-off-by: David Guibert <david.guibert@gmail.com>

[mk: fixed whitespace errors and broke long lines; removed
daemonization changes from main.c]
2009-03-07 15:59:20 +01:00
Max Kellermann a547d24eb2 mixer: check for init() failures
When the init() method of a mixer plugin fails, mixer_new()
dereferences the NULL pointer.
2009-03-07 15:50:26 +01:00
Max Kellermann 9ed409cdcc configure.ac: fix --enable-X variable names
The patch "remove redundant explicit $enableval assignments" broke
several options with non-standard variable names.
2009-03-07 15:50:19 +01:00
Avuton Olrich 55b0fed293 configure: global indention and trim line wc to 80 when practical. 2009-03-06 08:30:59 -08:00
Avuton Olrich 771c061964 configure: Move the faad stuff to m4/faad.m4 2009-03-06 08:30:59 -08:00
Avuton Olrich aebb522639 configure: No capitalization on beginning of help strings.
Most strings have no capitalization at the beinning, make all strings
non-capital.
2009-03-06 08:30:59 -08:00
Avuton Olrich 67cecf4e95 configure: specify that faad2 prefix is optional in the help string 2009-03-06 08:30:59 -08:00
Avuton Olrich bfdf68776f configure: trim down the line length for the libOggFLAC help strings 2009-03-06 08:30:59 -08:00
Avuton Olrich cf1c27a232 configure: trim down the line length for the faad help strings 2009-03-06 08:30:59 -08:00
Avuton Olrich 775a277a10 configure: trim down the line length for the zeroconf help string 2009-03-06 08:30:59 -08:00
Avuton Olrich 5da410f913 configure: trim down the line length for the lame arguments 2009-03-06 08:30:59 -08:00
Avuton Olrich 7c907b9d9d configure: trim down the Tremor AC_ARG_WITH() statements 2009-03-06 08:30:59 -08:00
Avuton Olrich bc65890abf configure: Group libmad stuff together, rename --enable-mp3 --enable-mad 2009-03-06 08:30:59 -08:00
Avuton Olrich 721b6f3e61 configure: remove redundant explicit $enableval assignments. 2009-03-06 08:30:59 -08:00
Max Kellermann 5e0acec118 curl: reverse GLIB_CHECK_VERSION()
The GLIB_CHECK_VERSION() macro was used improperly, which broke build
on GLib < 2.14.  Add a "!" for negation.
2009-03-06 15:42:33 +01:00
Max Kellermann 4c3ce9ef1c socket_util: check if IN6_IS_ADDR_V4MAPPED is defined
On some systems, the macro IN6_IS_ADDR_V4MAPPED() is not available.
Don't try to convert IPv6 to their IPV4 equivalents in this case.
2009-03-06 10:09:10 +01:00
Avuton Olrich 38ead091f9 configure: remove duplicate LAME report, unify rest under SHOUTcast header. 2009-03-05 23:25:50 -08:00
Avuton Olrich 7cd9dbd574 configure: make all tests the same, when possible. 2009-03-05 23:17:00 -08:00
Avuton Olrich cd52258211 configure: Add 'Streaming Support' section to the configure display.
Add 'Streaming Support section to the configure display, clarify
the text and unify with the rest of the display.
2009-03-06 06:51:00 +01:00
Avuton Olrich 6ab53cf62a configure: display the status of lastfm protocol support 2009-03-06 06:50:50 +01:00
Avuton Olrich f6413d2d5f configure: Fix configure warning presented by lastfm radio.
The configure problem was:
./configure: line 6934: ,: command not found
2009-03-05 16:46:19 -08:00
Max Kellermann 01cf7feac7 pipe: added music_buffer, rewrite music_pipe
Turn the music_pipe into a simple music_chunk queue.  The music_chunk
allocation code is moved to music_buffer, and is now managed with a
linked list instead of a ring buffer.  Two separate music_pipe objects
are used by the decoder for the "current" and the "next" song, which
greatly simplifies the cross-fading code.
2009-03-06 00:42:03 +01:00
Max Kellermann 000b2d4f3a music_pipe: added music_pipe_push()
Added music_pipe_allocate(), music_pipe_push() and
music_pipe_cancel().  Those functions allow the caller (decoder thread
in this case) to do its own chunk management.  The functions
music_pipe_flush() and music_pipe_tag() can now be removed.
2009-03-06 00:42:01 +01:00
Max Kellermann 10be8a8714 playlist_control: fix requeue after seek
The queue update after a seek was wrong: the queued song is cleared by
a successful seek.  This caused queue/cross-fading problems after a
seek.
2009-03-06 00:41:59 +01:00
Max Kellermann b0fcce65d8 flac: explicitly check for STOP command
After the decoder command was obtained, don't wait until libflac
detects EOF (as a side effect), quit the decoder immediately.  This
check was missing completely.
2009-03-05 18:20:43 +01:00
Max Kellermann efd606337e flac: check command after flac_process_single() failure
When the MPD core sends the decoder a command while
flac_process_single() is executed, this function fails.  Abort the
decoder only if not seeking.  This fixes a seeking bug.
2009-03-05 18:20:41 +01:00
Max Kellermann 74a2813d78 music_chunk: added music_chunk_write(), music_chunk_expand()
Moved some code from music_pipe_write() and music_pipe_expand().  Only
music_chunk.c should access the music_chunk internals.
2009-03-05 17:37:11 +01:00
Max Kellermann c655f804a9 music_pipe: moved struct music_chunk to chunk.h 2009-03-03 22:23:25 +01:00
Max Kellermann 1063c1f2e3 alsa: log period and buffer size
Log the real period and buffer size.  This might be useful when
debugging xruns.  Note that the same information is available in
/proc/asound/card*/pcm*p/sub*/hw_params
2009-03-03 22:19:37 +01:00
Avuton Olrich 3e5a445467 ls: Print output of supported uri to fp rather than stdout.
Since there are no other callers than stdout, this wouldn't be a
problem, but since there maybe in the future go ahead and fix it.
2009-03-03 13:12:39 -08:00
Viliam Mateicka 3b76ca7186 ffmpeg: fix version comparision for av_get_bits_per_sample_format() implemetation
function was implemented in the version we are comparing to so there must be higher or equal
2009-03-03 21:30:55 +01:00
Viliam Mateicka c89482de65 ffmpeg: support for new metadata api 2009-03-03 21:30:46 +01:00
Viliam Mateicka 39fb8bebc2 test: init input streams cause decoders are using it 2009-03-03 21:30:26 +01:00
Avuton Olrich e7f034dcef cmdline: Print available protocols when --version is run. 2009-03-03 21:25:19 +01:00
Max Kellermann 0f64e658fd alsa: fall back to 32 bit samples if 16 is not supported
There are a few high-end devices (e.g. ICE1724) which cannot even play
16 bit audio.  Try the 32 bit fallback, which we already implemented
for 24 bit.
2009-03-03 09:38:20 +01:00
Max Kellermann f82793f741 updated valgrind.suppressions 2009-03-03 07:56:06 +01:00
Eric Wollesen b8ebb748c9 Add sticker list command.
[mk: merged memory leak patch; fixed indentation (tabs); fixed
documentation typo]
2009-03-03 07:49:23 +01:00
Max Kellermann 95b53281a4 updated valgrind.suppressions 2009-03-02 23:11:45 +01:00
Max Kellermann 4220e6b0ad input_lastfm: new input plugin for last.fm radio
The lastfm input plugin enables MPD to play lastfm:// URLs.  This
plugin is not complete yet: it plays only the first song in the
last.fm playlist, and the playlist parser isn't even implemented
properly.
2009-03-02 23:11:31 +01:00
Max Kellermann 9cd5b0af74 test/run_decoder: initialize decoder.initialized
Keep valgrind happy.
2009-03-02 23:09:58 +01:00
Max Kellermann a2e47d55eb test/run_decoder: initialize the input plugins 2009-03-02 23:08:24 +01:00