<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using RemoteIO audio unit</title>
	<atom:link href="http://atastypixel.com/blog/using-remoteio-audio-unit/feed/" rel="self" type="application/rss+xml" />
	<link>http://atastypixel.com/blog/using-remoteio-audio-unit/</link>
	<description></description>
	<lastBuildDate>Wed, 08 Feb 2012 23:30:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Michael Tyson</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-5/#comment-3789</link>
		<dc:creator>Michael Tyson</dc:creator>
		<pubDate>Sun, 08 Jan 2012 12:02:17 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3789</guid>
		<description>&lt;p&gt;Hi, Michael - it sounds like another tutorial might be in order. Please stay tuned, I&#039;ll put one together over the next week or two and post it on the blog.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, Michael &#8211; it sounds like another tutorial might be in order. Please stay tuned, I&#8217;ll put one together over the next week or two and post it on the blog.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-5/#comment-3770</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 01 Jan 2012 15:50:45 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3770</guid>
		<description>&lt;p&gt;Hi Michael.&lt;/p&gt;

&lt;p&gt;after i have put together all this code , how would i get the actual audio data ?
where exactly does it saved ?&lt;/p&gt;

&lt;p&gt;and when all this code is done ? i have to put it all into 1 method and then call it ?
or should i only call -start method ?&lt;/p&gt;

&lt;p&gt;what operation should be taken to get the real time data ?&lt;/p&gt;

&lt;p&gt;i have spent days to understand it but i couldnt .
how exactly i&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Michael.</p>

<p>after i have put together all this code , how would i get the actual audio data ?
where exactly does it saved ?</p>

<p>and when all this code is done ? i have to put it all into 1 method and then call it ?
or should i only call -start method ?</p>

<p>what operation should be taken to get the real time data ?</p>

<p>i have spent days to understand it but i couldnt .
how exactly i</p>]]></content:encoded>
	</item>
	<item>
		<title>By: ivan</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-5/#comment-3752</link>
		<dc:creator>ivan</dc:creator>
		<pubDate>Thu, 22 Dec 2011 09:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3752</guid>
		<description>&lt;p&gt;Hi Michael,
       I tried to play 8000-rate ,and kinda fail.&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;&lt;code&gt;audioFormat.mSampleRate         = 8000.0;
audioFormat.mFormatID           = kAudioFormatLinearPCM;
audioFormat.mFormatFlags        = kAudioFormatFlagIsSignedInteger &#124; kAudioFormatFlagIsPacked;
audioFormat.mFramesPerPacket    = 1;
audioFormat.mChannelsPerFrame   = 1;
audioFormat.mBitsPerChannel     = 16;
audioFormat.mBytesPerPacket     = 2;
audioFormat.mBytesPerFrame      = 2;
audioFormat.mReserved           = 0;
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;actually I wanted to play amr file .So I use decoder .It worked,but very noisy and abnormal.&lt;/p&gt;

&lt;p&gt;static OSStatus playbackCallback(void *inRefCon, 
                                 AudioUnitRenderActionFlags *ioActionFlags, 
                                 const AudioTimeStamp *inTimeStamp, 
                                 UInt32 inBusNumber, 
                                 UInt32 inNumberFrames, 
                                 AudioBufferList *ioData) {
    //loop through all the buffers that need to be filled
    for (int i = 0 ; i &lt; ioData-&gt;mNumberBuffers; i++){
        AudioBuffer buffer = ioData-&gt;mBuffers[i];
        UInt32 *frameBuffer = buffer.mData;
        AmrDecode(frameBuffer);
    }
    return noErr;
}&lt;/p&gt;

&lt;p&gt;I really need some help&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Michael,
       I tried to play 8000-rate ,and kinda fail.</p>

<p><pre><code>audioFormat.mSampleRate         = 8000.0;
audioFormat.mFormatID           = kAudioFormatLinearPCM;
audioFormat.mFormatFlags        = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
audioFormat.mFramesPerPacket    = 1;
audioFormat.mChannelsPerFrame   = 1;
audioFormat.mBitsPerChannel     = 16;
audioFormat.mBytesPerPacket     = 2;
audioFormat.mBytesPerFrame      = 2;
audioFormat.mReserved           = 0;
</code></pre></p>

<p>actually I wanted to play amr file .So I use decoder .It worked,but very noisy and abnormal.</p>

