I am seeking an example of using Audio Queue Services.
I would like to create a sound using a mathematical equation and then hear it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s my code for generating sound from a function. I’m assuming you know how to use AudioQueue services, set up an AudioSession, and properly start and stop an audio output queue.
Here’s a snippet for setting up and starting an output AudioQueue:
Here’s the part that generates the tone:
Something to watch out for is that your callback will be called on a non-main thread, so you have to practice thread safety with locks, mutexs, or other techniques.