Commit Graph

5703 Commits

Author SHA1 Message Date
Max Kellermann
e257484870 Makefile.am: distribute test/stdbin.h 2011-02-18 08:19:37 +01:00
Christopher Brannon
2a1f4539f6 Insure proper initialization of stack-allocated struct.
Version 1.0.0 of the libao library added a new field to the
ao_sample_format struct.  It is a char * named matrix.  When
an ao_sample_format is allocated on the stack, this field contains
garbage.  The proper course is to insure that is initialized to NULL.
NULL indicates that we do not want any mapping.
The struct is now initialized using a static initializer, and this
technique is compatible with all known versions of libao.
2011-02-15 12:16:25 +01:00
Max Kellermann
906efdd320 Makefile.am: compile test/run_encoder with ENCODER_CFLAGS 2011-02-13 23:22:57 +01:00
Thomas Jansen
144d092637 output/shout: add possibility to set url
Added a new optional parameter for the shout plugin called "url".
2011-02-09 22:42:51 +01:00
Thomas Jansen
948b8f35e6 general: whitespace cleanup
Remove trailing whitespace found by this command:
find -name '*.[ch]' | xargs grep "[[:space:]]$"
2011-02-09 22:42:31 +01:00
Thomas Jansen
e776c605ad output/httpd: initialize unflushed_input
This fixes the following valgrind warning occuring on the first call of
httpd_output_read_page:
==20124== Conditional jump or move depends on uninitialised value(s)
==20124==    at 0x425E65: httpd_output_read_page (httpd_output_plugin.c:240)
==20124==    by 0x426087: httpd_output_open (httpd_output_plugin.c:279)
==20124==    by 0x41D862: ao_open (output_plugin.h:206)
==20124==    by 0x41E133: audio_output_task (output_thread.c:590)
2011-02-09 22:41:36 +01:00
Tony Miller
8b2f4fc823 Set fadeout in gme_decoder_plugin. Due to the nature of the gme library,
this needs to be done for the end of songs to be detected.
2011-02-03 00:25:35 +01:00
Max Kellermann
03018611f8 update: log all file permission problems 2011-01-31 09:39:24 +01:00
Thomas Jansen
2bde9afdb9 configure.ac: fix copy&paste error 2011-01-29 13:49:32 +01:00
Max Kellermann
f8b09c194f protocol: support client-to-client communication 2011-01-29 10:43:54 +01:00
Max Kellermann
0e69ad32c1 client_idle: export client_idle_add() 2011-01-29 10:43:54 +01:00
Max Kellermann
9b4e14df71 client_idle: add header client_idle.h 2011-01-29 10:43:54 +01:00
Max Kellermann
03f7803f26 test/read_mixer: add workaround for missing RAOP symbols 2011-01-29 10:43:54 +01:00
Max Kellermann
c6cbcc2c25 copyright year 2011 2011-01-29 10:13:54 +01:00
Ian Zimmerman
27aa34d4ae input/curl: enable CURLOPT_NETRC
I wanted mpd to play a mp3 stream from a music website.  The stream is
only available to subscribers, which restriction is enforced through
normal http authentication.  However, the URL I get from the website
is not the final URL of the stream, but a generic URL which points to
the real one through a redirect (code 301).  Thus, I cannot predict
the final URL, and so I cannot use the username:password hack to force
the authentication, and mpd (libcurl on mpds behalf) fails to grab the
stream.

libcurl allows the option CURLOPT_NETRC to be set and then the
credentials can be stored in the good old .netrc file (in this case it
would be ~mpd/.netrc, of course).  But mpd doesn't set this option.  I
think it should.
2011-01-29 08:43:30 +01:00
Dustin Puckett
79e0db4ca0 output/raop: new output plugin
Remote Audio Output Protocol (RAOP), for Apple devices.
2011-01-28 21:17:09 +01:00
Max Kellermann
8f99c954ad NEWS: fix 0.16.1 release year 2011-01-28 21:12:17 +01:00
Max Kellermann
5735c9efc1 configure.ac: fix tremor configure test
When the configure options were moved around for 0.16, the order was
changed, and the Tremor check broke.
2011-01-28 12:21:03 +01:00
Yuriy Kaminskiy
9ae3acf2e7 mpg123 decoder: implement seeking 2011-01-21 15:37:08 +01:00
Yuriy Kaminskiy
731ea9b489 mpg123 decoder: report bitrate 2011-01-21 15:37:08 +01:00
Max Kellermann
18b30b5019 decoder_thread: fix assertion failure at song end
Don't finish the current command twice.

This bug was never noticed, but was revealed by a new assertion check.
2011-01-16 17:52:03 +01:00
Andreas Wiese
e6c3acaa6f Fix NDEBUG test
<stdbool.h> needs to be included unconditionally from definition of
NDEBUG, since »bool« doesn't get defined otherwise.