<p>static OSStatus playbackCallback(void *inRefCon, 
                                 AudioUnitRenderActionFlags *ioActionFlags, 
                                 const AudioTimeStamp *inTimeStamp, 
                                 UInt32 inBusNumber, 
                                 UInt32 inNumberFrames, 
                                 AudioBufferList *ioData) {
    //loop through all the buffers that need to be filled
    for (int i = 0 ; i &lt; ioData-&gt;mNumberBuffers; i++){
        AudioBuffer buffer = ioData-&gt;mBuffers[i];
        UInt32 *frameBuffer = buffer.mData;
        AmrDecode(frameBuffer);
    }
    return noErr;
}</p>

<p>I really need some help</p>]]></content:encoded>
	</item>
	<item>
		<title>By: ivan</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-5/#comment-3751</link>
		<dc:creator>ivan</dc:creator>
		<pubDate>Thu, 22 Dec 2011 09:12:13 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3751</guid>
		<description>&lt;p&gt;actually I wanted to play amr file .So I use decoder .It worked,but very noisy and abnormal.&lt;/p&gt;

&lt;p&gt;static OSStatus playbackCallback(void *inRefCon, 
                                 AudioUnitRenderActionFlags *ioActionFlags, 
                                 const AudioTimeStamp *inTimeStamp, 
                                 UInt32 inBusNumber, 
                                 UInt32 inNumberFrames, 
                                 AudioBufferList *ioData) {
    //loop through all the buffers that need to be filled
    for (int i = 0 ; i &lt; ioData-&gt;mNumberBuffers; i++){
        AudioBuffer buffer = ioData-&gt;mBuffers[i];
        UInt32 *frameBuffer = buffer.mData;
        AmrDecode(frameBuffer);
    }
    return noErr;
}&lt;/p&gt;

&lt;p&gt;I really need some help&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>actually I wanted to play amr file .So I use decoder .It worked,but very noisy and abnormal.</p>

<p>static OSStatus playbackCallback(void *inRefCon, 
                                 AudioUnitRenderActionFlags *ioActionFlags, 
                                 const AudioTimeStamp *inTimeStamp, 
                                 UInt32 inBusNumber, 
                                 UInt32 inNumberFrames, 
                                 AudioBufferList *ioData) {
    //loop through all the buffers that need to be filled
    for (int i = 0 ; i &lt; ioData-&gt;mNumberBuffers; i++){
        AudioBuffer buffer = ioData-&gt;mBuffers[i];
        UInt32 *frameBuffer = buffer.mData;
        AmrDecode(frameBuffer);
    }
    return noErr;
}</p>

<p>I really need some help</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Tyson</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-5/#comment-3726</link>
		<dc:creator>Michael Tyson</dc:creator>
		<pubDate>Fri, 09 Dec 2011 14:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3726</guid>
		<description>&lt;p&gt;Honestly I&#039;m surprised it works at all - I suggest you use an audio converter, and use PCM audio for the audio unit.&lt;/p&gt;

&lt;p&gt;In terms of your implementation, firstly, I don&#039;t see any synchronisation going on. That code will run on a separate thread, which means you&#039;ll get all sorts of problems unless you&#039;re careful with how you access the data. You should use a ring buffer or something.  If you&#039;re not familiar with multithreading principles, I suggest grabbing a good book or finding a tutorial online, because it&#039;s very, very important to get right. Note, though, that you should avoid holding locks on the high-priority Core Audio thread. A lock-free ring buffer is the best bet. I&#039;ve &lt;a href=&quot;http://atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/&quot; rel=&quot;nofollow&quot;&gt;built one&lt;/a&gt;, or you could grab Kurt Revis&#039; &lt;a href=&quot;http://www.snoize.com/Code/PlayBufferedSoundFile.tar.gz&quot; rel=&quot;nofollow&quot;&gt;VirtualRingBuffer&lt;/a&gt;, which is very, very clever, and I think better than mine.&lt;/p&gt;

&lt;p&gt;Also, you&#039;re doing an awful lot of memory allocation there - you should really avoid any kind of allocation in Core Audio&#039;s realtime thread.&lt;/p&gt;

&lt;p&gt;If you need further help, I suggest posting on the Core Audio API mailing list.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Honestly I&#8217;m surprised it works at all &#8211; I suggest you use an audio converter, and use PCM audio for the audio unit.</p>

