diff --git a/NEWS b/NEWS index e1a0a770a..d7c188ba0 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,11 @@ ver 0.21 (not yet released) * output - alsa: non-blocking mode +ver 0.20.8 (not yet released) +* output + - osx: fix build failure due to missing "noexcept" +* fix build failure with GCC 4.x + ver 0.20.7 (2017/05/15) * database - simple: fix false positive directory loop detection with NFS diff --git a/python/build/libs.py b/python/build/libs.py index 7db98bed4..caf922ffb 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -58,8 +58,8 @@ libmad = AutotoolsProject( ) ffmpeg = FfmpegProject( - 'http://ffmpeg.org/releases/ffmpeg-3.3.tar.xz', - '599e7f7c017221c22011c4037b88bdcd1c47cd40c1e466838bc3c465f3e9569d', + 'http://ffmpeg.org/releases/ffmpeg-3.3.1.tar.xz', + 'b702a7fc656ac23e276b8c823a2f646e4e6f6309bb2788435a708e69bea98f2f', 'lib/libavcodec.a', [ '--disable-shared', '--enable-static', diff --git a/src/Main.cxx b/src/Main.cxx index 7a5e8cc62..33984bc4d 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -120,8 +120,16 @@ static constexpr size_t KILOBYTE = 1024; static constexpr size_t MEGABYTE = 1024 * KILOBYTE; static constexpr size_t DEFAULT_BUFFER_SIZE = 4 * MEGABYTE; -static constexpr size_t MIN_BUFFER_SIZE = std::max(CHUNK_SIZE * 32, - 64 * KILOBYTE); + +static +#if GCC_OLDER_THAN(5,0) +/* gcc 4.x has no "constexpr" for std::max() */ +const +#else +constexpr +#endif +size_t MIN_BUFFER_SIZE = std::max(CHUNK_SIZE * 32, + 64 * KILOBYTE); static constexpr unsigned DEFAULT_BUFFER_BEFORE_PLAY = 10; diff --git a/src/output/plugins/HaikuOutputPlugin.cxx b/src/output/plugins/HaikuOutputPlugin.cxx index b8353db9b..ecf37c897 100644 --- a/src/output/plugins/HaikuOutputPlugin.cxx +++ b/src/output/plugins/HaikuOutputPlugin.cxx @@ -81,7 +81,7 @@ public: size_t Play(const void *chunk, size_t size); void Cancel(); - std::chrono::steady_clock::duration Delay(); + std::chrono::steady_clock::duration Delay() noexcept; void FillBuffer(void* _buffer, size_t size, gcc_unused const media_raw_audio_format& _format); @@ -311,7 +311,7 @@ HaikuOutput::Play(const void *chunk, size_t size) } inline std::chrono::steady_clock::duration -HaikuOutput::Delay() +HaikuOutput::Delay() noexcept { unsigned delay = buffer_filled ? 0 : buffer_delay; diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index 3e97aa132..c68deb88b 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -670,7 +670,7 @@ osx_output_play(AudioOutput *ao, const void *chunk, size_t size) } static std::chrono::steady_clock::duration -osx_output_delay(AudioOutput *ao) +osx_output_delay(AudioOutput *ao) noexcept { OSXOutput *od = (OSXOutput *)ao; return od->ring_buffer->write_available() diff --git a/src/output/plugins/PulseOutputPlugin.cxx b/src/output/plugins/PulseOutputPlugin.cxx index b2fb06d6b..79d7f2ba8 100644 --- a/src/output/plugins/PulseOutputPlugin.cxx +++ b/src/output/plugins/PulseOutputPlugin.cxx @@ -101,7 +101,7 @@ public: void Open(AudioFormat &audio_format); void Close(); - std::chrono::steady_clock::duration Delay(); + std::chrono::steady_clock::duration Delay() noexcept; size_t Play(const void *chunk, size_t size); void Cancel(); bool Pause(); @@ -741,7 +741,7 @@ PulseOutput::StreamPause(bool pause) } inline std::chrono::steady_clock::duration -PulseOutput::Delay() +PulseOutput::Delay() noexcept { Pulse::LockGuard lock(mainloop); diff --git a/src/output/plugins/sles/SlesOutputPlugin.cxx b/src/output/plugins/sles/SlesOutputPlugin.cxx index 96ed6a66d..3103bea42 100644 --- a/src/output/plugins/sles/SlesOutputPlugin.cxx +++ b/src/output/plugins/sles/SlesOutputPlugin.cxx @@ -98,7 +98,7 @@ public: void Open(AudioFormat &audio_format); void Close(); - std::chrono::steady_clock::duration Delay() { + std::chrono::steady_clock::duration Delay() noexcept { return pause && !cancel ? std::chrono::milliseconds(100) : std::chrono::steady_clock::duration::zero();