<?xml version="1.0"?><!-- RSS generated by Radio UserLand v8.0.8 on Sun, 27 Feb 2005 20:07:54 GMT --><rss version="2.0">	<channel>		<title>Chuck Remes: cremes&apos; CoreAudio and QuickTime Blog</title>		<link>http://radio.weblogs.com/0134505/categories/CoreAudio/</link>		<description>Track the work I&apos;m doing on a QuickTime Component to support the FLAC lossless compression codec via CoreAudio</description>		<language>en-us</language>		<copyright>Copyright 2005 Chuck Remes</copyright>		<lastBuildDate>Sun, 27 Feb 2005 20:07:54 GMT</lastBuildDate>		<docs>http://backend.userland.com/rss</docs>		<generator>Radio UserLand v8.0.8</generator>		<managingEditor>cremes@opendarwin.org</managingEditor>		<webMaster>cremes@opendarwin.org</webMaster>		<category domain="http://www.weblogs.com/rssUpdates/changes.xml">rssUpdates</category> 		<skipHours>			<hour>0</hour>			<hour>1</hour>			<hour>2</hour>			<hour>3</hour>			<hour>4</hour>			<hour>18</hour>			<hour>23</hour>			<hour>9</hour>			</skipHours>		<cloud domain="radio.xmlstoragesystem.com" port="80" path="/RPC2" registerProcedure="xmlStorageSystem.rssPleaseNotify" protocol="xml-rpc"/>		<ttl>60</ttl>		<item>			<title>Go to new blog</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2005/02/27.html#a107</link>			<description>&lt;meta http-equiv=&quot;refresh&quot; content=&quot;10;http://desperatepundit.com/blog/&quot;&gt;This blog is going bye-bye. Head on over to &lt;a href=&quot;http://desperatepundit.com/&quot;&gt;desperatepundit.com&lt;/a&gt;and check out the new digs.  This page should auto-redirect youwithin 10 seconds or so. If not, click on the link in the previoussentence.&lt;br&gt;&lt;br&gt;Don&apos;t read too much into the new name. I just like the word &quot;pundit,&quot;that&apos;s all. Th new blog will continue to focus on OpenDarwin relatedthings with an occasional look at other things.&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2005/02/27.html#a107</guid>			<pubDate>Sun, 27 Feb 2005 19:57:14 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=107&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2005%2F02%2F27.html%23a107</comments>			</item>		<item>			<title>Working FLAC QT Component!</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/10/02.html#a98</link>			<description>For all of you waiting to see a FLAC QT component, I need to apologize for my absence. My day job has taken up all my time.&lt;br&gt;&lt;br&gt;However, someone else has made some great progress. I urge you to visit &lt;a href=&quot;http://damien.drix.free.fr/qtflac/&quot;&gt;this page&lt;/a&gt; and take a look at the work that programmer has done. Yep, it&apos;s a FLAC QT component, plus he provides the source.&lt;br&gt;&lt;br&gt;I think my project will morph into translating this working plugin into CoreAudio.&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/10/02.html#a98</guid>			<pubDate>Sat, 02 Oct 2004 21:42:28 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=98&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F10%2F02.html%23a98</comments>			</item>		<item>			<title>This may happen yet!</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/07/05.html#a91</link>			<description>Learned a few things at WWDC that have re-inspired me to work on thisproject. Ping me if I haven&apos;t posted an update by July 31, 2004.&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/07/05.html#a91</guid>			<pubDate>Mon, 05 Jul 2004 17:25:31 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=91&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F07%2F05.html%23a91</comments>			</item>		<item>			<title>See ya!</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/06/26.html#a88</link>			<description>Off to WWDC today. Plane leaves at 5:30PM from O&apos;Hare and gets me to SF around 8:30PM or so.&lt;br&gt;&lt;br&gt;Watch this space during the week for some darwin-related blogging goodness.&lt;br&gt;&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/06/26.html#a88</guid>			<pubDate>Sat, 26 Jun 2004 14:09:14 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=88&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F06%2F26.html%23a88</comments>			</item>		<item>			<title>FLAC QT Component project: Coma!</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/05/24.html#a84</link>			<description>In case anyone has subscribed to the RSS feed for the FLAC QT Component, I&apos;m posting this message for you.&lt;br&gt;&lt;br&gt;This project isn&apos;t dead, but it&apos;s definitely in a coma. I don&apos;t intendto do any work on it until after WWDC this year (end of June 2004). I&apos;mhoping to learn a few things about the future of QuickTime and creatingcomponents for it.&lt;br&gt;&lt;br&gt;The &lt;span style=&quot;font-style: italic;&quot;&gt;old&lt;/span&gt; way of doing QTcomponents is kind of ugly, and if it&apos;s going to change soon then Idon&apos;t want to waste the time learning the old frameworks. Sorry if youwere counting on this showing up sometime soon.&lt;br&gt;&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/05/24.html#a84</guid>			<pubDate>Tue, 25 May 2004 00:41:23 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=84&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F05%2F24.html%23a84</comments>			</item>		<item>			<title>Lossless AAC?</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/04/28.html#a80</link>			<description>Now that Apple has released iTunes 4.5, we see that it includes a &lt;a href=&quot;http://www.apple.com/itunes/import.html&quot;&gt;losslessencoder&lt;/a&gt;.  My desire to create and finish a FLAC QTComponent is shrinking...&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/04/28.html#a80</guid>			<pubDate>Wed, 28 Apr 2004 12:54:53 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=80&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F04%2F28.html%23a80</comments>			</item>		<item>			<title>Here I am.</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/04/01.html#a75</link>			<description>Still alive. Sorry for being quiet lately, but work has been particularly onerous as of late. Hope to do some updates soon.&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/04/01.html#a75</guid>			<pubDate>Fri, 02 Apr 2004 04:09:04 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=75&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F04%2F01.html%23a75</comments>			</item>		<item>			<title>Sorry!</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/03/01.html#a70</link>			<description>I apologize if you&apos;ve subscribed to this RSS feed and I haven&apos;t postedany new progress in a while. I&apos;ve been off working on some importantstuff for the next OpenDarwin release and didn&apos;t focus on this project.&lt;br&gt;&lt;br&gt;I&apos;ll try and post some updates later this week!&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/03/01.html#a70</guid>			<pubDate>Tue, 02 Mar 2004 04:29:53 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=70&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F03%2F01.html%23a70</comments>			</item>		<item>			<title>Need a break from this project...</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/16.html#a26</link>			<description>Oh, my head is throbbing. I&apos;ve been banging it against the QT wall forthe past two days. I&apos;ll be taking a break from this project today towork on my &lt;a href=&quot;http://radio.weblogs.com/0134505/categories/opendarwin/&quot;&gt;otherproject&lt;/a&gt;.&lt;br&gt;&lt;br&gt;Here&apos;s an excerpt from a thread on the quicktime-api list. I&apos;m havingtrouble getting the component to match by filename extension. This isnecessary since FLAC files won&apos;t contain any regular QT data as theyget shuffled around from platform to platform. The only way to tell itis FLAC would be if it is called &quot;some_audio_file.flac&quot;. But QT isn&apos;tbeing very cooperative and it&apos;s pissing me off. &lt;br&gt;&lt;br&gt;--- start message ---&lt;br&gt;    From:       &lt;a href=&quot;mailto:cremes@mac.com&quot;&gt;cremes@mac.com&lt;/a&gt;&lt;br&gt;    Subject:     Re: QT Movie Import, filename matching&lt;br&gt;    Date:     February 16, 2004 11:02:47 AM CST&lt;br&gt;    To:       &lt;a href=&quot;mailto:quicktime-api@lists.apple.com&quot;&gt;quicktime-api@lists.apple.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;On Feb 15, 2004, at 9:42 PM, chuck remes wrote:&lt;br&gt;&lt;br&gt;&amp;gt;On Feb 15, 2004, at 5:50 PM, Steve Nicolai wrote:&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;QuickTime uses the thng and thga resources to find theimporters.  The component type must be &apos;eat &apos;.  The componentsubtype is&lt;br&gt;&amp;gt;&amp;gt; a finder file type if the component flagmovieImportSubTypeIsFileExtension is not set, or an uppercase versionof the file&lt;br&gt;&amp;gt;&amp;gt; extension if movieImportSubTypeIsFileExtension is set.&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;If you have both a file type and an extension that you want tosupport, you need two components, generally a thng and a thga.&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;Speculating on what QuickTime does internally, if it is given a file type, it will first search for a component:&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;type         &apos;eat &apos;&lt;br&gt;&amp;gt;&amp;gt;subtype      &lt;finder file=&quot;&quot; type=&quot;&quot; given=&quot;&quot;&gt;&lt;br&gt;&amp;gt;&amp;gt;manufacturer 0&lt;br&gt;&amp;gt;&amp;gt;flags        0&lt;br&gt;&amp;gt;&amp;gt;flagsMask    movieImportSubTypeIsFileExtension&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;If it doesn&apos;t find a component or a file type is not given, itthen looks for an extension on the file.  If it finds one, it thensearches&lt;br&gt;&amp;gt;&amp;gt; for:&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;type         &apos;eat &apos;&lt;br&gt;&amp;gt;&amp;gt;subtype      &lt;uppercase ,=&quot;&quot; space=&quot;&quot; filled=&quot;&quot; file=&quot;&quot; extension=&quot;&quot;&gt;&lt;br&gt;&amp;gt;&amp;gt;manufacturer 0&lt;br&gt;&amp;gt;&amp;gt;flags        movieImportSubTypeIsFileExtension&lt;br&gt;&amp;gt;&amp;gt;flagsMask    movieImportSubTypeIsFileExtension&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt;&amp;gt;The mcfg resource isn&apos;t used by QuickTime to findcomponents.  I think it&apos;s used to register with Windows thatQuickTime&lt;br&gt;&amp;gt;&amp;gt; supports these file types.&lt;br&gt;&amp;gt;&amp;gt;&lt;br&gt;&amp;gt; I&apos;ve double-checked all of this and it appears just as yououtlined. I&apos;m now concerned that the reason it isn&apos;t working is due to&lt;br&gt;&amp;gt; some incorrect setting within the XCode project itself. I createdthe project from scratch and added files to it rather than cloning&lt;br&gt;&amp;gt; the ElectricImage project and replacing the files.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;I&apos;d like to put a breakpoint in the code where QT interfaces tothis component. Is there a recommended way of doing this? I&apos;ve read&lt;br&gt;&amp;gt; all the archived messages on this list and coreaudio-api for usinggdb with QT components, but none of them spelled out how to&lt;br&gt;&amp;gt; trap entry into the component. In other words, I&apos;m not 100%certain this component is executing when the open file dialog comes&lt;br&gt;&amp;gt; up.&lt;br&gt;&lt;br&gt;The experiment continues. I &quot;cloned&quot; the ElectricImage sample and addedmy files to it. After building, still no joy on matching by filename.At least I eliminated the possibility that it is related to my XCodeproject settings.&lt;br&gt;&lt;br&gt;My next thought was to start changing things in the originalElectricImage sample until I broke the filename match. Imagine mysurprise when it broke after I modified the EI_GraphicsImport.rresource file. This resource file contains a &apos;thng&apos; and &apos;thga&apos; resourceof type &apos;grip&apos; just like the EI_MovieImport.r resource file containsone of type &apos;eat &apos;. However, the &apos;grip&apos; resource seems to be the onecontrolling whether or not the OpenFile dialog box matches on thefilename. If I remove this file from the project and compile theproject with the MovieImporter providing the only &apos;thng&apos; and &apos;thga&apos;resources of type &apos;eat &apos;, it will NOT match on filename. Adding it backin gets the match to work again.&lt;br&gt;&lt;br&gt;I tried flipping the resource IDs so the MovieImport &apos;eat &apos; resource had a lower ID, but it didn&apos;t help.&lt;br&gt;&lt;br&gt;So what I&apos;ve learned from this is that I can&apos;t match by filenamewithout a &apos;thng&apos; and &apos;thga&apos; resource that registers itself as type&apos;grip&apos;. Having a properly configured &apos;thng&apos; and &apos;thga&apos; of type &apos;eat &apos;is insufficient for mapping by filename.&lt;br&gt;&lt;br&gt;I am well and truly stuck. I&apos;m trying to create an audio component, sothe concept of a &apos;grip&apos; component doesn&apos;t fit at all. Help?&lt;br&gt;&lt;br&gt;cr&lt;br&gt;_______________________________________________&lt;br&gt;quicktime-api mailing list | &lt;a href=&quot;mailto:quicktime-api@lists.apple.com&quot;&gt;quicktime-api@lists.apple.com&lt;/a&gt;&lt;br&gt;Help/Unsubscribe/Archives: &lt;a href=&quot;http://www.lists.apple.com/mailman/listinfo/quicktime-api&quot;&gt;http://www.lists.apple.com/mailman/listinfo/quicktime-api&lt;/a&gt;&lt;br&gt;Do not post admin requests to the list. They will be ignored.&lt;br&gt;&lt;br&gt;--- end message ----&lt;br&gt;&lt;/uppercase&gt;&lt;/finder&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/16.html#a26</guid>			<pubDate>Mon, 16 Feb 2004 17:31:12 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=26&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F16.html%23a26</comments>			</item>		<item>			<title>Debugging Pro In Just One Day?</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/15.html#a25</link>			<description>Wow, I love learning from other people&apos;s experience. I did a search onthe coreaudio-api list for some similar keywords (&quot;debug gdb&quot;) andfound &lt;a href=&quot;http://lists.apple.com/archives/coreaudio-api/2002/Oct/22/rekindofnewbiequestion.txt&quot;&gt;thispost on using the graphical gdb&lt;/a&gt; for debugging a QT component.&lt;br&gt;&lt;br&gt;Here&apos;s the shorthand version:&lt;br&gt;&lt;br&gt;Go to your PB/XCode project window and find your Target list on the left-hand side.&lt;br&gt;Ctrl-click your Target and choose Add-&amp;gt;&quot;New Custom Executable&quot; from the pop-up menu.&lt;br&gt;Set the executable to be the QuickTime Player (find it using the standard file dialogs).&lt;br&gt;&lt;br&gt;Now you can do option-cmd-Y or Debug-&amp;gt;&quot;Debug Executable&quot; to run the code witin the graphical version of gdb. Very nice.&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/15.html#a25</guid>			<pubDate>Sun, 15 Feb 2004 20:51:47 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=25&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F15.html%23a25</comments>			</item>		<item>			<title>Debugger newbie</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/15.html#a24</link>			<description>All of the programming I&apos;ve done in the past 3 or 4 years has beeninside the kernel. (See my &lt;a href=&quot;http://radio.weblogs.com/0134505/categories/OpenDarwin/&quot;&gt;otherproject&lt;/a&gt;.) Programming in the kernel is really tough becauseyou can&apos;t take advantage of any kind of source-level debugger like gdb(unless you have a second machine and can debug over the network).Therefore, my knowledge and experience with debugging userlandapplications is nil. &lt;br&gt;&lt;br&gt;I&apos;ve made some reasonable progress in the last few hours, so I droppedthe newly built QT component into /Library/QuickTime, fired upQuickTime Player and hit cmd-O to open up a new movie. I wanted to seeif my component had registered correctly and I could open a FLAC audiofile. CRASH!  (Just QT Player, not the OS.)&lt;br&gt;&lt;br&gt;So how do I debug this thing? Before asking for help from the wizardson the quicktime-api mailing list, I did a &lt;a href=&quot;http://search.lists.apple.com/quicktime-api&quot;&gt;search of theirarchives&lt;/a&gt; looking for the words &quot;debug breakpoint component&quot;to see what others had done. I didn&apos;t get many helpful hints from theresults with one exception... &lt;a href=&quot;http://lists.apple.com/archives/quicktime-api/2001/Mar/14/osxcomponentcausesquickt.txt&quot;&gt;thismessage pointed me in the right direction&lt;/a&gt; for catching QTPlayer when it crashes. The &apos;bt&apos; command for printing the backtrace isapparently now called &quot;where&quot; so I executed that command and found itcrashing in doResolveComponentAlias(RegisteredComponent*,CMCombinedResRef*) with an EXC_BAD_ACCESS signal. Some memoryallocation is probably fubar, so I&apos;ll take a peek and see what I cansee.&lt;br&gt;&lt;br&gt;Anyone have a good reference for gdb and how to use it?&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/15.html#a24</guid>			<pubDate>Sun, 15 Feb 2004 20:12:43 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=24&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F15.html%23a24</comments>			</item>		<item>			<title>Movie Importers again</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/15.html#a23</link>			<description>I found an important new link for people to take a peek at. On theApple site they discuss &lt;a href=&quot;http://developer.apple.com/documentation/QuickTime/RM/ImportExport/DataExchange/index.html&quot;&gt;movieimport and export data exchange components&lt;/a&gt; which are anecessary evil when using QT. For QT to recognize a file, that filemust already be a QT file or there must be a component registered withQT that knows how to recognize and translate that file format into thenative QT format. The data exchange components take care of thatfunction within QT. The aforementioned link is so important, it now hasa place of honor on the left side navigation bar for quicker reference.&lt;br&gt;&lt;br&gt;Back in the old OS9 days (and before), the component would register atype and creator code with QT. With OSX there is far less reliance ontype/creator codes. The emphasis has shifted to filename extensions(like .txt for a text file, for example). The Ogg Vorbis componentcontains a Movie Importer (data exchange component) that registers the.ogg filename extension. This tells QT who to pass the file off to whenopening it up. The Ogg Vorbis component translates the .ogg file intothe desired QT format for playing. This conversion is done &quot;in place&quot;without overwriting the original file.&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/15.html#a23</guid>			<pubDate>Sun, 15 Feb 2004 18:33:39 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=23&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F15.html%23a23</comments>			</item>		<item>			<title>ProjectBuilder and XCode configuration</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/14.html#a22</link>			<description>When configuring the project and trying to get it to compilesuccessfully, I ran into some problems with the *.r files (resourcefiles). There is apparently a known bug (or feature) withProjectBuilder and XCode that makes it necessary to do clean builds allthe time when you have .r files in your project.&lt;br&gt;&lt;br&gt;One of the annoying things about these files is you can&apos;t reallyspecify the order in which they are &quot;Rez-ed&quot; by the Rez application. Itlooks like the Apple ElectricImage sample got around this by declaringa master .r file that #incluedes the other files in the order theylike. To get this to work, after adding all the .r files to theproject, you need to go in and uncheck all of the .r files except forthis master one. If you don&apos;t do this, then PB/XCode just Rez them inwhatever order they want which (in this case) results in a lot oferrors about undefined variables.&lt;br&gt;&lt;br&gt;Here&apos;s the example master .r file:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;a href=&quot;//&quot;&gt;//&lt;/a&gt; Building PB Mac OS X Mach-O Component&lt;br&gt;#define TARGET_REZ_MAC_68K 0&lt;br&gt;#define TARGET_REZ_MAC_PPC 0&lt;br&gt;#define TARGET_REZ_CARBON_CFM 0&lt;br&gt;#define TARGET_REZ_CARBON_MACHO 1&lt;br&gt;#define TARGET_REZ_WIN32 0&lt;br&gt;&lt;br&gt;#include &quot;MovieImport.r&quot;&lt;br&gt;&lt;a href=&quot;//#include&quot;&gt;//#include&lt;/a&gt; &quot;MovieExport.r&quot;&lt;br&gt;#include &quot;Codec.r&quot;&lt;/pre&gt;&lt;br&gt;This example shows the definition of various TARGET variables that areused by the children .r files. This is the only file &quot;checked&quot; andavailable for compilation by the IDE.&lt;br&gt;&lt;br&gt;If this isn&apos;t clear and someone wants a better explanation, mail me.&lt;br&gt;</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/14.html#a22</guid>			<pubDate>Sat, 14 Feb 2004 23:23:27 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=22&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F14.html%23a22</comments>			</item>		<item>			<title>Can&apos;t stop me now</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/12.html#a19</link>			<description>I started putting the XCode project together tonight, modeling it from the &lt;a href=&quot;http://developer.apple.com/samplecode/Sample_Code/QuickTime/Importers_and_Exporters/ElectricImageComponent.htm&quot;&gt;ElectricImage sample from Apple&lt;/a&gt;.&lt;br&gt;&lt;br&gt;Setting up the project is kind of tricky since there isn&apos;t any &lt;i&gt;clear&lt;/i&gt; documentation. There are also several methods allowed that will result in the correct component package. According to &lt;a href=&quot;http://developer.apple.com/technotes/tn/tn2012.html&quot;&gt;TN2012&lt;/a&gt;you can do it as a Carbon Bundle or as a Dynamic Library. It looked oddto me, so I just created an Empty Project and then added a New Targetand chose the Legacy Bundle type. I don&apos;t know if this is correct, butit looks good so far. &lt;br&gt;&lt;br&gt;First thing I did was go in and click onthe target to edit its settings. I changed the &quot;wrapper extension&quot; frombundle to component. &lt;br&gt;&lt;br&gt;Next I created a Frameworks group withinthe project and added Carbon.framework, CoreServices.framework,CoreAudio.framework and QuickTime.framework. I know I&apos;ll eventuallyneed all of them.&lt;br&gt;&lt;br&gt;Last, I started copying the EI_MovieImport andEI_ImageDecompressor directories from the ElectricImage sample. I alsocopied the ImportExampleLinkedMachO.r file into my project directory.I&apos;ll rename these files and start editing them to use a new name likeFLAC_Codec. Better yet, I&apos;ll call it codec_skeleton for the next step.&lt;br&gt;&lt;br&gt;WhatI think I&apos;ll do now is create the bare bones necessary to do asuccessful MovieImport and call out to the Codec. When it compiles fineand shows up in QuickTime successfully then I&apos;ll know it workedcorrectly. I&apos;ll save it off and start again with FLAC_Codec as myproject. That way if someone else wants to get started on building anew QT Component they won&apos;t have to go through all the extra effort andcan start off with a skeleton component framework.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/12.html#a19</guid>			<pubDate>Fri, 13 Feb 2004 04:27:53 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=19&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F12.html%23a19</comments>			</item>		<item>			<title>On the road again</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/12.html#a18</link>			<description>Got an email from the great Steve Nicolai, author of the OggVorbis QTcomponent. He answered the question(s) I posed yesterday and has set meon the right track.&lt;br&gt;&lt;br&gt;In summary, the sequence of developmentshould be:1. Create a basic Movie Importer. This should be capable of reading inthe FLAC file based on either filetype or filename extension. Uponsuccessful import, QT should display the correct format name, timesequence, etc.&lt;br&gt;&lt;br&gt;2.Write the decompressor that corresponds to the format specified by theMovieImporter. This allows QT to hand-off the imported file to thecorrect codec for the next step in processing.&lt;br&gt;&lt;br&gt;There&apos;s more detail than that, but I&apos;m pressed for time so I&apos;ll add that detail in a separate post later.&lt;br&gt;&lt;br&gt;I&apos;m a bit disappointed that I need to write an importer first, but at least this whole system is starting to make sense to me.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/12.html#a18</guid>			<pubDate>Thu, 12 Feb 2004 13:16:05 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=18&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F12.html%23a18</comments>			</item>		<item>			<title>How does the system match up the right decompressor component?</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/11.html#a17</link>			<description>Going through the AudioCodec sample code has confused me on a prettybasic point. How does the system know to match up a particular audiostream with a particular codec? The AudioCodec classes have no facilityfor reading/writing files, nor do I see any &quot;probe&quot; (like in I/OKit)where a codec can test a stream and decide if it matches or not.&lt;br&gt;&lt;br&gt;Fora hint, I looked at the OggVorbis QT component source. Even though itis based on the Carbon Sound Manager, there&apos;s a LOT of similaritybetween it and the CoreAudio stuff. Anyway, near as I can tell the onlyway the system knows that a file should be handed off to the OggVorbiscomponent is via the filename extension (.ogg). If you remove &quot;.ogg&quot;from a filename, you can&apos;t play it from QT, import it into QT, previewit from the Finder, or drag-n-drop it into iTunes. That&apos;s because the.ogg extension is defined as part of the QT Importer/Exporterinterface. Do I &lt;b&gt;&lt;i&gt;really&lt;/i&gt;&lt;/b&gt; need to write those too just to test?&lt;br&gt;&lt;br&gt;Any hints on how to proceed would be appreciated.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/11.html#a17</guid>			<pubDate>Thu, 12 Feb 2004 04:20:02 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=17&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F11.html%23a17</comments>			</item>		<item>			<title>Inch by inch...</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a16</link>			<description>Final post for the night.&lt;br&gt;&lt;br&gt;I finished slogging through theACAppleIMA4Codec and ACAppleIMA4Decoder classes. It&apos;s neat how C++classes build upon themselves and use inherited functionality, buttracing execution through the subclasses and parent classes can bedifficult.&lt;br&gt;&lt;br&gt;Enough grousing... I think I get it. I&apos;m looking atthe decoder first because an obvious Day One target is being able todecode the FLAC stream and output linear PCM. &lt;br&gt;&lt;br&gt;Here&apos;s what Idon&apos;t get. How does QuickTime know how to play an audio format ithasn&apos;t seen before? If I drop in a fully functional FLAC decoder into/Library/QuickTime, QT would have the ability to decode the stream databut would QT be aware of this? How?&lt;br&gt;&lt;br&gt;From the old ComponentManager I can see how an application can seek to match itself up with acodec (by passing in a componentType, componentSubType, &lt;a href=&quot;http://developer.apple.com/documentation/Carbon/Reference/Component_Manager/component_mgr_ref/function_group_7.html&quot;&gt;etc., etc.&lt;/a&gt;)but what about the MoviePlayer application. How can it open andrecognize enough information from the file to match up with the rightcodec?&lt;br&gt;&lt;br&gt;I don&apos;t even know where to look to find these answers.I&apos;ll probably ask on quicktime-api, but I&apos;d appreciate any pointers inthe comments section or via email to me.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a16</guid>			<pubDate>Wed, 11 Feb 2004 05:00:06 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=16&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F10.html%23a16</comments>			</item>		<item>			<title>Coding Style - variable naming</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a15</link>			<description>Minor but important style note regarding the Apple example source.&lt;br&gt;&lt;br&gt;Anymethod variable that is named &quot;in&quot; (such as &quot;inPropertyID&quot;) indicatesthat this variable is being passed in to the method for some operation.&lt;br&gt;&lt;br&gt;Anymethod variable named &quot;out&quot; (such as &quot;outWritable&quot;) indicates that thisvariables value will be returned to the caller and used in some fashion.&lt;br&gt;&lt;br&gt;[edit]Any method variable named &quot;io&quot; (such as &quot;ioPropertyDataSize&quot;) indicatesthat the caller is passing in a value for the method to use and themethod may pass back a changed value to the caller.&lt;br&gt;&lt;br&gt;Makes the code easier to read and understand.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a15</guid>			<pubDate>Wed, 11 Feb 2004 04:12:59 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=15&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F10.html%23a15</comments>			</item>		<item>			<title>First Ah-ha Moment</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a14</link>			<description>Looking through the ACCodec, ACBaseCodec and ACSimpleCodec classes I noticed that several things looked eerily similar to the old Sound Manager stuff. When I got to the file ACCodecDispatch.h I had an &quot;ah ha&quot; moment.The template class defined in that file now takes the place of all that screwy C preprocessor bullshit from the old Carbon Sound Manager. In the old Sound Manager, there would be a file in your project that had contents like:&lt;pre&gt;	ComponentSelectorOffset (6)		ComponentRangeCount (2)	ComponentRangeShift (7)	ComponentRangeMask	(7F)		ComponentRangeBegin (0)		ComponentError (Target)		ComponentError (Register)		StdComponentCall (Version)		StdComponentCall (CanDo)		StdComponentCall (Close)		StdComponentCall (Open)	ComponentRangeEnd (0)&lt;/pre&gt;This tied in to some *really* ugly stuff in the background. To call your FooCodec&apos;s Register function it would have to concatenate your codec name (&quot;FooCodec&quot;) to a function basename (like &quot;Register&quot;) and include the parameters along with any commas to separate those parameters. The whole mess would look like:&lt;pre&gt;#define CALLCOMPONENT_BASENAME() FooCodec#ifdef CALLCOMPONENT_BASENAME	#ifndef CALLCOMPONENT_GLOBALS		#define CALLCOMPONENT_GLOBALS() 		#define ADD_CALLCOMPONENT_COMMA 	#else		#define ADD_CALLCOMPONENT_COMMA ,	#endif	#define CALLCOMPONENT_GLUE(a,b) a##b	#define CALLCOMPONENT_STRCAT(a,b) CALLCOMPONENT_GLUE(a,b)	#define ADD_CALLCOMPONENT_BASENAME(name) CALLCOMPONENT_STRCAT(CALLCOMPONENT_BASENAME(),name)	EXTERN_API( ComponentResult  ) ADD_CALLCOMPONENT_BASENAME(Open) 		(CALLCOMPONENT_GLOBALS() ADD_CALLCOMPONENT_COMMA ComponentInstance  self);#endif	/* CALLCOMPONENT_BASENAME */&lt;/pre&gt;The system would use it to piece together your FooCodecOpen(FooCodecGlobalsPtr globals, ComponentInstance self) function name.All of that nonsense is now replaced by (edited for length):&lt;pre&gt;template &amp;lt;class CodecClass&amp;gt;ComponentResult ACCodecDispatch(ComponentParameters* inParameters, CodecClass* inThis){	ComponentResult	theError = kAudioCodecNoError;		try	{		switch (inParameters-&amp;gt;what)		{			&lt;a href=&quot;//&quot;&gt;//&lt;/a&gt;	these selectors don&apos;t use the object pointer						case kComponentOpenSelect:				{					CodecClass*	theCodec = new CodecClass();					SetComponentInstanceStorage(((AudioCodecOpenGluePB*)inParameters)-&amp;gt;inCodec, (Handle)theCodec);				}				break;		};	}	catch(ComponentResult inErrorCode)	{		theError = inErrorCode;	}	catch(...)	{		theError = kAudioCodecUnspecifiedError;	}		return theError;}&lt;/pre&gt;Much cleaner in my view. It uses the power of templates to sub in the correct names and dispatch the component function call to the appropriate class method. Ultimately both things perform the same function, but one way requires you to chase through multiple files to figure out what is going on while the other way just prints the code in a nice, clean manner. I never thought I&apos;d say this, but the C++ way is the &quot;right&quot; way to do this.Nice job, CoreAudio guys!</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a14</guid>			<pubDate>Wed, 11 Feb 2004 03:40:55 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=14</comments>			</item>		<item>			<title>When are you going to start coding?</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a13</link>			<description>To all of you wondering when I&apos;ll start coding, the answer is simple: when I understand what the hell I&apos;m doing. I need to ask some questions, study some code, ask some more questions, study the code again, do some judicious copy &amp; paste, test, crash my IDE, ask some more questions, etc. The code will come.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a13</guid>			<pubDate>Wed, 11 Feb 2004 02:18:35 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=13</comments>			</item>		<item>			<title>Glossary of terms</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a12</link>			<description>Back on the 9th I asked a question about definitions on audio concepts like sample, frame, etc.  One of my reasons for doing so is that depending on the codec I look at, each one appears to use different words to describe the same concept. What I really needed was to figure out what Apple means by these words. That&apos;s the environment I&apos;m in, so it&apos;s the one I need to &lt;i&gt;grok&lt;/i&gt;. Googling around I found &lt;a href=&quot;http://developer.apple.com/documentation/mac/pdf/Sound/Sound_Glossary.pdf&quot;&gt;this PDF on the Apple developer site&lt;/a&gt;. It&apos;s a glossary of audio terms and what they mean in the Apple environment. Very useful!I can use that glossary to translate between Apple and (in this case) FLAC. For example, in the Apple world the term for a unit of uncompressed audio data (one or more samples) is &quot;frame.&quot; In FLAC the same concept is &quot;block.&quot;Similarly, Apple says calls one or more compressed samples a &quot;packet.&quot; In FLAC they call this a &quot;frame.&quot; See how they reuse the terms? &lt;a href=&quot;http://flac.sourceforge.net/format.html&quot;&gt;The format documentation page&lt;/a&gt; at the FLAC home page uses these alternate definitions.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a12</guid>			<pubDate>Wed, 11 Feb 2004 02:10:42 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=12</comments>			</item>		<item>			<title>Looking at the examples...</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a11</link>			<description>I&apos;ve also started taking a look at the CoreAudio examples that shipped with Panther and XCode. The example at /Developer/Examples/CoreAudio/AudioCodecs shows how to create a codec (compressor/decompressor). Even better, it shows how to wrap it all up in an interface that the Carbon Sound Manager can use.Apparently QuickTime hasn&apos;t been revved yet to directly interface to CoreAudio, so any codecs created in CA aren&apos;t visible to QT. To remedy this, the wizards at Apple generated SMAC (I think this stands for Sound Manager Audio Codec). SMAC makes the CA codec appear to be a Sound Manager codec so that QT can see it and use it. Nice.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/10.html#a11</guid>			<pubDate>Tue, 10 Feb 2004 06:01:25 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=11</comments>			</item>		<item>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/09.html#a10</link>			<description>All the documentation I&apos;m reading on FLAC, OggVorbis, MP3 or any other codec uses lots of jargon that I&apos;m not familiar with. What&apos;s a sample? What&apos;s a sample rate? What do they mean by frame and what does it contain?I found a pretty decent website that lists lots of definitions. Take a look at it &lt;a href=&quot;http://www.atis.org/tg2k/t1g2k.html&quot;&gt;here&lt;/a&gt;. It&apos;s mostly for telco stuff, but their business is audio so the definitions are probably right on.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/09.html#a10</guid>			<pubDate>Tue, 10 Feb 2004 05:56:49 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=10</comments>			</item>		<item>			<title>RSS Feed</title>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/08.html#a9</link>			<description>I highly recommend that readers do NOT subscribe to this RSS feed yet. There&apos;s a problem that I&apos;m trying to work through.Also, give me a week to shake this thing down. There might be lots of sidebar link changes and test posts made. No sense in clogging your newsreader with test messages.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/08.html#a9</guid>			<pubDate>Mon, 09 Feb 2004 00:02:47 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=9&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0134505%2F2004%2F02%2F08.html%23a9</comments>			</item>		<item>			<link>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/08.html#a4</link>			<description>This blog is brand new. Follow along as I learn CoreAudio, QuickTime, some old Carbon Sound Manager stuff, and FLAC. The point is to create a FLAC QuickTime component so that there is system-wide support for this lossless audio compression format.Read &lt;a href=&quot;/0134505/categories/CoreAudio/stories/whatIsThisCoreAudioBlogAbo.html&quot;&gt;this summary for some other details.&lt;/a&gt;Lately there appears to be several people working on this or about to work on this. More power to them.</description>			<guid>http://radio.weblogs.com/0134505/categories/CoreAudio/2004/02/08.html#a4</guid>			<pubDate>Sun, 08 Feb 2004 17:35:57 GMT</pubDate>			<comments>http://radiocomments2.userland.com/comments?u=134505&amp;amp;p=4</comments>			</item>		</channel>	</rss>