Re: Playing diffrents sounds continuosly
Re: Playing diffrents sounds continuosly
- Subject: Re: Playing diffrents sounds continuosly
- From: David Duncan <email@hidden>
- Date: Thu, 18 Nov 2004 08:46:19 -0500
On Nov 18, 2004, at 07:34 AM, FILIPPIN LUCA wrote:
This works, but works badly because it requires too much time (about
20 ms)
to perform AudioUnitStop (but also audio components close) and I loose
start
time accuracy for next sound. I tried to use AudioUnitReset to stop
sound
instead of AudioUnitStop, and to close all audio components after I
played
all sounds. This works good for the first n sounds, but then
performances
slow down: I suppose this is due to the number of audio unit
allocated at
the same time. How can I overcome this problem?
Why not reuse the components you create to play new sounds? When one
sound ends, just start sending samples for the next one. Only stop the
entire chain when you are certain you don't want to send anymore audio
and only dispose of the components when your application terminates.
--
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