Re: Lost in the open ocean of Core Audio
Re: Lost in the open ocean of Core Audio
- Subject: Re: Lost in the open ocean of Core Audio
- From: Luke Evans <email@hidden>
- Date: Mon, 07 May 2007 10:49:12 -0700
- Thread-topic: Lost in the open ocean of Core Audio
Title: Re: Lost in the open ocean of Core Audio
Hi Daniel,
Thanks for the note. I was beginning to wonder whether my question was too pedestrian to warrant a response from the list ;-)
Right now, I’m actually filling in smallish blocks of samples directly from the OutputDevice, on demand, as you suggest, but I’ve resorted to generating a square wave independently of the speaker state (by cheating and knowing what frequency and duration of sound the emulated program wants). The problem is that I have the emulator running in ‘real time’ which sets the state of the virtual speaker on and off (that really is all it is capable of!). Because the emulator is doing this at its own rate, I would need to store what the state of the speaker was at a particular sample (or perhaps store the transition times), then it seems to me that I need to feed this into the requested blocks from the OutputDevice (or something else configured into the audio pipeline). Whatever I do here, it seems to me that I need an audio-resolution clock to tell me when to sample the speaker state (and I’m not sure right now where to begin with this), or I need to find some magic CoreAudio technology that simply lets me call a device/unit with the sample when it is produced (or changed) and have it look after feeding forward down the audio pipeline.
My main problem (which I’ll freely admit) is that I’m a complete n00b to the Mac audio stuff, and I’m sure ignorance of what is even possible (and broad brush-strokes of what is involved) is my biggest hurdle. Unless I’m confused by nomenclature, I don’t think I see any sample code that generates audio samples at an independent rate (like my emulator). This is only a small part of my overall goals, so I have perhaps not been too diligent in my research though.
The emulator, BTW, is nothing too exciting – just a personal folly and vehicle for a little learning of Mac APIs. I bumped into a new, cool website dedicated to a little-known ancient British Z80 based (8 bit) home microcomputer called the Jupiter Ace. I never owned one of these, but remember being fascinated by it in the short window between the hype and the vendor going bust! Its main claim to fame is that it had a very cute ROM Forth, rather than the traditional BASIC. Anyway, I was pissed that there was no Mac emulator for this (only a few Windows ones) and dedicated myself to correcting this terribly minor omission in the software cosmos.
Lwe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden