// // sub_C10E8 from 0xc10e8 to 0xc12aa (450 bytes) // // 2 xrefs: // > sub_C1358 @ 0xc13c2 // > sub_C17FC @ 0xc1852 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:41:49 +0000 // int __fastcall sub_C10E8(int *a1, _DWORD *a2, int a3, int a4, int a5) { int v5; // r9 int v9; // r4 int v10; // r1 int SampleRate; // r6 int FramesPerBurst; // r11 int BufferCapacityInFrames; // r4 int v14; // r4 int v16; // r0 int BufferSizeInFrames; // [sp+0h] [bp-30h] int v18; // [sp+4h] [bp-2Ch] BYREF int v19; // [sp+8h] [bp-28h] BYREF int v20; // [sp+Ch] [bp-24h] int v21; // [sp+10h] [bp-20h] BYREF v5 = *a1; if ( !so_AAudio_createStreamBuilder(&v21) ) { v20 = 0; v19 = v21; so_AAudioStreamBuilder_setPerformanceMode(v21, 12); if ( so_AAudioStreamBuilder_setUsage ) ((void (__fastcall *)(int, int))so_AAudioStreamBuilder_setUsage)(v21, 14); if ( a3 ) { so_AAudioStreamBuilder_setDirection(v21, 1); so_AAudioStreamBuilder_setDataCallback(v21, sub_C1076, a5); so_AAudioStreamBuilder_setErrorCallback(v21, sub_C10E2, a5); if ( a4 >= 0 && so_AAudioStreamBuilder_setInputPreset && *(_DWORD *)(v5 + 8876) > a4 && *(int *)(v5 + 276 * a4 + 9152) >= 1 ) { ((void (__fastcall *)(int))so_AAudioStreamBuilder_setInputPreset)(v21); } } else { so_AAudioStreamBuilder_setDirection(v21, 0); so_AAudioStreamBuilder_setDataCallback(v21, sub_C1008, a5); so_AAudioStreamBuilder_setErrorCallback(v21, sub_C1060, a5); } if ( so_AAudioStreamBuilder_setDeviceId ) { if ( a3 ) { if ( a4 < 0 || *(_DWORD *)(v5 + 8876) <= a4 ) goto LABEL_21; v10 = *(_DWORD *)(v5 + 276 * a4 + 8884); } else { if ( a4 < 0 || *(_DWORD *)(v5 + 36) <= a4 ) goto LABEL_21; v10 = *(_DWORD *)(v5 + 276 * a4 + 40); } ((void (__fastcall *)(int, int))so_AAudioStreamBuilder_setDeviceId)(v21, v10); } LABEL_21: v18 = 0; if ( so_AAudioStreamBuilder_openStream(v21, &v18) ) goto LABEL_29; BufferSizeInFrames = so_AAudioStream_getBufferSizeInFrames(v18); SampleRate = so_AAudioStream_getSampleRate(v18); FramesPerBurst = so_AAudioStream_getFramesPerBurst(v18); BufferCapacityInFrames = so_AAudioStream_getBufferCapacityInFrames(v18); sub_C085C(v18); if ( !a3 && BufferCapacityInFrames < 2 * BufferSizeInFrames ) { v14 = 2 * BufferSizeInFrames; if ( !*(_BYTE *)(v5 + 28) && v14 <= ((int)(float)((float)SampleRate * 0.18) / FramesPerBurst + 1) * FramesPerBurst ) v14 = ((int)(float)((float)SampleRate * 0.18) / FramesPerBurst + 1) * FramesPerBurst; so_AAudioStreamBuilder_setBufferCapacityInFrames(v21, v14); } if ( so_AAudioStreamBuilder_openStream(v21, a2) ) goto LABEL_29; v20 = *a2; if ( so_AAudioStream_getDeviceId ) so_AAudioStream_getDeviceId(); if ( a3 ) { v16 = so_AAudioStream_getBufferCapacityInFrames(*a2); if ( so_AAudioStream_setBufferSizeInFrames(*a2, v16) < 0 ) { LABEL_29: v9 = 51; LABEL_30: sub_C0EC8(&v19); return v9; } } else { so_AAudioStream_setBufferSizeInFrames(*a2, BufferSizeInFrames); } v9 = 0; v20 = 0; goto LABEL_30; } return 51; }
GD Web Decomp Icon

GD Web Decomp

Raw Source