Re: stop a sound file after playing once?
Re: stop a sound file after playing once?
- Subject: Re: stop a sound file after playing once?
- From: Gregory Wieber <email@hidden>
- Date: Thu, 21 Jul 2011 16:17:22 -0700
It takes a significant amount of time to start and stop a graph, so it's preferable to keep it playing with 0's fed into the buffer; That seems to be a common suggestion here on the core audio mailing list.
On Thu, Jul 21, 2011 at 4:03 PM, Bob Sabiston
<email@hidden> wrote:
On Jul 21, 2011, at 4:18 PM, Aran Mulholland wrote:
From what I understand you are copying samples into a buffer from
memory. You obviously know which samples you are copying (because you
are copying them), so what would stop you, once you have copied all
the samples for a "one-shot", simply not copying any more? Once you
have played through all the samples in your sound file fill the buffer
with 0's instead of copying samples from the start of it again.
Yes I was going to try that, but if I'm not actively playing a sound effect, isn't that wasteful of processing power to be calling this empty bus? Wouldn't I want to actually disable the bus until I wanted to play a sound effect, and turn it off afterward? Surely this is a common thing to need to do -- what do most people here do? I am sorry for the newbish question.
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
_______________________________________________
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