• 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
MusicPlayerStart() - odd GC error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MusicPlayerStart() - odd GC error


  • Subject: MusicPlayerStart() - odd GC error
  • From: GW Rodriguez <email@hidden>
  • Date: Fri, 21 Oct 2011 15:51:34 -0700

I have a class that contains a MusicPlayer ivar and manages all the MusicPlayer functionality. I have properly initialized the player and created my custom callback within the same class and it worked fine.  

I wanted the callback function to be in my main class that has an instance of my player class.  I created a method to set the callback and to pass the main class:

// MyMusicPlayer class
// MusicSequence seq.

-(void) setCallback: (MusicSequenceUserCallback) callback fromClass: (void*) inClientData {

    CheckError(MusicSequenceSetUserCallback(seq, callback, inClientData), "Setting sequence callback failed", kLine);

    NSLog(@"set callback done");

}

// MyDelegateClass
// MyMusicPlayer *player;

static void cBackAutomation (void *inClientData,

                             MusicSequence inSequence,

                             MusicTrack inTrack,

                             MusicTimeStamp inEventTime,

                             const MusicEventUserData *inEventData,

                             MusicTimeStamp inStartSliceBeat,

                             MusicTimeStamp inEndSliceBeat)

{

    Float64 x = inEventTime*25;   

    MyDelegateClass *mainClass = inClientData;

    Float64 y = [mainClass yValueAt:x];

    y *= 2;

    NSLog(@"*** y value: %.2f", y);

    [mainClass release];

};

@implementation MyDelegateClass

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {

   player = [MyMusicPlayer new];

   [player setCallback:cBackAutomation fromClass:self];

}


Now when I start the player with MusicPlayerStart(player) I get an error: GW_Proj11.2(998,0x10da7b000) malloc: *** auto malloc[998]: error: GC operation on unregistered thread. Thread registered implicitly. Break on auto_zone_thread_registration_error() to debug.

Any ideas as to what's happening and/or how I can fix this?  The program seems to run without an issue but apparently there is a problem.
Thanks in advance.
--
GW Rodriguez


 _______________________________________________
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: Sample time interval of a AudioDeviceID [instance] stream?
  • Next by Date: Re: AUSampler details
  • Previous by thread: Re: Sample time interval of a AudioDeviceID [instance] stream?
  • Next by thread: Can't find Audio Unit examples
  • Index(es):
    • Date
    • Thread