<?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"
	>
<channel>
	<title>Comments on: Tweaking the samplesCallbackEvent loop</title>
	<atom:link href="http://www.blixtsystems.com/2008/05/tweaking-the-samplescallbackevent-loop/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blixtsystems.com/2008/05/tweaking-the-samplescallbackevent-loop/</link>
	<description>BlixtSystems Flash Actionscript development</description>
	<pubDate>Fri, 21 Nov 2008 05:17:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Leo</title>
		<link>http://www.blixtsystems.com/2008/05/tweaking-the-samplescallbackevent-loop/#comment-225</link>
		<dc:creator>Leo</dc:creator>
		<pubDate>Fri, 30 May 2008 19:10:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.blixtsystems.com/?p=44#comment-225</guid>
		<description>That's the conclusion I have reached, but I do find it very surprising.
It does contradict what I would have expected and what seems to be usual procedure when comparing to for example VST plugins or how it's done in &lt;a href="http://code.google.com/p/popforge/" rel="nofollow"&gt;popforge&lt;/a&gt;, which I would think is well optimized.

I tried using a Vector which is a bit faster than the ByteArray, but like I mentioned in my test reading and writing from a Vector 10 000 000 times takes 1239 ms while passing a value to a function and returning it takes 213 ms.
So it seems like in AS3 the optimal approach must be to make sure you only read and write once from the ByteArray and simply pass the sample trough a function for each effect you like to apply.</description>
		<content:encoded><![CDATA[<p>That&#8217;s the conclusion I have reached, but I do find it very surprising.<br />
It does contradict what I would have expected and what seems to be usual procedure when comparing to for example VST plugins or how it&#8217;s done in <a href="http://code.google.com/p/popforge/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/http://code.google.com/p/popforge/');" rel="nofollow">popforge</a>, which I would think is well optimized.</p>
<p>I tried using a Vector which is a bit faster than the ByteArray, but like I mentioned in my test reading and writing from a Vector 10 000 000 times takes 1239 ms while passing a value to a function and returning it takes 213 ms.<br />
So it seems like in AS3 the optimal approach must be to make sure you only read and write once from the ByteArray and simply pass the sample trough a function for each effect you like to apply.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spender</title>
		<link>http://www.blixtsystems.com/2008/05/tweaking-the-samplescallbackevent-loop/#comment-222</link>
		<dc:creator>spender</dc:creator>
		<pubDate>Fri, 30 May 2008 18:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.blixtsystems.com/?p=44#comment-222</guid>
		<description>hmm.. just read your post again. so what you are saying is that it's best to pull data through a chain of processors a sample at a time, and not bother passing it through in buffers if each processor needs to both read and write to any buffer? 

good post btw.</description>
		<content:encoded><![CDATA[<p>hmm.. just read your post again. so what you are saying is that it&#8217;s best to pull data through a chain of processors a sample at a time, and not bother passing it through in buffers if each processor needs to both read and write to any buffer? </p>
<p>good post btw.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spender</title>
		<link>http://www.blixtsystems.com/2008/05/tweaking-the-samplescallbackevent-loop/#comment-220</link>
		<dc:creator>spender</dc:creator>
		<pubDate>Fri, 30 May 2008 18:31:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.blixtsystems.com/?p=44#comment-220</guid>
		<description>hey leo,

i've been benchmarking too! it's important to get this right from the outset. have you done any investigation into the Vector class. I'm seeing good results with this, and I am now thinking that the fastest method (in the case of several chained fx) is to copy any ByteArray data into a Vector, and to use the Vector to pass data between processors, then to copy it to the output bytearray when finished. 

I also wonder if some of the results seen here are due to internal (player) casting between single and double precision floating point numbers. Every time you read/write a float to a ByteArray, there must somewhere be an implicit conversion between double precision (Number type) and the single precision stored in the ByteArray. I'm starting to suspect that there's quite a performance hit here.</description>
		<content:encoded><![CDATA[<p>hey leo,</p>
<p>i&#8217;ve been benchmarking too! it&#8217;s important to get this right from the outset. have you done any investigation into the Vector class. I&#8217;m seeing good results with this, and I am now thinking that the fastest method (in the case of several chained fx) is to copy any ByteArray data into a Vector, and to use the Vector to pass data between processors, then to copy it to the output bytearray when finished. </p>
<p>I also wonder if some of the results seen here are due to internal (player) casting between single and double precision floating point numbers. Every time you read/write a float to a ByteArray, there must somewhere be an implicit conversion between double precision (Number type) and the single precision stored in the ByteArray. I&#8217;m starting to suspect that there&#8217;s quite a performance hit here.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
