Skip to content

Commit

Permalink
clang
Browse files Browse the repository at this point in the history
  • Loading branch information
lzardy committed Nov 27, 2024
1 parent 8b2da20 commit baf2932
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
2 changes: 1 addition & 1 deletion src/core/libraries/ngs2/ngs2.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include "common/types.h"

#include <atomic>
#include <vector>
#include <mutex>
#include <vector>

namespace Core::Loader {
class SymbolsResolver;
Expand Down
15 changes: 7 additions & 8 deletions src/core/libraries/ngs2/ngs2_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ s32 StackBufferClose(StackBuffer* stackBuffer, size_t* outTotalSize) {
return ORBIS_OK;
}

s32 StackBufferOpen(StackBuffer* stackBuffer, void* bufferStart, size_t bufferSize, void** outBuffer,
u8 flags) {
s32 StackBufferOpen(StackBuffer* stackBuffer, void* bufferStart, size_t bufferSize,
void** outBuffer, u8 flags) {
stackBuffer->top = outBuffer;
stackBuffer->base = bufferStart;
stackBuffer->size = (size_t)bufferStart;
Expand Down Expand Up @@ -144,15 +144,14 @@ s32 SystemSetup(const OrbisNgs2SystemOption* option, OrbisNgs2ContextBufferInfo*
}

if (hostBufferInfo->hostBufferSize < requiredBufferSize) {
LOG_ERROR(Lib_Ngs2, "Invalid system buffer size ({}<{}[byte])", hostBufferInfo->hostBufferSize,
requiredBufferSize);
LOG_ERROR(Lib_Ngs2, "Invalid system buffer size ({}<{}[byte])",
hostBufferInfo->hostBufferSize, requiredBufferSize);
return ORBIS_NGS2_ERROR_INVALID_BUFFER_SIZE;
}

// Setup
StackBufferOpen(&stackBuffer, hostBufferInfo->hostBuffer, hostBufferInfo->hostBufferSize,
&systemList,
optionFlags);
&systemList, optionFlags);
result = SystemSetupCore(&stackBuffer, option, &setupResult);

if (result < 0) {
Expand All @@ -164,8 +163,8 @@ s32 SystemSetup(const OrbisNgs2SystemOption* option, OrbisNgs2ContextBufferInfo*
// Copy buffer results
setupResult.bufferInfo = *hostBufferInfo;
setupResult.hostFree = hostFree;
//setupResult.extraSystemData =
//setupResult.systemList = systemList;
// TODO
// setupResult.systemList = systemList;

OrbisNgs2Handle systemHandle = setupResult.systemHandle;
if (hostBufferInfo->hostBufferSize >= requiredBufferSize) {
Expand Down
46 changes: 23 additions & 23 deletions src/core/libraries/ngs2/ngs2_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,27 @@ struct OrbisNgs2SystemInfo {
struct OrbisNgs2RackInfo {
char name[ORBIS_NGS2_RACK_NAME_LENGTH]; // 0

OrbisNgs2Handle rackHandle; // 16
OrbisNgs2Handle rackHandle; // 16
OrbisNgs2ContextBufferInfo bufferInfo; // 24

OrbisNgs2Handle ownerSystemHandle; // 88

u32 type; // 96
u32 rackId; // 100
u32 uid; // 104
u32 type; // 96
u32 rackId; // 100
u32 uid; // 104
u32 minGrainSamples; // 108
u32 maxGrainSamples; // 112
u32 maxVoices; // 116
u32 maxVoices; // 116
u32 maxChannelWorks; // 120
u32 maxInputs; // 124
u32 maxMatrices; // 128
u32 maxPorts; // 132

u32 stateFlags; // 136
float lastProcessRatio; // 140
u64 lastProcessTick; // 144
u64 renderCount; // 152
u32 activeVoiceCount; // 160
u32 maxInputs; // 124
u32 maxMatrices; // 128
u32 maxPorts; // 132

u32 stateFlags; // 136
float lastProcessRatio; // 140
u64 lastProcessTick; // 144
u64 renderCount; // 152
u32 activeVoiceCount; // 160
u32 activeChannelWorkCount; // 164
};

Expand Down Expand Up @@ -111,22 +111,22 @@ struct SystemInternal {
void* unknown;
};

rackList rackListPreset; // 152
rackList rackListNormal; // 176
rackList rackListMaster; // 200
rackList rackListPreset; // 152
rackList rackListNormal; // 176
rackList rackListMaster; // 200

void* unknown3; // 208
void* systemListPrev; // 216
void* unknown4; // 224
void* systemListNext; // 232
void* rackFunction; // 240

Kernel::PthreadMutex processLock; // 248
u32 hasProcessMutex; // 256
u32 unknown5; // 260
Kernel::PthreadMutex flushLock; // 264
u32 hasFlushMutex; // 272
u32 unknown6; // 276
Kernel::PthreadMutex processLock; // 248
u32 hasProcessMutex; // 256
u32 unknown5; // 260
Kernel::PthreadMutex flushLock; // 264
u32 hasFlushMutex; // 272
u32 unknown6; // 276

// info
u64 lastRenderTick; // 280
Expand Down

0 comments on commit baf2932

Please sign in to comment.