clang-format

This commit is contained in:
Demur Rumed 2025-04-26 04:03:48 +00:00
parent 61889eb9da
commit 3fc48602c9
4 changed files with 7 additions and 7 deletions

View file

@ -26,4 +26,4 @@
# and pass it as an argument to clang-format
# verbose to print files being formatted and X out of Y status
find soh -type f \( ! -path "soh/include/miniaudio/*" -a ! -path "soh/include/dr_libs/*" -a \( -name "*.c" -o -name "*.cpp" -o \( \( -name "*.h" -o -name "*.hpp" \) ! -path "soh/src/*" ! -path "soh/include/*" \) \) \) ! -path "soh/assets/*" -print0 | xargs -0 clang-format-14 -i --verbose
find soh -type f \( ! -path "soh/include/miniaudio/*" -a \( -name "*.c" -o -name "*.cpp" -o \( \( -name "*.h" -o -name "*.hpp" \) ! -path "soh/src/*" ! -path "soh/include/*" \) \) \) ! -path "soh/assets/*" -print0 | xargs -0 clang-format-14 -i --verbose

View file

@ -262,8 +262,7 @@ void AccessibleAudioEngine::doPlaySound(SoundAction& action) {
ma_sound_stop(&sound->sound);
destroySound(sound);
}
}
else {
} else {
SoundSlots temp;
for (int i = 0; i < AAE_SLOTS_PER_HANDLE; i++)
temp[i].active = false;
@ -273,8 +272,8 @@ void AccessibleAudioEngine::doPlaySound(SoundAction& action) {
}
ma_result result = ma_sound_init_from_file(&engine, action.path.c_str(),
MA_SOUND_FLAG_NO_SPATIALIZATION | MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT, NULL, NULL,
&sound->sound);
MA_SOUND_FLAG_NO_SPATIALIZATION | MA_SOUND_FLAG_NO_DEFAULT_ATTACHMENT,
NULL, NULL, &sound->sound);
if (result != MA_SUCCESS) {
SPDLOG_ERROR("failed to play sound: {}", ma_result_description(result));
return;

View file

@ -693,7 +693,8 @@ const char* ActorAccessibility_MapSfxToExternalAudio(s16 sfxId) {
auto pair = aa->sfxMap.insert({ sfxId, tempRecord });
record = &pair.first->second;
ma_resource_manager_register_decoded_data(&aa->audioEngine->resourceManager, record->path.c_str(),
record->resource->Buffer->data(), record->resource->Buffer->size() / 2, ma_format_s16, 1, 44100);
record->resource->Buffer->data(),
record->resource->Buffer->size() / 2, ma_format_s16, 1, 44100);
} else {
record = &it->second;
}

View file

@ -204,7 +204,7 @@ void SfxExtractor::captureCallback() {
outputStarted = true;
size_t samples = std::min<size_t>(SFX_EXTRACTION_ONE_FRAME, samplesLeft);
mark += samples * 2;
samplesLeft -= samples;
samplesLeft -= samples;
}
if (renderOutput(mark - tempBuffer)) {
captureThreadState = CT_FINISHED;