From 3b0fea5fae8ce52d2d4aa9ae7accc1f7f33592e1 Mon Sep 17 00:00:00 2001 From: Gaetan Bisson Date: Wed, 27 Nov 2013 08:24:34 +0100 Subject: input/cdio_paranoia: support libcdio-paranoia 0.90 --- src/input/CdioParanoiaInputPlugin.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/input/CdioParanoiaInputPlugin.cxx b/src/input/CdioParanoiaInputPlugin.cxx index cc366bff5..3978ab9c5 100644 --- a/src/input/CdioParanoiaInputPlugin.cxx +++ b/src/input/CdioParanoiaInputPlugin.cxx @@ -41,7 +41,12 @@ #include #include +#ifdef HAVE_CDIO_PARANOIA_PARANOIA_H +#include +#else #include +#endif + #include struct CdioParanoiaInputStream { -- cgit v1.2.3 From 47c50c079d0abf3d807815eb3c4b43dd6544b93f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 28 Nov 2013 00:05:26 +0100 Subject: decoder/ffmpeg: use IgnoreError instead of local Error instance --- src/decoder/FfmpegDecoderPlugin.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/decoder/FfmpegDecoderPlugin.cxx b/src/decoder/FfmpegDecoderPlugin.cxx index 1b62eae57..6add90045 100644 --- a/src/decoder/FfmpegDecoderPlugin.cxx +++ b/src/decoder/FfmpegDecoderPlugin.cxx @@ -120,8 +120,7 @@ mpd_ffmpeg_stream_seek(void *opaque, int64_t pos, int whence) if (whence == AVSEEK_SIZE) return stream->input.size; - Error error; - if (!stream->input.LockSeek(pos, whence, error)) + if (!stream->input.LockSeek(pos, whence, IgnoreError())) return -1; return stream->input.offset; @@ -342,11 +341,9 @@ ffmpeg_probe(Decoder *decoder, InputStream &is) PADDING = 16, }; - Error error; - unsigned char buffer[BUFFER_SIZE]; size_t nbytes = decoder_read(decoder, is, buffer, BUFFER_SIZE); - if (nbytes <= PADDING || !is.LockRewind(error)) + if (nbytes <= PADDING || !is.LockRewind(IgnoreError())) return nullptr; /* some ffmpeg parsers (e.g. ac3_parser.c) read a few bytes -- cgit v1.2.3 From 0ea5f4ac3a71e3b04672cd63f90206305330ef74 Mon Sep 17 00:00:00 2001 From: Lukas Stabe Date: Mon, 2 Dec 2013 13:08:03 +0100 Subject: output/openal: check __APPLE__ instead of HAVE_OSX On OSX, the configure-flag --enable-osx is used to enable the unsupported osx output. It sets the HAVE_OSX preprocessor define. src/output/OpenALOutputPlugin.cxx uses this define to determine wether it is building on OSX, and imports different headers (which have nothing to do with the osx output) depending on wether or not it is set. --- src/output/OpenALOutputPlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/output/OpenALOutputPlugin.cxx b/src/output/OpenALOutputPlugin.cxx index e753b206f..268cf17cc 100644 --- a/src/output/OpenALOutputPlugin.cxx +++ b/src/output/OpenALOutputPlugin.cxx @@ -25,7 +25,7 @@ #include -#ifndef HAVE_OSX +#ifndef __APPLE__ #include #include #else -- cgit v1.2.3 From 695ca292742a1d09d9bf9c56cea50ac954383914 Mon Sep 17 00:00:00 2001 From: Lukas Stabe Date: Tue, 10 Dec 2013 19:16:37 +0100 Subject: output/osx: fix build failure --- src/output/OSXOutputPlugin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/output/OSXOutputPlugin.cxx b/src/output/OSXOutputPlugin.cxx index 7debe6ab2..97ebae056 100644 --- a/src/output/OSXOutputPlugin.cxx +++ b/src/output/OSXOutputPlugin.cxx @@ -363,9 +363,9 @@ osx_output_open(struct audio_output *ao, AudioFormat &audio_format, OSStatus status = AudioUnitInitialize(od->au); if (status != noErr) { - error.Set(osx_output_domain, status, - "Unable to initialize OS X audio unit: %s", - GetMacOSStatusCommentString(status)); + error.Format(osx_output_domain, status, + "Unable to initialize OS X audio unit: %s", + GetMacOSStatusCommentString(status)); return false; } -- cgit v1.2.3 From 39d94bd3ea9e7c457f5a30bc3b4017f3d63294e5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Dec 2013 19:32:26 +0100 Subject: TagFile: add return value API documentation --- src/TagFile.hxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/TagFile.hxx b/src/TagFile.hxx index 3a49a04e1..078abebd9 100644 --- a/src/TagFile.hxx +++ b/src/TagFile.hxx @@ -28,6 +28,9 @@ struct tag_handler; /** * Scan the tags of a song file. Invokes matching decoder plugins, * but does not invoke the special "APE" and "ID3" scanners. + * + * @return true if the file was recognized (even if no metadata was + * found) */ bool tag_file_scan(Path path, -- cgit v1.2.3 From 96fa69ff6b0a07602533b5280c6cfc39571b2552 Mon Sep 17 00:00:00 2001 From: mobidyc Date: Tue, 10 Dec 2013 19:34:35 +0100 Subject: SongUpdate: accept files without metadata If the file was recognized by a decoder plugin, accept it - don't require metadata. --- src/SongUpdate.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx index a34734227..1a873fedc 100644 --- a/src/SongUpdate.cxx +++ b/src/SongUpdate.cxx @@ -95,8 +95,7 @@ Song::UpdateFile() TagBuilder tag_builder; if (!tag_file_scan(path_fs, - &full_tag_handler, &tag_builder) || - !tag_builder.IsDefined()) + &full_tag_handler, &tag_builder)) return false; if (tag_builder.IsEmpty()) -- cgit v1.2.3 From 8e38b4f83c98ae61e9f843c3d770dcbac699c98c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 13 Dec 2013 14:35:36 +0100 Subject: mixer/alsa: use BlockingCall() instead of EventLoop::AddCall() This is safer, and works without epoll(). Fixes a build failure with uClibc, which does not support epoll(). --- src/mixer/AlsaMixerPlugin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mixer/AlsaMixerPlugin.cxx b/src/mixer/AlsaMixerPlugin.cxx index 7defdd7be..b81ca4246 100644 --- a/src/mixer/AlsaMixerPlugin.cxx +++ b/src/mixer/AlsaMixerPlugin.cxx @@ -24,6 +24,7 @@ #include "Main.hxx" #include "event/MultiSocketMonitor.hxx" #include "event/Loop.hxx" +#include "event/Call.hxx" #include "util/ASCII.hxx" #include "util/ReusableArray.hxx" #include "util/Error.hxx" @@ -46,7 +47,7 @@ class AlsaMixerMonitor final : private MultiSocketMonitor { public: AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer) :MultiSocketMonitor(_loop), mixer(_mixer) { - _loop.AddCall([this](){ InvalidateSockets(); }); + BlockingCall(_loop, [this](){ InvalidateSockets(); }); } private: -- cgit v1.2.3