Re: Automatically stop MusicPlayer
Re: Automatically stop MusicPlayer
- Subject: Re: Automatically stop MusicPlayer
- From: Bill Stewart <email@hidden>
- Date: Thu, 05 Sep 2002 12:39:38 -0700
There isn't a simple way to do this (and this is a shortcoming I guess).
You can determine the duration of the sequence using the new hosttime to
beats calls in both the music player and music sequence objects in 10.2
Then, figure out from that upon what host time value your sequence would
have finished playing (from when you started it) and probably add a few
seconds for the reverb tail to fade away (as the "end" value of the sequence
is the time of the last event), then stop it from your main thread...
Sounds like a good addition for the SDK (but it won't make it this time
round - sorry)
Bill
on 5/9/02 8:25 AM, Kimo Johnson wrote:
>
Hello,
>
>
I am working on a simple MIDI file player using
>
MusicSequenceLoadSMF(), MusicPlayerSetSequence(), MusicPlayerPreroll()
>
and MusicPlayerStart(). The application functions correctly right now
>
when I press the Play and Stop buttons in my interface.
>
>
What I need to be able to do is automatically call MusicPlayerStop()
>
when there is no more MIDI data in the file left to play. I've looked
>
through MusicPlayer.h but I can't figure out an easy way to do this.
>
Any suggestions?
>
>
Thank you,
>
Kimo Johnson
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
--
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"...Been havin' some trouble lately in the sausage business," C.M.O.T.
Dibbler replied.
"What, having trouble making both ends meat?"
__________________________________________________________________________
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.