Merge branch 'v0.20.x'
This commit is contained in:
@@ -72,6 +72,10 @@ public:
|
||||
return filter.get();
|
||||
}
|
||||
|
||||
void Reset() noexcept override {
|
||||
filter->Reset();
|
||||
}
|
||||
|
||||
ConstBuffer<void> FilterPCM(ConstBuffer<void> src) override {
|
||||
return filter->FilterPCM(src);
|
||||
}
|
||||
|
@@ -76,7 +76,6 @@ private:
|
||||
void Close() noexcept override;
|
||||
|
||||
size_t Play(const void *chunk, size_t size) override;
|
||||
void Cancel() noexcept override;
|
||||
|
||||
std::chrono::steady_clock::duration Delay() const noexcept override;
|
||||
|
||||
|
@@ -139,6 +139,14 @@ SoxrPcmResampler::Close() noexcept
|
||||
soxr_delete(soxr);
|
||||
}
|
||||
|
||||
void
|
||||
SoxrPcmResampler::Reset() noexcept
|
||||
{
|
||||
#if SOXR_THIS_VERSION >= SOXR_VERSION(0,1,2)
|
||||
soxr_clear(soxr);
|
||||
#endif
|
||||
}
|
||||
|
||||
ConstBuffer<void>
|
||||
SoxrPcmResampler::Resample(ConstBuffer<void> src)
|
||||
{
|
||||
|
@@ -41,6 +41,7 @@ class SoxrPcmResampler final : public PcmResampler {
|
||||
public:
|
||||
AudioFormat Open(AudioFormat &af, unsigned new_sample_rate) override;
|
||||
void Close() noexcept override;
|
||||
void Reset() noexcept override;
|
||||
ConstBuffer<void> Resample(ConstBuffer<void> src) override;
|
||||
ConstBuffer<void> Flush() override;
|
||||
};
|
||||
|
@@ -38,7 +38,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__) && !defined(ANDROID)
|
||||
|
||||
static int
|
||||
ioprio_set(int which, int who, int ioprio) noexcept
|
||||
@@ -69,7 +69,11 @@ SetThreadIdlePriority() noexcept
|
||||
sched_setscheduler(0, SCHED_IDLE, &sched_param);
|
||||
#endif
|
||||
|
||||
#ifndef ANDROID
|
||||
/* this system call is forbidden via seccomp on Android 8 and
|
||||
leads to crash (SIGSYS) */
|
||||
ioprio_set_idle();
|
||||
#endif
|
||||
|
||||
#elif defined(_WIN32)
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_IDLE);
|
||||
|
Reference in New Issue
Block a user