• 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: Tone generation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tone generation


  • Subject: Re: Tone generation
  • From: David Duncan <email@hidden>
  • Date: Sun, 20 Mar 2005 17:32:06 -0500

On Mar 20, 2005, at 05:10 PM, MS wrote:

Specifically, I wish to generate a 500uS packet of
15Khz tone if some input is a "1", and conversely, I'd
like to generate a 500uS packet of 0Hz (no tone) for a
"0".

What your going to want to do is continuously run the tone generator, and check during your render proc if you should output samples for the specific time frame that any part of the render buffer represents. Since 500µs is only 22.05 samples, your going to have to be able to deal with multiple pulses in one render callback. I would probably keep a queue of integer bit fields and pull from the queue as you need to to determine when you need to render 0s and 1s. Should be relatively straight forward once you get a queue setup that won't cause you to lock in the render proc (there should be a ring buffer implementation in the SDK that you can adapt).
--
Reality is what, when you stop believing in it, doesn't go away.
Failure is not an option. It is a privilege reserved for those who try.


David Duncan

_______________________________________________
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: 
 >Tone generation (From: MS <email@hidden>)

  • Prev by Date: Tone generation
  • Next by Date: Re: Tone generation
  • Previous by thread: Tone generation
  • Next by thread: Re: Tone generation
  • Index(es):
    • Date
    • Thread