• 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: More mysterious error codes...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More mysterious error codes...


  • Subject: Re: More mysterious error codes...
  • From: Philippe Wicker <email@hidden>
  • Date: Thu, 30 Jan 2003 06:44:35 +0100

On Thursday, January 30, 2003, at 02:49 AM, Michael Norris wrote:

Hi Michael,

How did you get the MusicTrack you pass to MusicTrackNewExtendedTempoEvent?
Tempo event are segregated in a special track, the tempo track, which is obtained by calling MusicSequenceGetTempoTrack() (look at MusicPlayer.h line 293). You should pass the tempo track ref and not the track you obtained from MusicSequenceNewTrack.


Thanks to Philippe & Bill for pointing out the missing code in my last
query. Now at least my MusicSequence works!

I've come up with another more mysterious problem, though. My goal is
to create a tempo change, using MusicTrackNewExtendedTempoEvent.

Here's the outline of the code:

NewMusicPlayer()
NewMusicSequence()
MusicPlayerSetSequence()
MusicSequenceNewTrack()
MusicTrackNewExtendedTempoEvent(track,0.0,60.0);

where track is my successfully created MusicTrack, 0.0 is the time I
want this event to start, and 60.0 is the bpm I want to set.

Again, this all compiles and runs successfully, apart from the last
line, MusicTrackNewExtendedTempoEvent, which returns an error -10855.
According to MusicPlayer.h, this is an error of type
kAudioToolboxErr_IllegalTrackDestination

Which is strange, as the MusicTrack parameter seems perfectly fine to
me: in the very next line of code I call MusicTrackNewMIDINoteEvent()
using the same MusicTrack variable, and it works fine without returning
an error message. Do tracks need to be of a certain 'type' to accept
extended tempo events? (E.g., I know that MIDI files get their own
tempo tracks made when loaded into a MusicSequence.) But I can't find
anything in the documentation or the header file to suggest that one
*has* to do this.

Cheers


Philippe Wicker
email@hidden
_______________________________________________
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: 
 >More mysterious error codes... (From: Michael Norris <email@hidden>)

  • Prev by Date: More mysterious error codes...
  • Next by Date: Mystery solved
  • Previous by thread: More mysterious error codes...
  • Next by thread: Mystery solved
  • Index(es):
    • Date
    • Thread