• 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
MusicPlayer stopping then restarting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MusicPlayer stopping then restarting


  • Subject: MusicPlayer stopping then restarting
  • From: Michael Norris <email@hidden>
  • Date: Wed, 13 Aug 2003 13:42:26 +1200

This topic was discussed back in January, but none of the suggested
solutions seemed to cure with the problem completely, rather they just
improved the symptoms.

I wonder if anyone has discovered the perfect solution...

THE PROBLEM:
When a MusicPlayer sequence is stopped mid-flight, the time reset to
zero then restarted, a very audible "blip" (sometimes quite loud) is
heard as the notes that were playing when MusicPlayer stopped are
flushed from the queue.

The two suggestions in previous posts were:
1) Doing an AudioUnitReset
2) Sending a MIDI notes off message just before and after restarting

Anyone like to comment on the efficacy of these or other methods?


FYI, here's a summary of the code sequence:
NewMusicPlayer(&player);
NewMusicSequence(&sequence);
MusicSequenceNewTrack(sequence,&track);
// add notes using:
MusicTrackNewMIDINoteEvent (
track, timeStamp, &noteMessage);
MusicPlayerSetSequence (player, sequence);
MusicPlayerPreroll (player);
MusicPlayerStart (player);
// then when mid-flight
MusicPlayerStop (player);
MusicPlayerSetTime(player, 0.0);
// wait a while then:
MusicPlayerPreroll (player);
MusicPlayerStart (player);
// the "blip" is heard

-----------------------
Michael Norris
Composer/Programmer
8 Bidwill St
Mt Cook
Wellington 6002
NEW ZEALAND
-----------------------

Ph: +64 4 803 3644
Web: http://mnorris.wellington.net.nz
Stroma: http://stroma.wellington.net.nz
_______________________________________________
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.

  • Follow-Ups:
    • Re: MusicPlayer stopping then restarting
      • From: Bill Stewart <email@hidden>
  • Prev by Date: Re: Java: JNI problem with copyFromArray()
  • Next by Date: Re: MusicPlayer stopping then restarting
  • Previous by thread: A/V sync problems with CoreAudio driver
  • Next by thread: Re: MusicPlayer stopping then restarting
  • Index(es):
    • Date
    • Thread