didFinishPlaying problem
didFinishPlaying problem
- Subject: didFinishPlaying problem
- From: Paul Fredlein <email@hidden>
- Date: Wed, 14 Dec 2005 11:38:40 +1000
Hi,
Not sure if this NSSound is coreaudio but anyway...
I have multiple instances of NSSound in memory and am playing them
sequentially. When I click a 'stop' the current sound immediately
stops but instead of the complete sequence stopping the next sound
plays and then the sequence stops.
I have a total of m_num sounds and the current playing sound is m_1 -1.
//----------------------------------------------------------------------
--------
- (void) playNext
{
if(m_i < m_num)
{
[m_page playAudio: m_i]; // start it.
m_i++;
}
}
//----------------------------------------------------------------------
--------
- (void)sound:(NSSound* )sound didFinishPlaying:(BOOL)aBool
{
[self playNext];
}
//----------------------------------------------------------------------
--------
- (void) stop
{
if(m_i < m_num)
{
[[m_page soundAtIndex: m_i-1] stop];
m_i = m_num;
}
}
//----------------------------------------------------------------------
--------
The above code is essentially the same as from some kind soul on the
'net who helped. I really need to stop the sequence when the stop
button is clicked. Any help appreciated.
Paul
_______________________________________________
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