Maybe fixed the glitchiness at startup even more?
This commit is contained in:
@@ -29,8 +29,10 @@ namespace audio::detail{
|
||||
std::tuple<Args...> m_args;
|
||||
|
||||
template<int... Indices>
|
||||
int operator()(const void* input, void* output, unsigned long frame_count, std::integer_sequence<int,Indices...>){
|
||||
return std::forward<Func>(m_f)(input, output, frame_count, std::get<Indices>(m_args)...);
|
||||
int operator()(const void* input, void* output, unsigned long frame_count,
|
||||
unsigned long flags, std::integer_sequence<int,Indices...>)
|
||||
{
|
||||
return std::forward<Func>(m_f)(input, output, frame_count, flags, std::get<Indices>(m_args)...);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,7 +42,7 @@ namespace audio::detail{
|
||||
callback_iface() = default;
|
||||
|
||||
virtual ~callback_iface() = default;
|
||||
virtual int operator()(const void* input, void* output, unsigned long frame_count) = 0;
|
||||
virtual int operator()(const void* input, void* output, unsigned long frame_count, unsigned long flags) = 0;
|
||||
};
|
||||
|
||||
template<typename Func, typename... Args>
|
||||
@@ -52,8 +54,8 @@ namespace audio::detail{
|
||||
template<class Fn, class... Ts>
|
||||
callback_impl(Fn&& f, Ts&&... ts):
|
||||
m_ch{std::forward<Fn>(f), {std::forward<Ts>(ts)...}}{}
|
||||
int operator()(const void* input, void* output, unsigned long frame_count)override{
|
||||
return m_ch(input, output, frame_count, typename ::util::sequence_gen<sizeof...(Args)>::type{});
|
||||
int operator()(const void* input, void* output, unsigned long frame_count, unsigned long flags)override{
|
||||
return m_ch(input, output, frame_count, flags, typename ::util::sequence_gen<sizeof...(Args)>::type{});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace audio::impl{
|
||||
void exit();
|
||||
size_t output_channels()const;
|
||||
private:
|
||||
static int callback(const void* /*input*/, void* output, unsigned long frame_count, mixer& mix);
|
||||
static int callback(const void* /*input*/, void* output, unsigned long frame_count, unsigned long flags, mixer& mix);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user