|
|
@ -11,6 +11,21 @@ |
|
|
#include "core/core_timing.h"
|
|
|
#include "core/core_timing.h"
|
|
|
#include "core/hle/kernel/k_event.h"
|
|
|
#include "core/hle/kernel/k_event.h"
|
|
|
|
|
|
|
|
|
|
|
|
// See texture_cache/util.h
|
|
|
|
|
|
template<typename T, size_t N> |
|
|
|
|
|
#if BOOST_VERSION >= 108100 || __GNUC__ > 12
|
|
|
|
|
|
[[nodiscard]] boost::container::static_vector<T, N> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) { |
|
|
|
|
|
return v; |
|
|
|
|
|
} |
|
|
|
|
|
#else
|
|
|
|
|
|
[[nodiscard]] std::vector<T> FixStaticVectorADL(const boost::container::static_vector<T, N>& v) { |
|
|
|
|
|
std::vector<T> u; |
|
|
|
|
|
for (auto const& e : v) |
|
|
|
|
|
u.push_back(e); |
|
|
|
|
|
return u; |
|
|
|
|
|
} |
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
namespace AudioCore::AudioIn { |
|
|
namespace AudioCore::AudioIn { |
|
|
|
|
|
|
|
|
System::System(Core::System& system_, Kernel::KEvent* event_, const size_t session_id_) |
|
|
System::System(Core::System& system_, Kernel::KEvent* event_, const size_t session_id_) |
|
|
@ -92,7 +107,7 @@ Result System::Start() { |
|
|
|
|
|
|
|
|
boost::container::static_vector<AudioBuffer, BufferCount> buffers_to_flush{}; |
|
|
boost::container::static_vector<AudioBuffer, BufferCount> buffers_to_flush{}; |
|
|
buffers.RegisterBuffers(buffers_to_flush); |
|
|
buffers.RegisterBuffers(buffers_to_flush); |
|
|
session->AppendBuffers(buffers_to_flush); |
|
|
|
|
|
|
|
|
session->AppendBuffers(FixStaticVectorADL(buffers_to_flush)); |
|
|
session->SetRingSize(static_cast<u32>(buffers_to_flush.size())); |
|
|
session->SetRingSize(static_cast<u32>(buffers_to_flush.size())); |
|
|
|
|
|
|
|
|
return ResultSuccess; |
|
|
return ResultSuccess; |
|
|
@ -137,7 +152,7 @@ void System::RegisterBuffers() { |
|
|
if (state == State::Started) { |
|
|
if (state == State::Started) { |
|
|
boost::container::static_vector<AudioBuffer, BufferCount> registered_buffers{}; |
|
|
boost::container::static_vector<AudioBuffer, BufferCount> registered_buffers{}; |
|
|
buffers.RegisterBuffers(registered_buffers); |
|
|
buffers.RegisterBuffers(registered_buffers); |
|
|
session->AppendBuffers(registered_buffers); |
|
|
|
|
|
|
|
|
session->AppendBuffers(FixStaticVectorADL(registered_buffers)); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|