Hi

It’s been 15+ years since I worked on this stuff, but here’s a small repo with 
some legacy documents I found. There might be something useful here.

https://github.com/onereddogmedia/AppleAudio



From: Gagan Sidhu via Coreaudio-api <[email protected]>
Date: Sunday, 1 January 2023 at 1:31 pm
To: [email protected] <[email protected]>
Subject: Re: how to ensure clipOutputSamples/convertInputSamples are called
what’s up homeslizzices

decided to load Lion today, and guess what i found. after some (sorta 
unexpected, but really i shouldn’t be surprised) changes for the older compiler:

u>9174542911 XonarAudioEngine::getCurrentSampleFrame          curr_addr is 
0x5982240c
u>9174543323 XonarAudioEngine::clipOutputSamples              START
u>9174543370 XonarAudioEngine::clipOutputSamples              END
u>9174554008 XonarAudioEngine::clipOutputSamples              START
u>9174554045 XonarAudioEngine::clipOutputSamples              END




couple things, though:
1. load/read{b,w,l} still don’t behave the way you’d expect
2. it seems the calls to IOMapped{Read,Write}{8,16,32} can trigger a surprising 
panic that doesnt’ happen in BROjave:


```
u>156732193 XonarAudioEngine::
u>156732245 Debugger: Unexpected kernel trap number: 0xd, RIP: 
0xffffff800024455e, CR2: 0x7ff9698151fe
u>156732262 panic trap number 0xd, rip 0xffffff800024455e
u>156732276 cr0 0x000000008001003b cr2 0x00007ff9698151fe cr3 
0x0000000000100000 cr4 0x00000000000206e0
u>156732293 Panic initiated, string: Kernel trap at 0x%016llx, type %d=%s, 
registers:
u>156732311 CR0: 0x%016llx, CR2: 0x%016llx, CR3: 0x%016llx, CR4: 0x%016llx
u>156732330 RAX: 0x%016llx, RBX: 0x%016llx, RCX: 0x%016llx, RDX: 0x%016llx
u>156732348 RSP: 0x%016llx, RBP: 0x%016llx, RSI: 0x%016llx, RDI: 0x%016llx
u>156732367 R8:  0x%016llx, R9:  0x%016llx, R10: 0x%016llx, R11: 0x%016llx
u>156732385 R12: 0x%016llx, R13: 0x%016llx, R14: 0x%016llx, R15: 0x%016llx
u>156732404 RFL: 0x%016llx, RIP: 0x%016llx, CS:  0x%016llx, SS:  0x%016llx
u>156732422 CR2: 0x%016llx, Error code: 0x%016llx, Faulting CPU: 0x%x%s
u>156732441
u>156732454 panic(cpu 18 caller 0xffffff80002c4794): Kernel trap at 
0xffffff800024455e, type 13=general protection, registers:
u>156732475 CR0: 0x000000008001003b, CR2: 0x00007ff9698151fe, CR3: 
0x0000000000100000, CR4: 0x00000000000206e0
u>156732495 RAX: 0xffffff80b2066ec0, RBX: 0xffffff80b0a6fdc0, RCX: 
0x0000000009000000, RDX: 0xffffff80b0a6fdd0
u>156732515 RSP: 0xffffff8a843538f0, RBP: 0xffffff8a843539c0, RSI: 
0x0000000000000001, RDI: 0xffffff80b0a6fdd0
u>156732535 R8:  0x0000000000000098, R9:  0xffffff80b3249a00, R10: 
0x0000000000000010, R11: 0xffffff7f807a44d4
u>156732554 R12: 0xffffff80b0f65300, R13: 0xffffff80b0f38040, R14: 
0xffff000000f30000, R15: 0x00000000000000d0
u>156732574 RFL: 0x0000000000010206, RIP: 0xffffff800024455e, CS:  
0x0000000000000008, SS:  0x0000000000000010
u>156732594 CR2: 0x00007ff9698151fe, Error code: 0x0000000000000000, Faulting 
CPU: 0x12
u>156732610
u>156732624 Debugger called: <panic>
u>156732640 Backtrace (CPU 18), Frame : Return Address
u>156732656 0xffffff8a843535a0 : 0xffffff8000220792


```


either way, at least the clipping library is being called. it seems like i may 
have a better shot at getting this to work in lion/mountain lion than the newer 
kernels


gonna grab 10.8.4 so i can get wifi on my bizzox


keep yas posted bbs 😘😚😙💋😘😚😙💋😘😚😙💋


Thanks,
Gagan


On Dec 30, 2022, at 1:31 PM, Gagan Sidhu via Coreaudio-api 
<[email protected]<mailto:[email protected]>> wrote:

hello everyone,

i am now at the point of testing the driver and hit a snag.

it seems neither of the clipOutputSamples/convertInputSamples functions are 
being called.

when i call getCurrentSampleFrame, the position remains at the head of the 
assigned sample buffer.

this supports my claim these clip functions are not being called, since they 
would pass/convert the floating point sound data to the device driver.

why is this happening? i have linked these functions from a separate static 
library.

but you would think these functions are called before getCurrentSampleFrame, 
no? and yet i see nothing. i am hoping this is just a big noob mistake.

code is here and should compile on any system so long as the SDK version 
matches the target operating system
-i am on mojave so i couldn’t use the 11.3.1 SDK because of two symbols related 
to meta classes, but there are no problems if you build on crapalina for 
crapalina.

https://github.com/i3roly/CMI8788/


Thanks,
Gagan

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/broly%40mac.com

This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to