Signed-off-by: Andreas Wiese <aw-devel@meterriblecrew.net>
2011-01-14 16:22:25 +01:00
Max Kellermann
24d51b9d14 doc: add a list of encoder plugins 2011-01-10 23:13:01 +01:00
Max Kellermann
a1edc199df output_control: document internal functions 2011-01-10 22:16:44 +01:00
Max Kellermann
db4aa81528 output_control: move code to ao_lock_command() 2011-01-10 21:54:43 +01:00
Max Kellermann
319ba94a52 output_control: ao_command() calls ao_command_async()
Merge some code.
2011-01-10 21:52:38 +01:00
Max Kellermann
1025f0be91 update_remove: use plain GCond instead of notify
GMutex/GCond guarantee that the access to removed_song is protected.
2011-01-10 21:40:15 +01:00
Max Kellermann
77d3b5e8f1 include cleanup 2011-01-10 21:38:11 +01:00
Max Kellermann
a0ad96a787 decoder_control: store GCond object, not a player_control
Remove the decoder dependency on player_control.  All player_control
was needed for is to signal the player thread, and we can do that with
a simple GCond as well.
2011-01-10 21:27:43 +01:00
Max Kellermann
39c5af5dbc decoder_thread: move code to decoder_command_finished_locked() 2011-01-10 21:08:16 +01:00
Max Kellermann
acca6a799b decoder_control: remove unused function dc_command_wait()
Only dc_command_wait_locked() is really being used.
2011-01-10 21:08:16 +01:00
Max Kellermann
b77e62260a decoder_control: replace dc_init() with dc_new()
dc_new() allocates the object and returns it.  dc_free() frees it
(replaces dc_deinit()).
2011-01-10 20:46:04 +01:00
Max Kellermann
b6995ca011 player_control: removed the global variable "pc"
Allocate a player_control object where needed, and pass it around.
Each "client" object is associated with a "player_control" instance.

This prepares multi-player support.
2011-01-10 19:46:23 +01:00
Max Kellermann
715844fd08 dbUtils: don't use directoryAddSongToPlaylist() twice
In findAddInDirectory(), call playlist_append_song() directly, to have
some more type checking.
2011-01-10 19:46:14 +01:00
Max Kellermann
2b29ca796e Merge commit 'release-0.16.1'
Conflicts:
	NEWS
2011-01-10 11:47:14 +01:00
Avuton Olrich
44b4b50949 Modify version string to post-release version 0.16.2~git 2011-01-09 18:00:12 -08:00
Avuton Olrich
9ad862d3a6 mpd version 0.16.1 2011-01-09 18:00:12 -08:00
Yuriy Kaminskiy
77d71c4ee6 Makefile.am: resolve modplug vs. libsndfile cflags/headers conflict
A bit of automake magic (see info automake "Per-Object Flags").
Compile-tested.
2011-01-09 18:21:27 +01:00
Max Kellermann
5184008812 input_init: add assertions on completeness of plugins 2011-01-08 18:27:57 +01:00
Max Kellermann
cf696ce443 input/cdio_paranoia: add module name
Seems like we forgot to give this module a name...  this can crash MPD
on startup.
2011-01-08 18:27:57 +01:00
Max Kellermann
1a2ea4c06c Merge branch 'v0.16.x'
Conflicts:
	NEWS
	configure.ac
2011-01-07 23:52:23 +01:00
Max Kellermann
8c0afd8557 Merge branch 'v0.15.x' into v0.16.x
Conflicts:
	NEWS
	configure.ac
	src/directory.h
2011-01-07 23:50:23 +01:00
Max Kellermann
2a56300f7b player_thread: discard empty chunks while cross-fading
When a music_chunk to be crossfaded consists only of a tag,
cross-fading is not possible, and led to an assertion failure.  This
patch just discards those, as if cross-fading was not enabled.
2011-01-07 23:45:51 +01:00
Max Kellermann
5f06999686 output_thread: fix double lock
During the whole output thread, the audio_output object is locked, and
it is only unlocked while waiting for the GCond and while running a
plugin method.  The error handler in ao_play_chunk() attempted to lock
the object again, which was code from MPD 0.15.x which should have
been removed a long time ago.
2011-01-07 23:08:18 +01:00
Max Kellermann
4c09aeb5a1 player_thread: fix assertion failure due to early seek
Until the decoder plugin has called decoder_initialized(), the player
may not submit seek commands.  This however could occur with a slow
decoder and a CUE file with a virtual song offset.  This patch adds
another check.
2011-01-07 22:52:50 +01:00
Max Kellermann
af892e7e80 player_thread: make variables more local 2011-01-07 22:33:10 +01:00
Max Kellermann
0022fb100b encoder/lame: explicitly configure the output sample rate
When you don't explicitly set an output sample rate, liblame tries to
guess an output sample rate from the input sample rate.  You would
think that this "guessing" consists of just setting both equal, but
that is not the case.  For 44.1kHz at 96kbit/s, liblame chooses
32kHz.  This patch explicitly configures the output sample rate, to
stop the bad guessing.
2011-01-07 19:37:39 +01:00
Max Kellermann
4f2d67dfb0 output/httpd: define G_LOG_DOMAIN in httpd_client.c 2011-01-07 18:00:12 +01:00
Max Kellermann
b5645ab29f output/osx: fix up audio format first, then apply it to device
This is a MPD 0.16 regression: when playing a 24 bit file, the switch
to 16 bit was made only partially, after mBytesPerPacket and
mBytesPerFrame had already been applied.

That means mBytesPerFrame referred to 24 bit, and mBitsPerChannel
referred to 16 bits.  Of course, that cannot work.
2011-01-07 17:31:36 +01:00
Max Kellermann
3149d1abf9 configure.ac: eliminate bashism "echo -n"
Use "printf" instead.
2011-01-07 17:31:30 +01:00