diff options
| -rw-r--r-- | src/core/hle/service/audio/audin_u.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/service/audio/audin_u.cpp b/src/core/hle/service/audio/audin_u.cpp index bce7e61dd..3e2299426 100644 --- a/src/core/hle/service/audio/audin_u.cpp +++ b/src/core/hle/service/audio/audin_u.cpp | |||
| @@ -57,8 +57,9 @@ void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) { | |||
| 57 | LOG_DEBUG(Service_Audio, "called"); | 57 | LOG_DEBUG(Service_Audio, "called"); |
| 58 | const std::size_t count = ctx.GetWriteBufferSize() / sizeof(AudioInDeviceName); | 58 | const std::size_t count = ctx.GetWriteBufferSize() / sizeof(AudioInDeviceName); |
| 59 | 59 | ||
| 60 | std::vector<AudioInDeviceName> device_names; | ||
| 61 | const std::size_t device_count = std::min(count, audio_device_names.size()); | 60 | const std::size_t device_count = std::min(count, audio_device_names.size()); |
| 61 | std::vector<AudioInDeviceName> device_names; | ||
| 62 | device_names.reserve(device_count); | ||
| 62 | 63 | ||
| 63 | for (std::size_t i = 0; i < device_count; i++) { | 64 | for (std::size_t i = 0; i < device_count; i++) { |
| 64 | const auto& device_name = audio_device_names[i]; | 65 | const auto& device_name = audio_device_names[i]; |
| @@ -75,7 +76,7 @@ void AudInU::ListAudioIns(Kernel::HLERequestContext& ctx) { | |||
| 75 | 76 | ||
| 76 | void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) { | 77 | void AudInU::ListAudioInsAutoFiltered(Kernel::HLERequestContext& ctx) { |
| 77 | LOG_DEBUG(Service_Audio, "called"); | 78 | LOG_DEBUG(Service_Audio, "called"); |
| 78 | const u32 device_count = 0; | 79 | constexpr u32 device_count = 0; |
| 79 | 80 | ||
| 80 | // Since we don't actually use any other audio input devices, we return 0 devices. Filtered | 81 | // Since we don't actually use any other audio input devices, we return 0 devices. Filtered |
| 81 | // device listing just omits the default input device | 82 | // device listing just omits the default input device |
| @@ -99,12 +100,12 @@ void AudInU::OpenInOutImpl(Kernel::HLERequestContext& ctx) { | |||
| 99 | } | 100 | } |
| 100 | 101 | ||
| 101 | void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) { | 102 | void AudInU::OpenAudioIn(Kernel::HLERequestContext& ctx) { |
| 102 | LOG_WARNING(Service_Audio, "called"); | 103 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 103 | OpenInOutImpl(ctx); | 104 | OpenInOutImpl(ctx); |
| 104 | } | 105 | } |
| 105 | 106 | ||
| 106 | void AudInU::OpenAudioInProtocolSpecified(Kernel::HLERequestContext& ctx) { | 107 | void AudInU::OpenAudioInProtocolSpecified(Kernel::HLERequestContext& ctx) { |
| 107 | LOG_WARNING(Service_Audio, "called"); | 108 | LOG_WARNING(Service_Audio, "(STUBBED) called"); |
| 108 | OpenInOutImpl(ctx); | 109 | OpenInOutImpl(ctx); |
| 109 | } | 110 | } |
| 110 | 111 | ||