Merge branch 'v0.20.x'
This commit is contained in:
commit
0a3a5a7c65
5
NEWS
5
NEWS
@ -9,6 +9,11 @@ ver 0.21 (not yet released)
|
|||||||
* output
|
* output
|
||||||
- alsa: non-blocking mode
|
- 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)
|
ver 0.20.7 (2017/05/15)
|
||||||
* database
|
* database
|
||||||
- simple: fix false positive directory loop detection with NFS
|
- simple: fix false positive directory loop detection with NFS
|
||||||
|
@ -58,8 +58,8 @@ libmad = AutotoolsProject(
|
|||||||
)
|
)
|
||||||
|
|
||||||
ffmpeg = FfmpegProject(
|
ffmpeg = FfmpegProject(
|
||||||
'http://ffmpeg.org/releases/ffmpeg-3.3.tar.xz',
|
'http://ffmpeg.org/releases/ffmpeg-3.3.1.tar.xz',
|
||||||
'599e7f7c017221c22011c4037b88bdcd1c47cd40c1e466838bc3c465f3e9569d',
|
'b702a7fc656ac23e276b8c823a2f646e4e6f6309bb2788435a708e69bea98f2f',
|
||||||
'lib/libavcodec.a',
|
'lib/libavcodec.a',
|
||||||
[
|
[
|
||||||
'--disable-shared', '--enable-static',
|
'--disable-shared', '--enable-static',
|
||||||
|
12
src/Main.cxx
12
src/Main.cxx
@ -120,8 +120,16 @@ static constexpr size_t KILOBYTE = 1024;
|
|||||||
static constexpr size_t MEGABYTE = 1024 * KILOBYTE;
|
static constexpr size_t MEGABYTE = 1024 * KILOBYTE;
|
||||||
|
|
||||||
static constexpr size_t DEFAULT_BUFFER_SIZE = 4 * MEGABYTE;
|
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;
|
static constexpr unsigned DEFAULT_BUFFER_BEFORE_PLAY = 10;
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ public:
|
|||||||
size_t Play(const void *chunk, size_t size);
|
size_t Play(const void *chunk, size_t size);
|
||||||
void Cancel();
|
void Cancel();
|
||||||
|
|
||||||
std::chrono::steady_clock::duration Delay();
|
std::chrono::steady_clock::duration Delay() noexcept;
|
||||||
|
|
||||||
void FillBuffer(void* _buffer, size_t size,
|
void FillBuffer(void* _buffer, size_t size,
|
||||||
gcc_unused const media_raw_audio_format& _format);
|
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
|
inline std::chrono::steady_clock::duration
|
||||||
HaikuOutput::Delay()
|
HaikuOutput::Delay() noexcept
|
||||||
{
|
{
|
||||||
unsigned delay = buffer_filled ? 0 : buffer_delay;
|
unsigned delay = buffer_filled ? 0 : buffer_delay;
|
||||||
|
|
||||||
|
@ -670,7 +670,7 @@ osx_output_play(AudioOutput *ao, const void *chunk, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::chrono::steady_clock::duration
|
static std::chrono::steady_clock::duration
|
||||||
osx_output_delay(AudioOutput *ao)
|
osx_output_delay(AudioOutput *ao) noexcept
|
||||||
{
|
{
|
||||||
OSXOutput *od = (OSXOutput *)ao;
|
OSXOutput *od = (OSXOutput *)ao;
|
||||||
return od->ring_buffer->write_available()
|
return od->ring_buffer->write_available()
|
||||||
|
@ -101,7 +101,7 @@ public:
|
|||||||
void Open(AudioFormat &audio_format);
|
void Open(AudioFormat &audio_format);
|
||||||
void Close();
|
void Close();
|
||||||
|
|
||||||
std::chrono::steady_clock::duration Delay();
|
std::chrono::steady_clock::duration Delay() noexcept;
|
||||||
size_t Play(const void *chunk, size_t size);
|
size_t Play(const void *chunk, size_t size);
|
||||||
void Cancel();
|
void Cancel();
|
||||||
bool Pause();
|
bool Pause();
|
||||||
@ -741,7 +741,7 @@ PulseOutput::StreamPause(bool pause)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline std::chrono::steady_clock::duration
|
inline std::chrono::steady_clock::duration
|
||||||
PulseOutput::Delay()
|
PulseOutput::Delay() noexcept
|
||||||
{
|
{
|
||||||
Pulse::LockGuard lock(mainloop);
|
Pulse::LockGuard lock(mainloop);
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
void Open(AudioFormat &audio_format);
|
void Open(AudioFormat &audio_format);
|
||||||
void Close();
|
void Close();
|
||||||
|
|
||||||
std::chrono::steady_clock::duration Delay() {
|
std::chrono::steady_clock::duration Delay() noexcept {
|
||||||
return pause && !cancel
|
return pause && !cancel
|
||||||
? std::chrono::milliseconds(100)
|
? std::chrono::milliseconds(100)
|
||||||
: std::chrono::steady_clock::duration::zero();
|
: std::chrono::steady_clock::duration::zero();
|
||||||
|
Loading…
Reference in New Issue
Block a user