<p>In terms of your implementation, firstly, I don&#8217;t see any synchronisation going on. That code will run on a separate thread, which means you&#8217;ll get all sorts of problems unless you&#8217;re careful with how you access the data. You should use a ring buffer or something.  If you&#8217;re not familiar with multithreading principles, I suggest grabbing a good book or finding a tutorial online, because it&#8217;s very, very important to get right. Note, though, that you should avoid holding locks on the high-priority Core Audio thread. A lock-free ring buffer is the best bet. I&#8217;ve <a href="http://atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/" rel="nofollow">built one</a>, or you could grab Kurt Revis&#8217; <a href="http://www.snoize.com/Code/PlayBufferedSoundFile.tar.gz" rel="nofollow">VirtualRingBuffer</a>, which is very, very clever, and I think better than mine.</p>

<p>Also, you&#8217;re doing an awful lot of memory allocation there &#8211; you should really avoid any kind of allocation in Core Audio&#8217;s realtime thread.</p>

<p>If you need further help, I suggest posting on the Core Audio API mailing list.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Rarejai</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-5/#comment-3718</link>
		<dc:creator>Rarejai</dc:creator>
		<pubDate>Thu, 08 Dec 2011 14:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3718</guid>
		<description>&lt;p&gt;Hi Michael - actually I have a hardware device which streaming out u-law audio data. I need to play the audio on iPad. The data size is 1200 bytes per package. I have pass the data (NSData *) to the playback callback function. Here is my callback:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;&lt;code&gt;NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];&lt;/p&gt;

&lt;p&gt;ShowView *viewController = (ShowView *)inRefCon;&lt;/p&gt;

&lt;p&gt;NSData *data = [[NSData alloc] initWithData:viewController-&gt;audioData];&lt;/p&gt;

&lt;p&gt;if ([data length] &gt; 0)
{
    const int channel = 0;
    Float32 *buffer = (Float32 *)ioData-&gt;mBuffers[channel].mData;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Generate the samples
for (UInt32 frame = 0; frame &lt; inNumberFrames; frame++) 
{
    NSData *bytedata = [NSData dataWithBytes:[data bytes] + (frame * 4) length:4];
    unsigned char *fileBytes = (unsigned char *)malloc([bytedata length]);
    [bytedata getBytes:fileBytes];
    buffer[frame] = *(Float32*)(fileBytes);
    free(fileBytes);
}

viewController-&gt;audioData = nil;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;[data release];&lt;/p&gt;

&lt;p&gt;[pool release];&lt;/p&gt;

&lt;p&gt;return noErr;
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;The audio is playing good. Just there are some constant noise from the background. Any suggestion is appreciated. Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Michael &#8211; actually I have a hardware device which streaming out u-law audio data. I need to play the audio on iPad. The data size is 1200 bytes per package. I have pass the data (NSData *) to the playback callback function. Here is my callback:</p>

<p><pre><code>NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];</code></pre></p>

<p>ShowView *viewController = (ShowView *)inRefCon;</p>

<p>NSData *data = [[NSData alloc] initWithData:viewController-&gt;audioData];</p>

<p>if ([data length] &gt; 0)
{
    const int channel = 0;
    Float32 *buffer = (Float32 *)ioData-&gt;mBuffers[channel].mData;</p>

<pre><code>// Generate the samples
for (UInt32 frame = 0; frame &amp;lt; inNumberFrames; frame++) 
{
    NSData *bytedata = [NSData dataWithBytes:[data bytes] + (frame * 4) length:4];
    unsigned char *fileBytes = (unsigned char *)malloc([bytedata length]);
    [bytedata getBytes:fileBytes];
    buffer[frame] = *(Float32*)(fileBytes);
    free(fileBytes);
}

viewController-&amp;gt;audioData = nil;
</code></pre>

<p>}</p>

<p>[data release];</p>

<p>[pool release];</p>

<p>return noErr;
</p>

<p>The audio is playing good. Just there are some constant noise from the background. Any suggestion is appreciated. Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Tyson</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-5/#comment-3717</link>
		<dc:creator>Michael Tyson</dc:creator>
		<pubDate>Thu, 08 Dec 2011 12:12:03 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3717</guid>
		<description>&lt;p&gt;Hey Rarejai - The ULaw format is for &lt;em&gt;storage&lt;/em&gt; only, for use with things like the Audio File Services. Remote IO only works with PCM.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey Rarejai &#8211; The ULaw format is for <em>storage</em> only, for use with things like the Audio File Services. Remote IO only works with PCM.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Rarejai</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-5/#comment-3716</link>
		<dc:creator>Rarejai</dc:creator>
		<pubDate>Wed, 07 Dec 2011 18:28:49 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3716</guid>
		<description>&lt;p&gt;Thanks for the great example. I am getting stuck for the audio playback...my audio format is like this:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;&lt;code&gt;AudioStreamBasicDescription streamFormat;
