• 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: Need a callback on the MusicPlayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need a callback on the MusicPlayer


  • Subject: Re: Need a callback on the MusicPlayer
  • From: Bill Stewart <email@hidden>
  • Date: Thu, 6 Mar 2003 11:59:20 -0800

You won't get a callback for all events (that's a lot of overhead) - just for the MusicEventUserData events that you add into the sequence.

Switching a track's destination whilst playing.. um... not a good idea. You're better to duplicate the track and mute/unmute

Bill

On Thursday, March 6, 2003, at 12:17 AM, Philippe Wicker wrote:


On Thursday, March 6, 2003, at 08:13 AM, Bill Stewart wrote:

Its coming...


Good news :-))

But you're talking of "user data event", do you mean that only the MusicEventUserData will be dispatched? BTW, I tried to change the MusicDevice associated to a track while the MusicPlayer is running (this is a common action when using a sequencer) and I got an error "end of track". Using a callback which receives **all** events could have been a workaround.


There will be a way to instantiate a UserData callback on a given sequence... If there, the scheduler will call your callback with every user data event it finds - both in chasing and in playback - giving you the sequence, track, start and end beats for what it is rendering (these are tweaked in a different way so that you know when you're chasing v playing), event time of the user event and of course the user event itself.

Whilst chasing if you don't want these callbacks, you can just mute the tracks that have these events in them

Bill

On Wednesday, March 5, 2003, at 11:06 PM, Philippe Wicker wrote:

Hi all,

This is a question/suggestion to the CoreAudio/CoreMIDI team.

When playing a sequence with the MusicPlayer, it is today possible to direct MIDI events - on a per track basis - either to an AU or to a MIDIEndpoint. These 2 methods involves "items" which are "public", I mean accessible by any CoreAudio compliant application. There are situations where you may not want your MIDI destination to be public. To give a real case: I'd like to use the MusicPlayer to control the playback of audio tracks. I could implement this as a MusicDevice. I don't like this solution because 1) the AU is "public", 2) I just need a very limited subset of the AU features to playback my audio track. I could redirect the MIDI events to a MIDIEndpoint and do my own job in the MIDIReadProc. I don't like it too, because the endpoint is public and may receive events from any sources in the system.

A good solution, in my opinion, would be to add a third MIDI events destination for a MusicPlayer track. We could pass a callback that would be called by the MusicPlayer when MIDI events are to be played from a track. The API could be something like MusicTrackSetDestCallback(track, callback). This would be a very flexible solution.

What's your feeling about this?

Philippe Wicker
email@hidden


Philippe Wicker
email@hidden


-- mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __
_______________________________________________
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.
References: 
 >Re: Need a callback on the MusicPlayer (From: Philippe Wicker <email@hidden>)

  • Prev by Date: Re: Need a callback on the MusicPlayer
  • Next by Date: Re: Need a callback on the MusicPlayer
  • Previous by thread: Re: Need a callback on the MusicPlayer
  • Next by thread: Re: Need a callback on the MusicPlayer
  • Index(es):
    • Date
    • Thread