<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>W.J. Warren</title>
	<atom:link href="http://blog.ansuz.nl/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ansuz.nl</link>
	<description>Flash Developer</description>
	<lastBuildDate>Sun, 24 Mar 2013 17:48:48 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Renderscript</title>
		<link>http://blog.ansuz.nl/index.php/2013/03/24/renderscript/</link>
		<comments>http://blog.ansuz.nl/index.php/2013/03/24/renderscript/#comments</comments>
		<pubDate>Sun, 24 Mar 2013 17:48:48 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[renderscript]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=481</guid>
		<description><![CDATA[To do some faster image manipulation I&#8217;ve been looking at Renderscript. Renderscript provides a platform-independent computation engine that operates at the native level. Use it to accelerate your apps that require extensive computational horsepower. This made it a better candidate &#8230; <a href="http://blog.ansuz.nl/index.php/2013/03/24/renderscript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To do some faster image manipulation I&#8217;ve been looking at <a href="http://developer.android.com/guide/topics/renderscript/index.html" target="_blank">Renderscript</a>.</p>
<blockquote><p>Renderscript provides a platform-independent computation engine that operates at the native level. Use it to accelerate your apps that require extensive computational horsepower.</p></blockquote>
<p>This made it a better candidate than using the <a href="http://developer.android.com/tools/sdk/ndk/overview.html" target="_blank">NDK with JNI</a>. It&#8217;s also easier to maintain as an Android developer.</p>
<p>What I wanted to achieve is a fast way to apply <a href="http://en.wikipedia.org/wiki/Gaussian_blur" target="_blank">Gaussian blur</a>. Googling around will provide you plenty ways to do this in Java. It let me to a <a href="http://xjaphx.wordpress.com/2011/06/22/image-processing-convolution-matrix/" target="_blank">blog post about using a Convolution matrix</a> combined with various kernels to achieve different effects. Unfortunately doing this on large images in Java is slow.</p>
<p>The other option was to use JNI, but I don&#8217;t feel confident enough about writing C/C++. There are, however, some libraries out there worth looking at. <a href="http://opencv.org/" target="_blank">OpenCV</a> and <a href="https://github.com/lightbox/PhotoProcessing/tree/master/PhotoProcessing" target="_blank">Lightbox&#8217; PhotoProcessing</a> for instance. But when you&#8217;re just trying to use one or two effects, this seems a bit overkill.</p>
<p>Last but not least is Renderscript. This is a bit more accessible than the NDK and only results in a slight loss of performance compared to using the NDK. The only requirement is <a href="http://developer.android.com/reference/android/renderscript/package-summary.html" target="_blank">Android 3+</a> (API level 11 and above).<br />
If you&#8217;re looking to get started with Renderscript, Google has a good <a href="http://android-developers.blogspot.com.es/2011/02/introducing-renderscript.html" target="_blank">introduction</a> and more in-depth article about the <a href="http://android-developers.blogspot.se/2011/03/renderscript.html" target="_blank">design goals of Renderscript</a>. The <a href="http://developer.android.com/reference/renderscript/globals.html" target="_blank">Renderscript reference</a> comes in very handy when you are writing your own scripts.<br />
At first I was happy to find the <a href="http://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlur.html" target="_blank">ScriptIntrinsicBlur</a> class, but unfortunately that one is only available from API level 17. Discarding that option, I decided to implement my own class to create a Gaussian blur effect. To start work on a fast algorithm for Gaussian blur, I had a look at how this is being done for games and came across a blog post about &#8220;<a href="http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/" target="_blank">Efficient Gaussian blur</a>&#8220;. I&#8217;ve made a first (yet to be further optimized) version and tried it out, you can find the script at <a href="https://github.com/wjwarren/droid-asylum/blob/master/src/nl/ansuz/android/asylum/renderscript/effects/GaussianBlur.rs" target="_blank">Github</a>. This implementation already renders a Gaussian blur effect extremely fast. It looks great when using the emulator, but unfortunately when used on a phone it seems to produce some <a href="http://en.wikipedia.org/wiki/Scan_line" target="_blank">scanline</a>-like side-effect.</p>
<p>The biggest downside of Renderscript is that it is only available on Android 3+. It does, however, look like Google is working on a compatibility library for Android 2.2. When you clone &#8220;<a href="https://android.googlesource.com/platform/frameworks/support" target="_blank">https://android.googlesource.<wbr>com/platform/frameworks/<wbr>support</wbr></wbr></a>&#8220;, there seems to be a &#8220;renderscript\v8&#8243; folder. I tried building it using the supplied Make file, but there were some errors.</p>
<p>I hope the compatibility library for Renderscript arrives soon, so it can be used across a bigger range of devices.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2013/03/24/renderscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending SMS</title>
		<link>http://blog.ansuz.nl/index.php/2013/01/11/sending-sms/</link>
		<comments>http://blog.ansuz.nl/index.php/2013/01/11/sending-sms/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 22:13:23 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=472</guid>
		<description><![CDATA[Being able to send an SMS to a device can come in really handy from time to time. Below are two methods for sending text to a device using SMS. The first is to send to a hardware device, the &#8230; <a href="http://blog.ansuz.nl/index.php/2013/01/11/sending-sms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Being able to send an SMS to a device can come in really handy from time to time. Below are two methods for sending text to a device using SMS. The first is to send to a hardware device, the second to send to a virtual device on an emulator.</p>
<p><strong>Hardware device</strong></p>
<blockquote><p><strong></strong>&gt; adb shell<br />
$ am start -a android.intent.action.SENDTO -d sms:01123123123 &#8211;es sms_body &#8220;Text to send&#8221; &#8211;ez exit_on_sent true</p></blockquote>
<p>For more info, see &#8220;<a title="How do I send an SMS from a shell?" href="http://stackoverflow.com/questions/4043490/how-do-i-send-an-sms-from-a-shell" target="_blank">How do I send an SMS from a shell?</a>&#8221; on Stackoverflow.</p>
<p><strong>Emulator</strong></p>
<ol>
<li>Open the DDMS perspective in Eclipse.</li>
<li>Under &#8220;Telephony Actions&#8221; select &#8220;SMS&#8221;.</li>
<li>Fill out &#8220;Incoming number&#8221; and &#8220;Message&#8221;.</li>
<li>Hit &#8220;Send&#8221;</li>
</ol>
<p>For more info, see &#8220;<a title="Using DDMS" href="http://developer.android.com/tools/debugging/ddms.html#ops-location" target="_blank">Using DDMS</a>&#8221; on the Android developers site.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2013/01/11/sending-sms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast, user-friendly and power-efficient network communication on Android</title>
		<link>http://blog.ansuz.nl/index.php/2012/11/27/fast-user-friendly-and-power-efficient-network-communication-on-android/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/11/27/fast-user-friendly-and-power-efficient-network-communication-on-android/#comments</comments>
		<pubDate>Tue, 27 Nov 2012 21:56:32 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[droidcon]]></category>
		<category><![CDATA[droidconuk]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[uk]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=465</guid>
		<description><![CDATA[Notes from Erik Hellman’s talk about &#8220;Fast, user-friendly and power-efficient network communication on Android&#8221; on the second day of DroidCon UK 2012. Doing network communication the right way isn&#8217;t all that hard, just keep a couple of recommendations in mind. &#8230; <a href="http://blog.ansuz.nl/index.php/2012/11/27/fast-user-friendly-and-power-efficient-network-communication-on-android/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Notes from Erik Hellman’s talk about &#8220;Fast, user-friendly and power-efficient network communication on Android&#8221; on the second day of DroidCon UK 2012.</p>
<p>Doing network communication the right way isn&#8217;t all that hard, just keep a couple of recommendations in mind. There is no need to &#8220;re-invent the wheel&#8221;, other fields have struggled with this problem before, we can learn from them. There are also a lot of open source projects that tackle various network related problems, quite often one of those will meet your requirements.</p>
<p>That being said, handling the network on a mobile phone can be difficult. The connection can drop out of nowhere, the quality can change or you might not even be online at all. There are a couple of things that developers can do to make the experience better:</p>
<ul>
<li> HTTP Client handling</li>
<li>Background network I/O</li>
<li>Playing server</li>
</ul>
<p>Generally speaking <a href="http://developer.android.com/reference/java/net/HttpURLConnection.html" target="_blank">HttpUrlConnection</a> is the best client to use, except for Eclair and Froyo, for these API versions the Apache HTTP client has fewer bugs.<br />
Make sure to wrap the <a href="http://developer.android.com/reference/java/net/HttpURLConnection.html" target="_blank">HttpUrlConnection</a> streams in buffers and always exhaust the streams.</p>
<p>Enable caching, it will save a lot of network traffic.</p>
<p>To avoid blocking the UI thread, always run your network related tasks on a different thread using a Service with a Handler implementation.<br />
If you need to poll a URL on a regular basis, use the <a href="http://developer.android.com/reference/android/app/AlarmManager.html" target="_blank">AlarmManager</a> to schedule requests at a set (slightly inexact) interval.</p>
<p>An Android device could also serve as a server (think multiplayer gaming). This could be quite complex to create, but luckily the <a href="https://netty.io/" target="_blank">Netty.io</a> library will probably meet most of your needs.</p>
<p>And lastly, don&#8217;t use a splash-screen, there should be no need for it. Give the user as much control as possible.</p>
<p>You can <a href="http://uk.droidcon.com/sessions/fast-user-friendly-and-power-efficient-network-communication-on-android/" target="_blank">watch the full presentation on the Droidcon UK website</a> or <a href="http://developer.sonymobile.com/downloads/documentation/fast-user-friendly-and-power-efficient-network-communication-on-android/" target="_blank">read it in pdf format on Sony&#8217;s site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/11/27/fast-user-friendly-and-power-efficient-network-communication-on-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android icon generator</title>
		<link>http://blog.ansuz.nl/index.php/2012/11/15/android-icon-generator/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/11/15/android-icon-generator/#comments</comments>
		<pubDate>Thu, 15 Nov 2012 10:50:23 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=462</guid>
		<description><![CDATA[If you&#8217;re looking for a quick way to generate some icons for your Android application, have a look at this Generic Icon Generator page.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking for a quick way to generate some icons for your Android application, have a look at this <a href="http://android-ui-utils.googlecode.com/hg/asset-studio/dist/icons-generic.html" target="_blank">Generic Icon Generator</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/11/15/android-icon-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Notifications</title>
		<link>http://blog.ansuz.nl/index.php/2012/11/05/custom-notifications/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/11/05/custom-notifications/#comments</comments>
		<pubDate>Mon, 05 Nov 2012 20:09:36 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Custom]]></category>
		<category><![CDATA[Notifications]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=428</guid>
		<description><![CDATA[Today I ran into an interesting problem with custom Notifications. The following error kept on being thrown while I was testing with a Samsung Galaxy Ace phone: "android.widget.RemoteViews$ActionException: can't find view: ..." My custom Notification contains an ImageView and some &#8230; <a href="http://blog.ansuz.nl/index.php/2012/11/05/custom-notifications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today I ran into an interesting problem with custom Notifications. The following error kept on being thrown while I was testing with a Samsung Galaxy Ace phone:</p>
<blockquote><p>"android.widget.RemoteViews$ActionException: can't find view: ..."</p></blockquote>
<p>My custom Notification contains an ImageView and some TextViews. The image for the ImageView was being loaded from a remote server. When the image was retrieved I tried updating the Notification by modifying a clone of the original Notification I sent, calling:
<div class="igBar"><span id="lcode-2"><a href="#" onclick="javascript:showPlainTxt('code-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-2">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">RemoteView.<span style="">setImageViewBitmap</span><span style="color:#006600; font-weight:bold;">&#40;</span>myViewId, bitmap<span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> After this the app would crash. The LogCat output would then show the error above.</p>
<p>Having a close look at the other Notifications displayed by the phone, it turned out that ImageViews were automatically removed.</p>
<p>To solve the issue you have to make sure to always create a new Notification, that way your custom XML gets inflated and the ImageView is (again) accessible.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/11/05/custom-notifications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Device Fragmentation by Robin Puthli</title>
		<link>http://blog.ansuz.nl/index.php/2012/11/03/device-fragmentation-by-robin-puthli/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/11/03/device-fragmentation-by-robin-puthli/#comments</comments>
		<pubDate>Sat, 03 Nov 2012 20:28:44 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[droidcon]]></category>
		<category><![CDATA[droidconuk]]></category>
		<category><![CDATA[uk]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=423</guid>
		<description><![CDATA[Notes from Robin Puthli’s talk about Device Fragmentation among Android devices on the 1st day of DroidCon UK 2012. Device fragmentation starts to become a big part of Android development as there are more and more Android devices available. As a &#8230; <a href="http://blog.ansuz.nl/index.php/2012/11/03/device-fragmentation-by-robin-puthli/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Notes from Robin Puthli’s talk about Device Fragmentation among Android devices on the 1st day of DroidCon UK 2012.</p>
<p>Device fragmentation starts to become a big part of Android development as there are more and more Android devices available. As a result there are a lot of different resolutions and screen sizes that need to be taken into account. <a href="http://opensignal.com" target="_blank">OpenSignal.com</a> has a very interesting <a href="http://opensignal.com/reports/fragmentation.php" target="_blank">report</a> on their blog that illustrates this fragmentation.</p>
<p>Luckily (device) fragmentation is a very old problem. It had to be solved on operation systems (Window, Mac, Linux, etc), browsers (Chrome, FireFox, Internet Explorer, etc), Java (ME, SE, FX, etc) and more before.</p>
<p>There are roughly nine strategies you can pick from to deal with device fragmentation.<br />
<strong>Multi-manual</strong>: Phone vs tablet, writing separate code for each.<br />
<strong>Derive multi</strong>: <a href="http://qt.digia.com/" target="_blank">QT</a> or <a href="http://www.enough.de/products/j2me-polish/" target="_blank">J2ME Polish</a>, <a href="http://xamarin.com/monotouch" target="_blank">Mono Touch</a>, writing pseudo code and then letting the framework generate the rest.<br />
<strong>One (size) fits all:</strong> HTML5, <a href="http://phonegap.com/" target="_blank">PhoneGap</a>. This approach is based on coding for the lowest common denominator.<strong><br />
Single adapt</strong>: Writing adaptive layouts, using 9-patches, fragments.</p>
<blockquote><p>“There is no silver bullet. You have to pick and mix [from the available solutions].”</p></blockquote>
<p>The full presentation can be found at <a href="http://blogmobile.itude.com/2012/10/25/droidcon-uk-presentation-on-device-fragmentation/" target="_blank">Itude Mobile's blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/11/03/device-fragmentation-by-robin-puthli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenCV for Android by Erik Hellman</title>
		<link>http://blog.ansuz.nl/index.php/2012/11/03/opencv-for-android-by-erik-hellman/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/11/03/opencv-for-android-by-erik-hellman/#comments</comments>
		<pubDate>Sat, 03 Nov 2012 17:54:09 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[droidcon]]></category>
		<category><![CDATA[droidconuk]]></category>
		<category><![CDATA[uk]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=417</guid>
		<description><![CDATA[Notes from Erik Hellman’s talk about OpenCV for Android on the 1st day of DroidCon UK 2012. Open source Computer Vision library, containing loads of modules and image (related) algorithms. The code is very well documented, but most samples are in &#8230; <a href="http://blog.ansuz.nl/index.php/2012/11/03/opencv-for-android-by-erik-hellman/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Notes from Erik Hellman’s talk about <a href="http://opencv.org/" target="_blank">OpenCV</a> for Android on the 1st day of DroidCon UK 2012.</p>
<p>Open source Computer Vision library, containing loads of modules and image (related) algorithms.</p>
<p>The code is very well <a href="http://docs.opencv.org/modules/refman.html" target="_blank">documented</a>, but most samples are in C++.</p>
<p>A couple of examples of what you can do with <a href="http://opencv.org/" target="_blank">OpenCV</a> are:</p>
<ul>
<li>Object detection, i.e. face detection.</li>
<li>Salient feature detection, i.e. hand or a door frame.</li>
<li>Motion tracking.</li>
</ul>
<p>The talk mainly covered demonstrations of what you can do with <a href="http://opencv.org/" target="_blank">OpenCV</a>, rather than going into more detail.</p>
<p>Library: Download <a href="http://opencv.org/downloads.html" target="_blank">OpenCV (for Android)</a><br />
Documentation:  <a href="http://docs.opencv.org/modules/refman.html" target="_blank">OpenCV API Reference</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/11/03/opencv-for-android-by-erik-hellman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AllJoyn by Mitch Williams</title>
		<link>http://blog.ansuz.nl/index.php/2012/11/03/alljoyn-by-mitch-williams/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/11/03/alljoyn-by-mitch-williams/#comments</comments>
		<pubDate>Sat, 03 Nov 2012 13:36:03 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[droidcon]]></category>
		<category><![CDATA[droidconuk]]></category>
		<category><![CDATA[uk]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=413</guid>
		<description><![CDATA[Notes from Mitch Williams' talk about AllJoyn on the 1st day of DroidCon UK 2012. "AllJoyn™ is an open-source application development framework that enables ad hoc, proximity-based device-to-device communication that is OS agnostic." There are other frameworks like DLNA, UPnP &#8230; <a href="http://blog.ansuz.nl/index.php/2012/11/03/alljoyn-by-mitch-williams/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Notes from Mitch Williams' talk about <a href="https://www.alljoyn.org/" target="_blank">AllJoyn</a> on the 1st day of DroidCon UK 2012.</p>
<blockquote><p>"AllJoyn™ is an open-source application development framework that enables ad hoc, proximity-based device-to-device communication that is OS agnostic."</p></blockquote>
<p>There are other frameworks like DLNA, UPnP and Bonjour as well. DLNA would be a good choice if you only wanted to do one-to-one device communication. UPnP and Bonjour are missing a lot of the higher level communication compared to <a href="https://www.alljoyn.org/" target="_blank">AllJoyn</a>.</p>
<p><a href="https://www.alljoyn.org/" target="_blank">AllJoyn</a> is multi-platform as a result of the native implementation being written in C++. The currently supported platforms are:</p>
<ul>
<li>Android 2.1 and above</li>
<li>iOS</li>
<li>Window XP, 7 and 8</li>
<li>Linux</li>
<li>OS X</li>
</ul>
<p>Source code: <a href="http://alljoyn.github.com/download-source.html" target="_blank">AllJoyn</a> @ Github.<br />
Documentation: <a href="https://www.alljoyn.org/docs/3.0.2/java/index.html" target="_blank">AllJoyn Java docs</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/11/03/alljoyn-by-mitch-williams/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to Polaris by Cyril Mottier</title>
		<link>http://blog.ansuz.nl/index.php/2012/11/03/introduction-to-polaris-by-cyril-mottier/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/11/03/introduction-to-polaris-by-cyril-mottier/#comments</comments>
		<pubDate>Sat, 03 Nov 2012 11:38:33 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[droidcon]]></category>
		<category><![CDATA[droidconuk]]></category>
		<category><![CDATA[uk]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=403</guid>
		<description><![CDATA[Notes from Cyril Mottier's talk about Polaris on the 1st day of DroidCon UK 2012. Polaris is a mapping library for Android. It was created because with the current Google Maps API it is painful to even do simple stuff. &#8230; <a href="http://blog.ansuz.nl/index.php/2012/11/03/introduction-to-polaris-by-cyril-mottier/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Notes from Cyril Mottier's talk about <a href="https://github.com/cyrilmottier/Polaris" target="_blank">Polaris</a> on the 1st day of DroidCon UK 2012.</p>
<p><a href="https://github.com/cyrilmottier/Polaris" target="_blank">Polaris</a> is a mapping library for Android. It was created because with the current Google Maps API it is painful to even do simple stuff.</p>
<p>Some features of <a href="https://github.com/cyrilmottier/Polaris" target="_blank">Polaris</a> include:</p>
<p><strong>Gesture support</strong></p>
<ul>
<li>Simple tap (opens a call out)</li>
<li>Double tap (zoom in or zoom to the maximum zoom level for the location)</li>
<li>Long press</li>
</ul>
<p><strong>(Map) Annotations</strong> with a "variable anchor" (the arrow/pointer of the annotation is dynamically placed based on the location's position on screen).</p>
<p>Demo: <a href="https://play.google.com/store/apps/details?id=com.cyrilmottier.android.polarissample" target="_blank">Polaris Sample</a> @ Google Play Store.<br />
Source code: <a href="https://github.com/cyrilmottier/Polaris" target="_blank">Polaris</a> @ Github.</p>
<p><em><strong>NOTE:</strong> Polaris may become obsolete as Google is working on a new Maps API for Android.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/11/03/introduction-to-polaris-by-cyril-mottier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DroidCon UK &#8211; day 2</title>
		<link>http://blog.ansuz.nl/index.php/2012/10/27/droidcon-uk-day-2/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/10/27/droidcon-uk-day-2/#comments</comments>
		<pubDate>Sat, 27 Oct 2012 20:39:55 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[droidcon]]></category>
		<category><![CDATA[droidconuk]]></category>
		<category><![CDATA[uk]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=394</guid>
		<description><![CDATA[Another quick summary of the talks of the day. 9.45 The Fragment transition Who: Corey Leigh Latislaw What: Introduction on using Fragments. Web: - Summary: Start using Fragments now. There is no need to convert a whole app at once, &#8230; <a href="http://blog.ansuz.nl/index.php/2012/10/27/droidcon-uk-day-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Another quick summary of the talks of the day.</p>
<p><strong>9.45 The Fragment transition</strong><br />
<em>Who:</em> Corey Leigh Latislaw<br />
<em> What:</em> Introduction on using Fragments.<br />
<em> Web:</em> -<br />
<em> Summary:</em> Start using Fragments now. There is no need to convert a whole app at once, but you can start using Fragments with the new Activities you are building.</p>
<p><strong>10.30 Writing games for an Android console.</strong><br />
<em>Who:</em> All Sutton - Ouya<br />
<em> What:</em> Some considerations to keep in mind when developing for a console.<br />
<em> Web:</em> <a href="http://www.funkyandroid.com" target="_blank">www.funkyandroid.com</a><br />
<em> Summary:</em> Developing for a console is wildly different from mobile.</p>
<p><strong>11.30 Android reverse engineering</strong><br />
<em>Who:</em> David Tellebaum - apkudo<br />
<em> What:</em> Reverse engineering Android applications.<br />
<em> Web:</em> <a href="http://www.apkudo.com" target="_blank">www.apkudo.com</a><br />
<em> Summary:</em> Hacking Zynga's "Words With Friends" using (bak)smali and ViewServer.</p>
<p><strong>12.15 Interfacing hardware with Android and Arduino</strong><br />
<em>Who:</em> Fei Manheche - Robobo<br />
<em> What:</em> Connecting Android apps to Arduino hardware.<br />
<em> Web:</em> <a href="http://www.robobo.org" target="_blank">www.robobo.org</a><br />
<em> Summary:</em> A brief introduction on how to make Android and Arduino talk to each other.</p>
<p><strong>14.00 Memory Analyzer</strong><br />
<em>Who:</em> Felipe Ferraz - CESAR<br />
<em> What:</em> Memory analyzing to resolve bugs and optimize performance.<br />
<em> Web:</em> -<br />
<em> Summary:</em> Using a timeline of memory dumps and the MAT Eclipse plugin to resolve bugs and optimize performance.</p>
<p><strong>14.45 Deep dive into Android custom components</strong><br />
<em>Who:</em> Chui-Ki Chan - Monkey Write<br />
<em> What:</em> Creating your own custom components.<br />
<em> Web:</em> <a href="http://www.sqisland.com" target="_blank">www.sqisland.com</a><br />
<em> Summary:</em> Easily create your own custom components by either encapsulating or extending existing widgets. Slides: <a href="http://www.bit.ly/DeepDiveComp" target="_blank">www.bit.ly/DeepDiveComp</a></p>
<p><strong>15.45 Optimized network communication</strong><br />
<em>Who:</em> Erik Hellman - Sony Mobile<br />
<em> What:</em> How to optimize your networking logic to provide user-friendly and power-efficient experiences.<br />
<em> Web:</em> -<br />
<em> Summary:</em> A set of tips and best practices to avoid annoying the user and not drain the battery with networking activities.</p>
<p><strong>16.30 Dynamic Animations</strong><br />
<em>Who:</em> Anders Ericsson - jayway.com<br />
<em> What:</em> Dynamic animations.<br />
<em> Web:</em> <a href="http://www.jayway.com" target="_blank">www.jayway.com</a><br />
<em> Summary:</em> By extending a View, adding a custom class to calculate position (using spring and damper physics) and using a Runnable you can quickly add animations to any View.</p>
<p><strong>17.15 AndroVM</strong><br />
<em>Who:</em> Daniel Fages - Genymobile<br />
<em> What:</em> An Android VM that runs on VirtualBox.<br />
<em> Web:</em> <a href="http://www.androvm.com" target="_blank">www.androvm.com</a><br />
<em> Summary:</em> An explanation about how AndroVM is built followed by a demo.</p>
<p><strong>18.00 Developing accessible applications</strong><br />
<em>Who:</em> Gary Readfern-Gray - RNIB<br />
<em> What:</em> Developing accessible applications for Android.<br />
<em> Web:</em> <a href="http://www.rnib.org.uk" target="_blank">www.rnib.org.uk</a><br />
<em> Summary:</em> It takes very little effort to add basic accessibility optimizations by using content descriptions for widgets and making the app navigable by keyboard (or at least D-pad).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/10/27/droidcon-uk-day-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DroidCon UK &#8211; day 1</title>
		<link>http://blog.ansuz.nl/index.php/2012/10/25/droidcon-uk-day-1/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/10/25/droidcon-uk-day-1/#comments</comments>
		<pubDate>Thu, 25 Oct 2012 15:53:44 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[droidcon]]></category>
		<category><![CDATA[droidconuk]]></category>
		<category><![CDATA[uk]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=386</guid>
		<description><![CDATA[A quick summary of the talks of the day. 10.05 AllJoyn Who: Mitch Williams - Qualcomm What: AllJoyn P2P framework Web: www.alljoyn.org, www.alljoynappchallenge.com Summary: An ad-hoc and proximity based p2p framework. 10.40 Device fragmentation Who: Robin Puthli - Itude Mobile &#8230; <a href="http://blog.ansuz.nl/index.php/2012/10/25/droidcon-uk-day-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A quick summary of the talks of the day.</p>
<p><a href="http://blog.ansuz.nl/index.php/2012/11/03/alljoyn-by-mitch-williams/"><strong>10.05 AllJoyn</strong></a><br />
<em>Who:</em> Mitch Williams - Qualcomm<br />
<em>What:</em> AllJoyn P2P framework<br />
<em>Web: </em><a href="http://www.alljoyn.org" target="_blank">www.alljoyn.org</a>, <a href="http://www.alljoynappchallenge.com" target="_blank">www.alljoynappchallenge.com</a><br />
<em>Summary:</em> An ad-hoc and proximity based p2p framework.</p>
<p><a href="http://blog.ansuz.nl/index.php/2012/11/03/device-fragmentation-by-robin-puthli/"><strong>10.40 Device fragmentation</strong></a><br />
<em>Who:</em> Robin Puthli - Itude Mobile<br />
<em>What:</em> Mobile device fragmentation<br />
<em>Web:</em> <a href="http://www.itude.com" target="_blank">www.itude.com</a><br />
<em>Summary:</em> Fragmentation is an old problem. "There is no silver bullet. You have to pick and mix [from the available solutions]."</p>
<p><strong>11.15 Unify VoIP / MSG Core</strong><br />
<em>Who:</em> Martyn Davis - Voxygen<br />
<em>What:</em> Unify VoIP / MSG Core<br />
<em>Web:</em> <a href="http://www.voxygen.co.uk" target="_blank">www.voxygen.co.uk</a><br />
<em>Summary:</em> A paid for VoIP library written in C, using JSON messaging. Available for Android and iOS.</p>
<p><a href="http://blog.ansuz.nl/index.php/2012/11/03/introduction-to-polaris-by-cyril-mottier/"><strong>11.50 Polaris</strong></a><br />
<em>Who:</em> Cyril Mottier - Prixing<br />
<em>What:</em> An introduction to Polaris<br />
<em>Web:</em> <a href="http://www.github.com/cyrilmottier/Polaris" target="_blank">www.github.com/cyrilmottier/Polaris</a><br />
<em>Summary:</em> A (Google) maps library for Android. Adding a lot of useful features.</p>
<p><strong>13.25 Gradle</strong><br />
<em>Who:</em> Lukas Jarosh - And labs ?<br />
<em>What:</em> Gradle<br />
<em>Web:</em> -<br />
<em>Summary:</em> Gradle, a less verbose Maven alternative.</p>
<p><a href="http://blog.ansuz.nl/index.php/2012/11/03/opencv-for-android-by-erik-hellman/"><strong>14.30 OpenCV</strong></a><br />
<em>Who:</em> Eric - Sony<br />
<em>What:</em> OpenCV library<br />
<em>Web:</em> <a href="http://www.opencv.org" target="_blank">www.opencv.org</a><br />
<em>Summary:</em> Open source Computer Vision library, containing loads of modules and image (related) algorithms.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/10/25/droidcon-uk-day-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hardware accelerated Android emulator</title>
		<link>http://blog.ansuz.nl/index.php/2012/09/13/hardware-accelerated-android-emulator/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/09/13/hardware-accelerated-android-emulator/#comments</comments>
		<pubDate>Thu, 13 Sep 2012 18:20:52 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=375</guid>
		<description><![CDATA[A little gotcha when you "install" the "Intel Hardware Accelerated Execution Manager" using the SDK manager, it isn't actually installed and/or enabled. You need to do a little bit more: Install Extras/Intel Hardware Accelerated Execution Manager using the "Android SDK &#8230; <a href="http://blog.ansuz.nl/index.php/2012/09/13/hardware-accelerated-android-emulator/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A little gotcha when you "install" the "Intel Hardware Accelerated Execution Manager" using the SDK manager, it isn't actually installed and/or enabled. You need to do a little bit more:</p>
<ol>
<li>Install Extras/Intel Hardware Accelerated Execution Manager using the "Android SDK Manager"</li>
<li>Make sure "Intel x86 Atom System Image" in "Android 4.0.3 (API15)" is installed through the "Android SDK Manager" as well.</li>
<li>Really install hardware acceleration by running [Android SDK folder]\extras\intel\Hardware_Accelerated_Execution_Manager\IntelHaxm.exe</li>
<li>Update virtual device to use hardware acceleration in "AVD Manager":<br />
- Set "CPU/ABI:" to "Intel Atom (x86)"<br />
- Under "Hardware", add a new property "GPU Emulation" and set the value to "yes" (default is "no").</li>
<li>All done! Your hardware accelerated emulator is ready to launch</li>
</ol>
<p><em>Note:</em> Might not work with some libraries using JNI when they are built for ARM only.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/09/13/hardware-accelerated-android-emulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE9 and hidden Flash movies</title>
		<link>http://blog.ansuz.nl/index.php/2012/08/30/ie9-and-hidden-flash-movies/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/08/30/ie9-and-hidden-flash-movies/#comments</comments>
		<pubDate>Thu, 30 Aug 2012 08:26:12 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[HTML / CSS]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=370</guid>
		<description><![CDATA[Internet Explorer 9 (and Chrome sometimes as well) tries to be a little too smart and do too many things for you. The best example is removing the Flash movie from the DOM when you set its style to: display: &#8230; <a href="http://blog.ansuz.nl/index.php/2012/08/30/ie9-and-hidden-flash-movies/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Internet Explorer 9 (and Chrome sometimes as well) tries to be a little too smart and do too many things for you. The best example is removing the Flash movie from the DOM when you set its style to:</p>
<blockquote><p>display: none !important;.</p></blockquote>
<p>This small gotcha led to some headaches about why JS wasn't able to call methods (via the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.htmlhttp://" target="_blank">ExternalInterface</a>) on my Flash movie. As it turned out this way due to IE9 just completely removing the Flash movie from the DOM.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/08/30/ie9-and-hidden-flash-movies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Android hardware devices on Ubuntu</title>
		<link>http://blog.ansuz.nl/index.php/2012/06/14/using-android-hardware-devices-on-ubuntu/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/06/14/using-android-hardware-devices-on-ubuntu/#comments</comments>
		<pubDate>Thu, 14 Jun 2012 12:20:10 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=346</guid>
		<description><![CDATA[I've been working on some Android applications lately and switched to Ubuntu for this. It took a while to figure out how to set up USB debugging on Unbuntu, but the steps below worked nicely for me. sudo vi /etc/udev/rules.d/51-android.rules &#8230; <a href="http://blog.ansuz.nl/index.php/2012/06/14/using-android-hardware-devices-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I've been working on some Android applications lately and switched to Ubuntu for this. It took a while to figure out how to set up USB debugging on Unbuntu, but the steps below worked nicely for me.</p>
<ol>
<li>sudo vi /etc/udev/rules.d/51-android.rules</li>
<li>For each vendor add: SUBSYSTEM=="usb", ATTR{<a href="http://developer.android.com/guide/developing/device.html#VendorIds" target="_blank">idVendor</a>}=="0bb4", MODE="0666", GROUP="plugdev"</li>
<li>chmod a+rx /etc/udev/rules.d/51-android.rules</li>
<li>sudo restart udev</li>
<li>adb devices (your phone should be listed there)</li>
</ol>
<p>(Tested on Ubuntu 11)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/06/14/using-android-hardware-devices-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Player Debugger on Ubuntu</title>
		<link>http://blog.ansuz.nl/index.php/2012/06/06/flash-player-debugger-on-ubuntu/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/06/06/flash-player-debugger-on-ubuntu/#comments</comments>
		<pubDate>Wed, 06 Jun 2012 17:55:43 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=343</guid>
		<description><![CDATA[After having spent a good part of an hour on trying to install the Flash Player Debugger for FireFox on Ubuntu 11 64-bit, I found the following steps worked: sudo apt-get install nspluginwrapper copy libflashplayer.so (from debugger download) to /usr/lib/flashplugin-installer/ &#8230; <a href="http://blog.ansuz.nl/index.php/2012/06/06/flash-player-debugger-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After having spent a good part of an hour on trying to install the Flash Player Debugger for FireFox on Ubuntu 11 64-bit, I found the following steps worked:</p>
<ol>
<li>sudo apt-get install nspluginwrapper</li>
<li>copy libflashplayer.so (from <a href="http://www.adobe.com/support/flashplayer/downloads.html" target="_blank">debugger download</a>) to /usr/lib/flashplugin-installer/</li>
<li>sudo nspluginwrapper -i /usr/lib/flashplugin-installer/libflashplayer.so</li>
<li>restart FireFox</li>
</ol>
<p>Thanks to: <a href="http://askubuntu.com/questions/104723/how-to-install-debug-flash-player-11-1-on-64-bit" target="_blank">AskUbuntu.com</a>.</p>
<p>Don't forget to set up mm.cfg.</p>
<p>When all is done, run:</p>
<blockquote><p>tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/06/06/flash-player-debugger-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ant-Contrib for loop error</title>
		<link>http://blog.ansuz.nl/index.php/2012/03/14/ant-contrib-for-loop-error-2/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/03/14/ant-contrib-for-loop-error-2/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 20:56:21 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[ant-contrib]]></category>
		<category><![CDATA[contrib]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=326</guid>
		<description><![CDATA[When trying to use Ant-Contrib for loops today, I ran into the error below: BUILD FAILED C:\Projects\...\ant\build.xml:200: Problem: failed to create task or type for Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types &#8230; <a href="http://blog.ansuz.nl/index.php/2012/03/14/ant-contrib-for-loop-error-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When trying to use <a href="http://ant-contrib.sourceforge.net/tasks/tasks/for.html" target="_blank">Ant-Contrib for loops</a> today, I ran into the error below:</p>
<blockquote><p>BUILD FAILED<br />
C:\Projects\...\ant\build.xml:200: Problem: failed to create task or type for<br />
Cause: The name is undefined.<br />
Action: Check the spelling.<br />
Action: Check that any custom tasks/types have been declared.<br />
Action: Check that any &lt;presetdef&gt;/&lt;macrodef&gt; declarations have taken place.</p></blockquote>
<p>To fix the error I had to update the Ant-Contrib taskdef resource path from using "antcontrib.properties" to use "antlib.xml" in my Ant build file.</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-4">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Remove this line</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;taskdef resource=<span style="color:#CC0000;">"net/sf/antcontrib/antcontrib.properties&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">// And replace with this one</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0000;">&lt;taskdef resource="</span>net/sf/antcontrib/antlib.<span style="">xml</span><span style="color:#CC0000;">"&gt; </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>According to the <a href="http://ant-contrib.sourceforge.net/" target="_blank">Ant-Contrib</a> manual (found in [Ant-Contrib install dir]/docs/manual/index.html) you need to use the "antcontrib.properties" file when you want <a href="http://ant-contrib.sourceforge.net/" target="_blank">Ant-Contrib</a> to run with Ant Version 1.5. They even place a warning saying:</p>
<blockquote><p>Keep in mind that some tasks will not be available to you , such as the &lt;for&gt; task</p></blockquote>
<p>The confusing part is that on the <a href="http://ant-contrib.sourceforge.net/#install" target="_blank">project page</a> they tell you to use the "antcontrib.properties" file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/03/14/ant-contrib-for-loop-error-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recording the microphone</title>
		<link>http://blog.ansuz.nl/index.php/2012/03/04/recording-the-microphone/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/03/04/recording-the-microphone/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 18:53:25 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[microphone]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=291</guid>
		<description><![CDATA[Recording the microphone using AS3 is quite easy. Actually, storing the data or compressing it and sending it to a server is where it gets complicated. Normally, a Google search helps a lot when trying to find good information, but &#8230; <a href="http://blog.ansuz.nl/index.php/2012/03/04/recording-the-microphone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recording the microphone using AS3 is quite easy. Actually, storing the data or compressing it and sending it to a server is where it gets complicated. Normally, a Google search helps a lot when trying to find good information, but on this particular subject there seems to be a lot of misinformation. There are also a lot of libraries and / or frameworks available, but so far they didn't really do what I wanted to do or did it in a far too complicated way. I've provided a list of audio libraries I tried out at the bottom.</p>
<p><strong>Clearing things up</strong></p>
<p><strong></strong>When you record data from the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Microphone.html" target="_blank">microphone</a> using <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Microphone.html#event:sampleData" target="_blank">SampleDataEvents</a>, the actual data is (part of a) 32-bit floating point (Big Endian) 44.1 kHz mono <a href="http://en.wikipedia.org/wiki/Pulse_code_modulation" target="_blank">PCM</a> audio stream (assuming that you left the rate of the Microphone at its default of 44). To store the microphone input, all you need to do is append this data to a buffer.</p>
<p>To play back the microphone input you can use the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Sound.html" target="_blank">Sound class</a>. The Sound class can only deal with a 32-bit floating point 44.1 kHz stereo PCM audio stream as input. Lucky for us, we're almost there, we just need to convert mono into stereo. As you can see in the example below, creating (fake) stereo out of a mono signal is a matter of writing each sample twice.</p>
<p>The documentation for the Sound class shows an example of how to merge several Sounds into one using the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Sound.html#extract%28%29" target="_blank">extract method</a>. We can apply the same technique to play back our ByteArray using the Sound class:</p>
<div class="igBar"><span id="lcode-6"><a href="#" onclick="javascript:showPlainTxt('code-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-6">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// The buffer where we stored the microphone input.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">var playbackBuffer:ByteArray;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// The number of channels the buffer contains,</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// 1 means mono, 2 means stereo.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">var channels:int = <span style="color:#800000;color:#800000;">1</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">var outputSound:Sound = new Sound<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">outputSound.<span style="">addEventListener</span><span style="color:#006600; font-weight:bold;">&#40;</span>SampleDataEvent.<span style="">SAMPLE_DATA</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">outputSampleDataHandler<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">outputChannel = outputSound.<span style="">play</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">private function outputSampleDataHandler<span style="color:#006600; font-weight:bold;">&#40;</span>event:SampleDataEvent<span style="color:#006600; font-weight:bold;">&#41;</span>:void <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; for <span style="color:#006600; font-weight:bold;">&#40;</span>var i:int = <span style="color:#800000;color:#800000;">0</span>; i &lt;<span style="color:#800000;color:#800000;">8192</span> &amp;&amp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; playbackBuffer.<span style="">bytesAvailable</span>&gt; <span style="color:#800000;color:#800000;">2</span>; i++<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; var sample:Number = playbackBuffer.<span style="">readFloat</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; event.<span style="">data</span>.<span style="">writeFloat</span><span style="color:#006600; font-weight:bold;">&#40;</span>sample<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// Fake stereo as dual mono when the</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// original data is only 1 channel.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; if<span style="color:#006600; font-weight:bold;">&#40;</span>channels&gt; <span style="color:#800000;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event.<span style="">data</span>.<span style="">writeFloat</span><span style="color:#006600; font-weight:bold;">&#40;</span>sample<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The above seems simple enough, but when you want to save the data to a file, things get complicated. First you need to choose a file format in which to store the output. Secondly, if you want to reduce the amount of data to be saved, you need to choose a codec to compress the audio stream. When I was experimenting with MP3 encoding of my recorded data, I found out that the codec required the stream input to be a 16-bit signed integer with a sampling rate of 44.1 kHz. When you get into this territory, it helps to read up a bit about the techniques behind digital audio. I'll try to summarize some of the most useful things I learned.</p>
<p><strong>Pulse-code modulation (PCM)</strong></p>
<p><a href="http://en.wikipedia.org/wiki/Pulse_code_modulation" target="_blank">Pulse-code modulation</a> is a way of representing analog audio signal on a digital system by sampling the signal at a fixed interval. See 1) in the <a href="http://blog.ansuz.nl/tests/audio/pcm.png" target="_blank">image I created to explain some PCM examples</a>.</p>
<p>By keeping the same playback frequency, but adding more samples (using some form of interpolation), you slow down playback / lower the pitch (blue curve). The opposite is also true, remove samples and playback will speed up / the pitch is higher (red curve). See 2) in the <a href="http://blog.ansuz.nl/tests/audio/pcm.png" target="_blank">PCM examples image</a>.</p>
<p>If you multiply or divide the each sample by a fixed value, you increase or decrease the signal strength (green curve). See 3) in the <a href="http://blog.ansuz.nl/tests/audio/pcm.png" target="_blank">PCM examples image</a>. Keep in mind that multiplying or dividing could result in <a href="http://en.wikipedia.org/wiki/Clipping_%28audio%29" target="_blank">clipping</a> or complete cancellation of the signal if you overflow or underflow the bit depth precision.</p>
<p><strong>Sample rate conversion</strong></p>
<p>The <a href="http://en.wikipedia.org/wiki/Sampling_rate" target="_blank">sample rate</a> defines how many samples are taken of the analogue sound per second and is expressed in Hertz, for example, CDs have a sample rate of 44.1 kHz. The higher the sample rate, the better the quality. Other typical sample rates are 8, 11.025, 22.05 and 48 kHz.</p>
<p>There are two types of <a href="http://en.wikipedia.org/wiki/Sample_rate_conversion" target="_blank">sample rate conversion</a>, there is <a href="http://en.wikipedia.org/wiki/Upsampling" target="_blank">upsampling</a> and there is <a href="http://en.wikipedia.org/wiki/Downsampling" target="_blank">downsampling</a>.</p>
<p>It is usually easier (whether you are upsampling or downsampling) to first upsample (using <a href="http://en.wikipedia.org/wiki/Linear_interpolation" target="_blank">linear interpolation</a>) to the <a href="http://en.wikipedia.org/wiki/Least_common_multiple" target="_blank">least common multiple</a> (LCM) and then downsample to the required sample rate.</p>
<p>Generally speaking when you downsample an audio signal you can get away with duplicating a sample when upsampling to the LCM, most of the data will be dropped anyway as you downsample to the required sample rate.</p>
<p>Since sample rate conversion is quite CPU intensive, there are some shortcuts you can take to convert to a certain sample rate from another. Say you want to convert 44.1 kHz into 8 kHz, it seems a bit redundant to first upsample to 3528000 Hz (which is the LCM), and then downsample to 8 kHz. What you could do instead, is alternate between using every 5th and 6th sample (since 44.1 / 8 is roughly 5.5).</p>
<p><strong>Bit depth conversion</strong></p>
<p>The <a href="http://en.wikipedia.org/wiki/Audio_bit_depth" target="_blank">bit depth</a> determines granularity of a single sample, the higher the bit depth, the more accurate the sound can be represented. CDs have a bit depth of 16-bit, other typical bit depths are 8, 24 and 32.</p>
<p>Usually 8-bit audio streams are using unsigned integers, 16-bit ones are using signed integers and 32-bit streams use signed floating point. Knowing this it is quite straightforward to convert from one bit depth to the other, it's a matter of multiplication.</p>
<p><em>Note:</em> You may need to do some additional checks to make sure you aren't overflowing the available bits when doing the conversion.</p>
<p>When you understand the theory I just talked about, it becomes a lot easier to write the tools you need to convert audio from one bit rate to the other as well as changing between sample rates. It also gave me some ideas about some filters to implement, like a <a href="http://en.wikipedia.org/wiki/Audio_normalization" target="_blank">normalization</a> filter. To help you get started I've included some tips and references below.</p>
<p><strong>Tips</strong></p>
<ul>
<li>The Microphone.rate property accepts values of 44, 22, 11 and 8. These values actually represent 44100, 22050, 11025 and 8000 Hz.</li>
<li>The <a href="http://code.google.com/p/micrecorder/source/browse/trunk/MicRecorder/src/org/bytearray/micrecorder/encoder/WaveEncoder.as" target="_blank">WaveEncoder class</a> of the <a href="http://www.bytearray.org/?p=1858" target="_blank">MicRecorder library</a> comes in quite handy when you want to save your recorded audio. Keep in mind that the encode method expects the passed in data to be 32-bit and will convert it to 16-bit on the fly. This tripped me up a couple of times as I passed in a 16-bit audio stream and was surprised to find out that the saved WAV file just produced a lot of white noise. On my copy of this class, I added an additional check to the create method, to make sure that the 16-bit space wasn't being overflown when converting and multiplying by a _volume (multiplier) value.</li>
<li>When you want to output your recorded audio, make sure to keep the <a href="http://en.wikipedia.org/wiki/Endianness" target="_blank">Endianness </a>of your ByteArrays to Little Endian. I wondered countless times why playback of my ByteArray resulted in just noise, only to find out that I had forgotten about the Endianness of it.</li>
<li>Forget about the <a href="http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/media/Sound.html#loadCompressedDataFromByteArray()" target="_blank">loadCompressedDataFromByteArray</a> and <a href="http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/media/Sound.html#loadPCMFromByteArray()" target="_blank">loadPCMFromByteArray</a> methods in the Sound class for Flash Player 11. They just don't work, you'll get a sound playing, but the last set of bytes seem to loop forever when the audio stream should be finished.</li>
<li>If you want to see how the sound you produced actually looks like, you may want to download sofware like <a href="http://audacity.sourceforge.net/" target="_blank">Audacity</a>. This tool can give you a visual representation of the wave form as well as a lot of information about the file that you opened. When you open a raw audio stream, you can also flick the settings around to figure out what sampling rate and bit depth the stream is using.</li>
</ul>
<p><strong>Further reading</strong></p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Pulse_code_modulation" target="_blank">PCM</a></li>
<li><a href="http://en.wikipedia.org/wiki/Analog-to-digital_converter" target="_blank">ADC</a> / <a href="http://en.wikipedia.org/wiki/Digital-to-analog_converter" target="_blank">DAC</a></li>
<li><a href="https://ccrma.stanford.edu/courses/422/projects/WaveFormat/" target="_blank">WAV file format</a></li>
<li><a href="http://forums.adobe.com/thread/659903" target="_blank">AS3 Microphone Endianness</a></li>
</ul>
<p><strong>AS3 audio libraries</strong></p>
<ul>
<li><a href="https://github.com/kikko/Shine-MP3-Encoder-on-AS3-Alchemy" target="_blank">Shine MP3 encoder on Alchemy</a></li>
<li><a href="http://www.libspark.org/browser/as3/sazameki/trunk/src/" target="_blank">Sazameki</a> - audio manipulating library</li>
<li><a href="http://www.bytearray.org/?p=1858" target="_blank">MicRecorder</a>, <a href="http://code.google.com/p/micrecorder/source/browse/#svn%2Ftrunk%2FMicRecorder" target="_blank">Source</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/03/04/recording-the-microphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Alchemy on Windows7</title>
		<link>http://blog.ansuz.nl/index.php/2012/02/28/alchemy-on-windows7/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/02/28/alchemy-on-windows7/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 15:28:03 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[alchemy]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[gcc]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=287</guid>
		<description><![CDATA[Installing Adobe Alchemy on Windows7 wasn't as straightforward as the Adobe Labs site made me believe. The following error would keep on showing when I tried to run the example: $ gcc stringecho.c -O3 -Wall -swc -o stringecho.swc llvm-gcc.exe: error &#8230; <a href="http://blog.ansuz.nl/index.php/2012/02/28/alchemy-on-windows7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Installing Adobe Alchemy on Windows7 wasn't as straightforward as the Adobe Labs site made me believe.</p>
<p>The following error would keep on showing when I tried to run the example:</p>
<blockquote><p>$ gcc stringecho.c -O3 -Wall -swc -o stringecho.swc<br />
llvm-gcc.exe: error while loading shared libraries: ? ...</p></blockquote>
<p>I finally got it to work by using the steps below:</p>
<ol>
<li>Install the <a href="http://www.covergraph.com/blog/?p=367" target="_blank">Alchemy Repack</a>, from <a href="http://www.covergraph.com" target="_blank">www.covergraph.com</a> in a temporary directory (I just want to copy some of the files).</li>
<li>Download and install <a href="http://labs.adobe.com/technologies/alchemy/" target="_blank">Alchemy</a> from the Adobe website, as per their <a href="http://labs.adobe.com/wiki/index.php/Alchemy:Documentation:Getting_Started" target="_blank">instructions</a>.</li>
<li>Copy the "achacks", "avm2-libc", "bin" and "flashlibs" folders from your "Alchemy Repack" installation folder.</li>
<li>Uninstall / Delete Alchemy Repack</li>
<li>Good to go! <img src='http://blog.ansuz.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>(Optional:) Set the "CYGWIN=nodosfilewarning" environment variable option to avoid Cygwin warnings about MS-Dos style paths. (Unfortunately, this doesn't work for me, even though "echo ${CYGWIN}" prints "nodosfilewarning".)</li>
</ol>
<p>Note: If you already have Cygwin installed, you can install additional packages by running setup.exe again.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/02/28/alchemy-on-windows7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sound from ByteArray</title>
		<link>http://blog.ansuz.nl/index.php/2012/02/20/sound-from-bytearray/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/02/20/sound-from-bytearray/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 17:57:22 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Air]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[bytearray]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=285</guid>
		<description><![CDATA[While writing a quick test application to record microphone input and playing that same recording, I found out that playing back a ByteArray directly using the Sound class wasn't possible. Luckily a solution is never far away when doing a &#8230; <a href="http://blog.ansuz.nl/index.php/2012/02/20/sound-from-bytearray/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While writing a quick test application to record microphone input and playing that same recording, I found out that playing back a ByteArray directly using the Sound class wasn't possible. Luckily a solution is never far away when doing a Google search and it turns out that FlexibleFactory has a good solution: <a href="http://www.flexiblefactory.co.uk/flexible/?p=46" target="_blank">the MP3FileReferenceLoader lib</a>. With a bit of tweaking you can pass in a ByteArray directly and don't need to rely on a FileReference.</p>
<p>Good news though! As per Flash Player 11, the following 2 methods have been added to the (native) Sound class that can be used to achieve the same behaviour:</p>
<ul>
<li>Sound.loadCompressedDataFromByteArray(bytes:ByteArray, bytesLength:uint)</li>
<li>Sound.loadPCMFromByteArray(bytes:ByteArray, samples:uint, format:String = "float", stereo:Boolean = true, sampleRate:Number = 44100.0)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/02/20/sound-from-bytearray/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse Color Theme</title>
		<link>http://blog.ansuz.nl/index.php/2012/02/16/eclipse-color-theme/</link>
		<comments>http://blog.ansuz.nl/index.php/2012/02/16/eclipse-color-theme/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 11:39:56 +0000</pubDate>
		<dc:creator>Wijnand</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[color-scheme]]></category>
		<category><![CDATA[colour]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[FDT]]></category>
		<category><![CDATA[scheme]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://blog.ansuz.nl/?p=282</guid>
		<description><![CDATA[Seems like people have caught on to the need of being able to create and manage themes in Eclipse. The Eclipse Color Theme plugin does this very well and also works like a charm with FDT. Unfortunately this is still &#8230; <a href="http://blog.ansuz.nl/index.php/2012/02/16/eclipse-color-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Seems like people have caught on to the need of being able to create and manage themes in Eclipse. The <a href="http://marketplace.eclipse.org/content/eclipse-color-theme" target="_blank">Eclipse Color Theme</a> plugin does this very well and also works like a charm with FDT.</p>
<p>Unfortunately this is still only changing colors of the text editor and not the whole IDE.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ansuz.nl/index.php/2012/02/16/eclipse-color-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
