Re: Intermixing AudioServices and CoreAudio?
Re: Intermixing AudioServices and CoreAudio?
- Subject: Re: Intermixing AudioServices and CoreAudio?
- From: Bob Sabiston <email@hidden>
- Date: Sat, 09 Jul 2011 17:06:49 -0500
I also read that AVAudioPlayer is not good for sound effects, because of lag. My thing is a game which needs rapid sound effects -- anyone know of a tutorial/sample code that will show me how to basically duplicate AudioServicesPlaySystemSound within an Audio Unit?
I'm looking at the "MixerHost" sample, hopefully that will help.
Thanks
Bob
On Jul 9, 2011, at 4:44 PM, David Duncan wrote:
> Audio Services offers no control over volume, hence why the volumes don't match. If you want control, you'll have to use AVFoundation or Core Audio directly. You can use AVAudioPlayer to play your sound effects relatively easily.
>
> On Jul 9, 2011, at 10:14 AM, Bob Sabiston wrote:
>
>> Hello again,
>>
>> I don't think anyone answered this question. Basically I am wanting to know if it's ok to mix these two ways of playing Audio on iOS. I am getting unpredictable jumps in volume and I can't figure out why.
>>
>> Thanks
>> Bob
>>
>>
>>> Date: Wed, 06 Jul 2011 09:57:38 -0500
>>> From: Bob Sabiston <email@hidden>
>>> Subject: Intermixing AudioServices and CoreAudio?
>>> To: email@hidden
>>> Message-ID: <email@hidden>
>>> Content-Type: text/plain; charset="us-ascii"
>>>
>>> Hello,
>>>
>>> I was wondering if someone could advise me about how best to use audio in my iOS game. I started out using AudioServicesPlaySystemSound to just trigger little aiff files for sound effects. Then I wanted to try adding some synth-based sounds, playing around with sin waves. So I followed Tim Bolstad's tutorial on setting up an AUGraph and a couple of audio units:
>>>
>>> http://timbolstad.com/2010/03/17/core-audio-getting-started-pt3/
>>>
>>> For the most part this all works OK, but I've noticed that the volume of the sounds is extremely unpredictable, especially the sounds played with AudioServicesPlaySystemSound. On the iphone they are usually VERY quiet. The iPad, not so much.
>>>
>>> Should I be using the AUGraph core audio stuff to do all my sound? Would that give me control over the volume? Is it easy to play the same little aiff files with core audio that I now use with AudioServicesPlaySystemSound?
>>>
>>> Or even easier, is there some way to just make AudioServicesPlaySystemSound always play at a reliable volume?
>>>
>>> Thanks
>>> Bob
>>
>> _______________________________________________
>> 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
>
> --
> 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