• 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
Editing a looping MusicTrack as it plays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Editing a looping MusicTrack as it plays


  • Subject: Editing a looping MusicTrack as it plays
  • From: "Dave O'Neill" <email@hidden>
  • Date: Wed, 22 May 2013 15:58:14 -0700

I found a workaround to the issue of the MusicPlayer stopping when editing close to loop point of MusicTrack while playing. I add an arbitrary user event exactly at the loopPoint. For instance, the loop point of my track is at 8, so before starting the track I add this user event: 

    typedef struct{
        UInt32  length;
        int     fillerInt;
    }BogusStruct;

    BogusStruct bogusStruct = {0};
    bogusStruct.length = sizeof(BogusStruct);

    MusicTrackNewUserEvent(_musicTrack, 8,(MusicEventUserData *)&bogusStruct);


I think you can add any event, I just chose this because it never gets used if you don,t specify a callback using MusicSequenceSetUserCallback.

Dave
 _______________________________________________
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: RE: off-topic question
  • Next by Date: Re: Is kAudioUnitSubType_DLSSynth compatible with the Mac OS X App sandbox
  • Previous by thread: RE: off-topic question
  • Next by thread: Print Session AU Lab
  • Index(es):
    • Date
    • Thread