• 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: Setting the Number of Channels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting the Number of Channels


  • Subject: Re: Setting the Number of Channels
  • From: email@hidden
  • Date: Thu, 19 Jun 2003 13:54:41 -0700

Brian Willoughby writes:
> You're right, Bill, it is easy enough to use the C++
> CAStreamBasicDescription class within an ObjC project, but it sure
> slows down the compiler. I remember someone else complaining about
> how slow the ObjC++ compiler is, and now that I am using
> CAStreamBasicDescription in a Cocoa app, I know just what they're
> talking about. This really hurts rapid prototyping.

When I wrap a C++ object in ObjC, I declare it as a void* in the ObjC
header.

E.g.:

typedef void* CPPObject;

@interface ObjCWrapper : NSObject {
CPPObject _cppObject;
}

- (BOOL)doSomethingToCPPObject;

@end

In ObjCWrapper.mm you need to cast _cppObject before working with it,
but it prevents the ObjC++ from "polluting" the rest of the
project. This way you can keep the rest of your files as pure ObjC .m
files.

Using this convention, you only take the ObjC++ compilation speed hit
when modifying the .mm file, not across the entire project.

- sekhar

--
C. Ramakrishnan 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: 
 >Re: Setting the Number of Channels (From: Brian Willoughby <email@hidden>)

  • Prev by Date: Re: Multiple output devices under CoreAudio with Quicktime
  • Next by Date: Re: ioproc and recording audio
  • Previous by thread: Re: Setting the Number of Channels
  • Next by thread: Revised: Audio Unit Guidelines 2.0
  • Index(es):
    • Date
    • Thread