streamFormat.mSampleRate = 8000;
streamFormat.mFormatID = kAudioFormatULaw;
streamFormat.mFormatFlags = 0;
streamFormat.mFramesPerPacket = 1;&lt;br /&gt;
streamFormat.mBytesPerFrame = 2;
streamFormat.mBytesPerPacket = streamFormat.mBytesPerFrame;
streamFormat.mChannelsPerFrame = 1;
streamFormat.mBitsPerChannel = 16;
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;I get a constant noise even I just return no error on the playback callback function. Please help. Thanks!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the great example. I am getting stuck for the audio playback&#8230;my audio format is like this:</p>

<p><pre><code>AudioStreamBasicDescription streamFormat;
streamFormat.mSampleRate = 8000;
streamFormat.mFormatID = kAudioFormatULaw;
streamFormat.mFormatFlags = 0;
streamFormat.mFramesPerPacket = 1;<br />
streamFormat.mBytesPerFrame = 2;
streamFormat.mBytesPerPacket = streamFormat.mBytesPerFrame;
streamFormat.mChannelsPerFrame = 1;
streamFormat.mBitsPerChannel = 16;
</code></pre></p>

<p>I get a constant noise even I just return no error on the playback callback function. Please help. Thanks!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: netstat</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-4/#comment-3684</link>
		<dc:creator>netstat</dc:creator>
		<pubDate>Wed, 23 Nov 2011 13:06:35 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3684</guid>
		<description>&lt;p&gt;Hi Michael, 
First of all, thanks for the great article.&lt;/p&gt;

&lt;p&gt;Just want to tell that when you&#039;re finished it is also good to call
&lt;code&gt;AudioComponentInstanceDispose(audioUnit);&lt;/code&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Michael, 
First of all, thanks for the great article.</p>

<p>Just want to tell that when you&#8217;re finished it is also good to call
<code>AudioComponentInstanceDispose(audioUnit);</code></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Tyson</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-4/#comment-3654</link>
		<dc:creator>Michael Tyson</dc:creator>
		<pubDate>Mon, 14 Nov 2011 15:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3654</guid>
		<description>&lt;p&gt;Ah, -50, my favourite error ;-)&lt;/p&gt;

&lt;p&gt;Firstly, I notice that you&#039;re setting mDataByteSize of the render buffer to inNumberFrames * sizeof(SInt16) * 2 - it may make no difference, but that implies stereo audio (that is, frames * bytes per sample * 2 samples per frame). Either set your mChannelsPerFrame to 2 if stereo audio is what you actually want, or get rid of the * 2.&lt;/p&gt;

&lt;p&gt;Also, it couldn&#039;t hurt to make absolutely certain viewController.ioUnit is initialised.&lt;/p&gt;

&lt;p&gt;Otherwise, if that doesn&#039;t do it, perhaps it&#039;s worth asking on the Core Audio mailing list, where they&#039;re always very helpful.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ah, -50, my favourite error ;-)</p>

<p>Firstly, I notice that you&#8217;re setting mDataByteSize of the render buffer to inNumberFrames * sizeof(SInt16) * 2 &#8211; it may make no difference, but that implies stereo audio (that is, frames * bytes per sample * 2 samples per frame). Either set your mChannelsPerFrame to 2 if stereo audio is what you actually want, or get rid of the * 2.</p>

<p>Also, it couldn&#8217;t hurt to make absolutely certain viewController.ioUnit is initialised.</p>

<p>Otherwise, if that doesn&#8217;t do it, perhaps it&#8217;s worth asking on the Core Audio mailing list, where they&#8217;re always very helpful.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-4/#comment-3652</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Sun, 13 Nov 2011 00:52:09 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3652</guid>
		<description>&lt;p&gt;My code seems to work on the simulator but not on a device and I cannot work out why. AudioUnitRender returns -50 on a device. I am pretty sure it has something to do with the buffers but I am not sure. My init code:
&lt;code&gt;
AudioStreamBasicDescription audioFormat;
    audioFormat.mSampleRate     = 44100.0;
    audioFormat.mFormatID           = kAudioFormatLinearPCM;
    audioFormat.mFormatFlags        = kAudioFormatFlagIsSignedInteger &#124; kAudioFormatFlagIsPacked;
    audioFormat.mFramesPerPacket    = 1;
    audioFormat.mChannelsPerFrame   = 1;
    audioFormat.mBitsPerChannel     = 16;
    audioFormat.mBytesPerPacket     = 2;
    audioFormat.mBytesPerFrame      = 2;
