• 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
I think I weaseled out or my thread problem.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I think I weaseled out or my thread problem.


  • Subject: I think I weaseled out or my thread problem.
  • From: John Draper <email@hidden>
  • Date: Wed, 12 Apr 2006 23:18:45 -0700

Hi,

I'm not "Out of the woods" just yet.  First,  here is what I did.

I confirmed my code which puts a chunk of audio into a data Queue,
is running from within the RTP Listen thread.


So,  when Changed my code to look like this...

// This function runs from within a thread other then the main loop
- (void)incomingPacket:(char *)theData
ofLength:(int)len
{
// Construct a data object from pointer and length
NSData *data = [NSData dataWithBytes:theData
length:len];
// Force following method to execute in main loop
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self performSelectorOnMainThread:@selector(procFromMainLoop:) withObject:data waitUntilDone:NO];
[pool release];
}


// this is the function that can never run from within a thread.
- (void)procFromMainLoop:(NSData *)myData
{
  [mAudioTransporter processIncomingData:myData];
}

And program runs just fine now, except I think there it too much of a time interval between
the "incomingPacket" method and the "procFromMainLoop".


Is there a way to measure this time interval? It has to be much faster then about 20 ms or my
timing will be off, and the audio will sound fluttery because of the extra time from the time I
have my audio samples, and the time it gets put into the "play" buffer.


What kind of tools are available for measuring this time. Obviously, this varies a lot, based on
what's going on in the computer.


John


_______________________________________________ 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: paramErr from AudioConverterFillComplexBuffer with MP3 source
  • Next by Date: Results of timing test.
  • Previous by thread: Fwd: Coreaudio-api Digest, Vol 3, Issue 116
  • Next by thread: Results of timing test.
  • Index(es):
    • Date
    • Thread