• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
didFinishPlaying problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Link problem trying to use audiofloat library in my kext
  • Next by Date: Re: DataSourceName notification?
  • Previous by thread: Re: Link problem trying to use audiofloat library in my kext
  • Next by thread: mp3 file making CAAudioFile spin in BasicRead()
  • Index(es):
    • Date
    • Thread