diff options
| author | 2022-06-07 17:02:29 -0400 | |
|---|---|---|
| committer | 2022-06-13 20:09:00 -0400 | |
| commit | 084d7d6b014443be7625fb9d8f1ddd309a22f6f4 (patch) | |
| tree | ea48c7b1d22a0b282846ba28a9b62c988e38bd29 /src/audio_core | |
| parent | Merge pull request #8458 from lat9nq/no-constexpr-flow-block (diff) | |
| download | yuzu-084d7d6b014443be7625fb9d8f1ddd309a22f6f4.tar.gz yuzu-084d7d6b014443be7625fb9d8f1ddd309a22f6f4.tar.xz yuzu-084d7d6b014443be7625fb9d8f1ddd309a22f6f4.zip | |
common: Change semantics of UNREACHABLE to unconditionally crash
Diffstat (limited to 'src/audio_core')
| -rw-r--r-- | src/audio_core/command_generator.cpp | 4 | ||||
| -rw-r--r-- | src/audio_core/effect_context.cpp | 4 | ||||
| -rw-r--r-- | src/audio_core/splitter_context.cpp | 2 | ||||
| -rw-r--r-- | src/audio_core/voice_context.cpp | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/audio_core/command_generator.cpp b/src/audio_core/command_generator.cpp index ff20ed00f..f97520820 100644 --- a/src/audio_core/command_generator.cpp +++ b/src/audio_core/command_generator.cpp | |||
| @@ -429,7 +429,7 @@ void CommandGenerator::GenerateDataSourceCommand(ServerVoiceInfo& voice_info, Vo | |||
| 429 | in_params.node_id); | 429 | in_params.node_id); |
| 430 | break; | 430 | break; |
| 431 | default: | 431 | default: |
| 432 | UNREACHABLE_MSG("Unimplemented sample format={}", in_params.sample_format); | 432 | ASSERT_MSG(false, "Unimplemented sample format={}", in_params.sample_format); |
| 433 | } | 433 | } |
| 434 | } | 434 | } |
| 435 | } | 435 | } |
| @@ -1312,7 +1312,7 @@ void CommandGenerator::DecodeFromWaveBuffers(ServerVoiceInfo& voice_info, std::s | |||
| 1312 | samples_to_read - samples_read, channel, temp_mix_offset); | 1312 | samples_to_read - samples_read, channel, temp_mix_offset); |
| 1313 | break; | 1313 | break; |
| 1314 | default: | 1314 | default: |
| 1315 | UNREACHABLE_MSG("Unimplemented sample format={}", in_params.sample_format); | 1315 | ASSERT_MSG(false, "Unimplemented sample format={}", in_params.sample_format); |
| 1316 | } | 1316 | } |
| 1317 | 1317 | ||
| 1318 | temp_mix_offset += samples_decoded; | 1318 | temp_mix_offset += samples_decoded; |
diff --git a/src/audio_core/effect_context.cpp b/src/audio_core/effect_context.cpp index 51059580e..79bcd1192 100644 --- a/src/audio_core/effect_context.cpp +++ b/src/audio_core/effect_context.cpp | |||
| @@ -50,7 +50,7 @@ EffectBase* EffectContext::RetargetEffect(std::size_t i, EffectType effect) { | |||
| 50 | effects[i] = std::make_unique<EffectBiquadFilter>(); | 50 | effects[i] = std::make_unique<EffectBiquadFilter>(); |
| 51 | break; | 51 | break; |
| 52 | default: | 52 | default: |
| 53 | UNREACHABLE_MSG("Unimplemented effect {}", effect); | 53 | ASSERT_MSG(false, "Unimplemented effect {}", effect); |
| 54 | effects[i] = std::make_unique<EffectStubbed>(); | 54 | effects[i] = std::make_unique<EffectStubbed>(); |
| 55 | } | 55 | } |
| 56 | return GetInfo(i); | 56 | return GetInfo(i); |
| @@ -104,7 +104,7 @@ void EffectI3dl2Reverb::Update(EffectInfo::InParams& in_params) { | |||
| 104 | auto& params = GetParams(); | 104 | auto& params = GetParams(); |
| 105 | const auto* reverb_params = reinterpret_cast<I3dl2ReverbParams*>(in_params.raw.data()); | 105 | const auto* reverb_params = reinterpret_cast<I3dl2ReverbParams*>(in_params.raw.data()); |
| 106 | if (!ValidChannelCountForEffect(reverb_params->max_channels)) { | 106 | if (!ValidChannelCountForEffect(reverb_params->max_channels)) { |
| 107 | UNREACHABLE_MSG("Invalid reverb max channel count {}", reverb_params->max_channels); | 107 | ASSERT_MSG(false, "Invalid reverb max channel count {}", reverb_params->max_channels); |
| 108 | return; | 108 | return; |
| 109 | } | 109 | } |
| 110 | 110 | ||
diff --git a/src/audio_core/splitter_context.cpp b/src/audio_core/splitter_context.cpp index 1751d0212..10646dc05 100644 --- a/src/audio_core/splitter_context.cpp +++ b/src/audio_core/splitter_context.cpp | |||
| @@ -483,7 +483,7 @@ bool NodeStates::DepthFirstSearch(EdgeMatrix& edge_matrix) { | |||
| 483 | // Add more work | 483 | // Add more work |
| 484 | index_stack.push(j); | 484 | index_stack.push(j); |
| 485 | } else if (node_state == NodeStates::State::InFound) { | 485 | } else if (node_state == NodeStates::State::InFound) { |
| 486 | UNREACHABLE_MSG("Node start marked as found"); | 486 | ASSERT_MSG(false, "Node start marked as found"); |
| 487 | ResetState(); | 487 | ResetState(); |
| 488 | return false; | 488 | return false; |
| 489 | } | 489 | } |
diff --git a/src/audio_core/voice_context.cpp b/src/audio_core/voice_context.cpp index c8e4a6caf..f58a5c754 100644 --- a/src/audio_core/voice_context.cpp +++ b/src/audio_core/voice_context.cpp | |||
| @@ -114,7 +114,7 @@ void ServerVoiceInfo::UpdateParameters(const VoiceInfo::InParams& voice_in, | |||
| 114 | in_params.current_playstate = ServerPlayState::Play; | 114 | in_params.current_playstate = ServerPlayState::Play; |
| 115 | break; | 115 | break; |
| 116 | default: | 116 | default: |
| 117 | UNREACHABLE_MSG("Unknown playstate {}", voice_in.play_state); | 117 | ASSERT_MSG(false, "Unknown playstate {}", voice_in.play_state); |
| 118 | break; | 118 | break; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| @@ -410,7 +410,7 @@ bool ServerVoiceInfo::UpdateParametersForCommandGeneration( | |||
| 410 | return in_params.should_depop; | 410 | return in_params.should_depop; |
| 411 | } | 411 | } |
| 412 | default: | 412 | default: |
| 413 | UNREACHABLE_MSG("Invalid playstate {}", in_params.current_playstate); | 413 | ASSERT_MSG(false, "Invalid playstate {}", in_params.current_playstate); |
| 414 | } | 414 | } |
| 415 | 415 | ||
| 416 | return false; | 416 | return false; |