• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Lost in the open ocean of Core Audio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lost in the open ocean of Core Audio


  • Subject: Re: Lost in the open ocean of Core Audio
  • From: William Stewart <email@hidden>
  • Date: Mon, 21 May 2007 12:11:11 -0700

Daniel

I think that you could use the DefaultOutputUnit in Developer/ Examples/CoreAudio/SimpleSDK as a starting point... you could just start and stop the output unit when you have data to give it and it will rate convert from whatever your format is to what the device is running at. I think that would solve your needs

Bill

On 07/05/2007, at 10:49 AM, Luke Evans wrote:

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

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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


References: 
 >Re: Lost in the open ocean of Core Audio (From: Luke Evans <email@hidden>)

  • Prev by Date: Re: ExtAudioFileWrite - memory or IO problem, data not flushed to disk immediately
  • Next by Date: Re: pause/resume file player... again...
  • Previous by thread: Re: Lost in the open ocean of Core Audio
  • Next by thread: [OT] Job offer at UltimateSoundBank
  • Index(es):
    • Date
    • Thread