&lt;/code&gt;
And my render code:
&lt;code&gt;
    AudioBufferList bufferList;
    bufferList.mNumberBuffers = 1;
    bufferList.mBuffers[0].mNumberChannels = 1;
    bufferList.mBuffers[0].mData = NULL;
    bufferList.mBuffers[0].mDataByteSize = inNumberFrames * sizeof(SInt16) * 2;&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;&lt;code&gt;OSStatus status = AudioUnitRender(viewController.ioUnit, 
                         ioActionFlags, 
                         inTimeStamp, 
                         1, 
                         inNumberFrames, 
                         &amp;bufferList);
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>My code seems to work on the simulator but not on a device and I cannot work out why. AudioUnitRender returns -50 on a device. I am pretty sure it has something to do with the buffers but I am not sure. My init code:
<code>
AudioStreamBasicDescription audioFormat;
    audioFormat.mSampleRate     = 44100.0;
    audioFormat.mFormatID           = kAudioFormatLinearPCM;
    audioFormat.mFormatFlags        = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
    audioFormat.mFramesPerPacket    = 1;
    audioFormat.mChannelsPerFrame   = 1;
    audioFormat.mBitsPerChannel     = 16;
    audioFormat.mBytesPerPacket     = 2;
    audioFormat.mBytesPerFrame      = 2;
</code>
And my render code:
<code>
    AudioBufferList bufferList;
    bufferList.mNumberBuffers = 1;
    bufferList.mBuffers[0].mNumberChannels = 1;
    bufferList.mBuffers[0].mData = NULL;
    bufferList.mBuffers[0].mDataByteSize = inNumberFrames * sizeof(SInt16) * 2;</code></p>

<p><pre><code>OSStatus status = AudioUnitRender(viewController.ioUnit, 
                         ioActionFlags, 
                         inTimeStamp, 
                         1, 
                         inNumberFrames, 
                         &amp;bufferList);
</code></pre></p>

<p></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Tyson</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-4/#comment-3616</link>
		<dc:creator>Michael Tyson</dc:creator>
		<pubDate>Thu, 27 Oct 2011 16:36:17 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3616</guid>
		<description>&lt;p&gt;I&#039;m afraid not, muzzkat, no. The only way to capture device output is to use a loopback audio device to run the output back through into the input.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m afraid not, muzzkat, no. The only way to capture device output is to use a loopback audio device to run the output back through into the input.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: muzzkat</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-4/#comment-3615</link>
		<dc:creator>muzzkat</dc:creator>
		<pubDate>Thu, 27 Oct 2011 16:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3615</guid>
		<description>&lt;p&gt;Is it possible capture the OUTPUT (say from the iPod player or another Audio App) and direct that through my AudioUnit graph?&lt;/p&gt;

&lt;p&gt;Currently I have a AUFilePlayer-&gt;Mixer-&gt;iPodSpeed-&gt;RemoteIO-Output... this works well, but I want to use files from the iPod Library, or another app.&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Is it possible capture the OUTPUT (say from the iPod player or another Audio App) and direct that through my AudioUnit graph?</p>

<p>Currently I have a AUFilePlayer-&gt;Mixer-&gt;iPodSpeed-&gt;RemoteIO-Output&#8230; this works well, but I want to use files from the iPod Library, or another app.</p>

<p>Thanks</p>]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-4/#comment-3589</link>
		<dc:creator>James</dc:creator>
		<pubDate>Tue, 11 Oct 2011 13:15:28 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3589</guid>
		<description>&lt;p&gt;Okay Michael, thanks again! I&#039;ll check there...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Okay Michael, thanks again! I&#8217;ll check there&#8230;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Tyson</title>
		<link>http://atastypixel.com/blog/using-remoteio-audio-unit/comment-page-4/#comment-3588</link>
		<dc:creator>Michael Tyson</dc:creator>
		<pubDate>Tue, 11 Oct 2011 13:11:42 +0000</pubDate>
		<guid isPermaLink="false">http://atastypixel.com/blog/2008/10/27/using-remoteio-audio-unit/#comment-3588</guid>
		<description>&lt;p&gt;Oh, if you&#039;re &lt;em&gt;writing&lt;/em&gt; an audio unit, I can&#039;t help you - I&#039;ve only got experience with using audio units. Maybe you should seek help in the apple dev forums?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Oh, if you&#8217;re <em>writing</em> an audio unit, I can&#8217;t help you &#8211; I&#8217;ve only got experience with using audio units. Maybe you should seek help in the apple dev forums?</p>]]></content:encoded>
	</item>
</channel>
</rss>

