Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: old mtcoreaudio code doesn't work now




On Jan 6, 2008, at 4:40 PM, Michael Thornburgh wrote:


On Jan 6, 2008, at 4:08 PM, dudley ackerman wrote:
On Jan 6, 2008, at 12:41 PM, Michael Thornburgh wrote:
<snip>
but i want to emphasize that the outputDevice is failing to be opened which is a problem prior to any buffer issues.
this didn't happen when i was using mtcoreaudio as a framework -- only, now, when i include the files directly in my project. what can i look for to figure this issue out? or what info could i gather that would help someone help me?

what exactly do you mean by "failing to be opened"?  do you mean outputDevice is nil?  or it's non-nil, but the device has no output streams/channels?  or it does, but you can't start any IO on it?

i don't remember any special secret compile-time settings that would affect the behavior of any of the classes at load time.  i don't see any +load methods at all, nor any +initialize ones that would cause only some audio devices to not work anymore.  so i don't see a reason why framework vs non-framework would affect anything.

remember to call

  [MTCoreAudioDevice attachNotificationsToThisThread];

in your main() before starting NSApplicationMain().  that's probably not your problem, but it's important anyway.

-mike

this is the sequence of calls in starting to record:

this>  [inputDevice deviceStart]

calls this>   deviceIOStarted = [MTCoreAudioIOProcMux registerDevice:self];

which calls this>   return [[[self classmuxForDevice:theDevice] registerDevice:theDevice];
which calls this>      rv = AudioDeviceCreateIOProcID ( myDeviceID, demuxIOProc, self,0);

which has this value   1852797029 which not 'noErr'
which causes AudioDeviceStart to not be called.

problem is i put in AudioDeviceCreateIOProcID in place of AudioDeviceAddIOProc.
i used nil for the extra parameter -- evidently that isn't right.

going back to the deprecated method which works.

but if anyone cares to show me how to use the newer method correctly, that would be ok.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden

References: 
 >Re: old mtcoreaudio code doesn't work now (From: dudley ackerman <email@hidden>)
 >Re: old mtcoreaudio code doesn't work now (From: Michael Thornburgh <email@hidden>)
 >Re: old mtcoreaudio code doesn't work now (From: dudley ackerman <email@hidden>)
 >Re: old mtcoreaudio code doesn't work now (From: Michael Thornburgh <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.