• 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
Re: MusicSequencerSetUserCallback doesn't work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MusicSequencerSetUserCallback doesn't work


  • Subject: Re: MusicSequencerSetUserCallback doesn't work
  • From: Simone Tellini <email@hidden>
  • Date: Mon, 22 Dec 2008 00:12:32 +0100

MF ha scritto:

        

In the main function, I create a Track with an arbitrary event to test if the call back would work 


        MusicTrack inTrack;

        ParameterEvent e;

e.parameterID = kAudioUnitProperty_ScheduledFileRegion;

e.scope = kAudioUnitScope_Global;

e.element = 0;

e.value = 5;

MusicTrackNewParameterEvent(inTrack, 5, &e);

        MusicPlayerSetTime(inPlayer, 0.0);

MusicPlayerPreroll(inPlayer);

And I register the callback here...

MusicSequenceSetUserCallback(inSequence, getUserCallback(), NULL);

MusicPlayerStart(inPlayer);



However, my custom 'hit' callback function doesn't get called. Is there anything wrong with my setting? Could anyone please give me a simple example to get this call back work? Could not find any example anywhere... Thank you!
you should use MusicTrackNewUserEvent():

    YourEventStruct    event;
   
    event.length = sizeof( event );
    event.foo = 5;
  
    MusicTrackNewUserEvent( inTrack, timeStamp, reinterpret_cast<MusicEventUserData *>( &event ));

--
Simone Tellini
http://www.tellini.org
 _______________________________________________
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

References: 
 >MusicSequencerSetUserCallback doesn't work (From: MF <email@hidden>)

  • Prev by Date: MusicSequencerSetUserCallback doesn't work
  • Next by Date: Audio playing too fast but not simply sped up
  • Previous by thread: MusicSequencerSetUserCallback doesn't work
  • Next by thread: Audio playing too fast but not simply sped up
  • Index(es):
    • Date
    • Thread