diff options
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/in/audio_in_system.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/audio_core/in/audio_in_system.cpp b/src/audio_core/in/audio_in_system.cpp index 934ef8c1c..579129121 100644 --- a/src/audio_core/in/audio_in_system.cpp +++ b/src/audio_core/in/audio_in_system.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include <mutex> + #include "audio_core/audio_event.h" #include "audio_core/audio_manager.h" #include "audio_core/in/audio_in_system.h" @@ -45,11 +46,11 @@ Result System::IsConfigValid(const std::string_view device_name, const AudioInParameter& in_params) const { if ((device_name.size() > 0) && (device_name != GetDefaultDeviceName() && device_name != GetDefaultUacDeviceName())) { - return Service::Audio::ERR_INVALID_DEVICE_NAME; + return Service::Audio::ResultNotFound; } if (in_params.sample_rate != TargetSampleRate && in_params.sample_rate > 0) { - return Service::Audio::ERR_INVALID_SAMPLE_RATE; + return Service::Audio::ResultInvalidSampleRate; } return ResultSuccess; @@ -80,7 +81,7 @@ Result System::Initialize(std::string device_name, const AudioInParameter& in_pa Result System::Start() { if (state != State::Stopped) { - return Service::Audio::ERR_OPERATION_FAILED; + return Service::Audio::ResultOperationFailed; } session->Initialize(name, sample_format, channel_count, session_id, handle, @@ -89,7 +90,7 @@ Result System::Start() { session->Start(); state = State::Started; - std::vector<AudioBuffer> buffers_to_flush{}; + boost::container::static_vector<AudioBuffer, BufferCount> buffers_to_flush{}; buffers.RegisterBuffers(buffers_to_flush); session->AppendBuffers(buffers_to_flush); session->SetRingSize(static_cast<u32>(buffers_to_flush.size())); @@ -134,7 +135,7 @@ bool System::AppendBuffer(const AudioInBuffer& buffer, const u64 tag) { void System::RegisterBuffers() { if (state == State::Started) { - std::vector<AudioBuffer> registered_buffers{}; + boost::container::static_vector<AudioBuffer, BufferCount> registered_buffers{}; buffers.RegisterBuffers(registered_buffers); session->AppendBuffers(registered_buffers); } |