<?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: Flash Player 10 Sound API changes, SampleData and SampleDataEvent</title>
	<atom:link href="http://www.blixtsystems.com/2008/07/flash-player-10-sound-api-changes-sampledata-and-sampledataevent/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blixtsystems.com/2008/07/flash-player-10-sound-api-changes-sampledata-and-sampledataevent/</link>
	<description></description>
	<lastBuildDate>Fri, 13 Jan 2012 15:32:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
	<item>
		<title>By: Leo</title>
		<link>http://www.blixtsystems.com/2008/07/flash-player-10-sound-api-changes-sampledata-and-sampledataevent/comment-page-1/#comment-37799</link>
		<dc:creator>Leo</dc:creator>
		<pubDate>Fri, 27 Aug 2010 14:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.blixtsystems.com/?p=47#comment-37799</guid>
		<description>Unfortunately the Sound object does not have any other way of assigning data to it than the Sound.load method. And Sound.load expects either an mp3 or swf.

What you need to do is to create a virtual swf in memory and load that using Loader.loadBytes.
Here is an article explaining the process http://dotbrighton.org/?p=9

If you want to stream the data I guess you could use the above method to create swf&#039;s each time a small chunk of data has been received. Then you use Sound.extract to get the 32 bit PCM data from those virtual swf&#039;s and send that to the output buffer on the SampleDataEvent. Not a very neat solution, but if you cannot do anything about the source format it&#039;s the only option I can think of.</description>
		<content:encoded><![CDATA[<p>Unfortunately the Sound object does not have any other way of assigning data to it than the Sound.load method. And Sound.load expects either an mp3 or swf.</p>
<p>What you need to do is to create a virtual swf in memory and load that using Loader.loadBytes.<br />
Here is an article explaining the process <a href="http://dotbrighton.org/?p=9" rel="nofollow">http://dotbrighton.org/?p=9</a></p>
<p>If you want to stream the data I guess you could use the above method to create swf&#8217;s each time a small chunk of data has been received. Then you use Sound.extract to get the 32 bit PCM data from those virtual swf&#8217;s and send that to the output buffer on the SampleDataEvent. Not a very neat solution, but if you cannot do anything about the source format it&#8217;s the only option I can think of.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: patchdev</title>
		<link>http://www.blixtsystems.com/2008/07/flash-player-10-sound-api-changes-sampledata-and-sampledataevent/comment-page-1/#comment-37798</link>
		<dc:creator>patchdev</dc:creator>
		<pubDate>Fri, 27 Aug 2010 13:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.blixtsystems.com/?p=47#comment-37798</guid>
		<description>Dear sir:

May I ask you a question about PCM data?

I want to play the PCM data from server, and the server constinously push PCM data to me, and I put those data into ByteArray, then assign Sound.souce = ByteArray.

But one question, the PCM data from server,that is 8000 rate, 16 bit size, one channel, it is not the correct format flash player needs, do you know how I can solve this proble. Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Dear sir:</p>
<p>May I ask you a question about PCM data?</p>
<p>I want to play the PCM data from server, and the server constinously push PCM data to me, and I put those data into ByteArray, then assign Sound.souce = ByteArray.</p>
<p>But one question, the PCM data from server,that is 8000 rate, 16 bit size, one channel, it is not the correct format flash player needs, do you know how I can solve this proble. Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leo</title>
		<link>http://www.blixtsystems.com/2008/07/flash-player-10-sound-api-changes-sampledata-and-sampledataevent/comment-page-1/#comment-20170</link>
		<dc:creator>Leo</dc:creator>
		<pubDate>Thu, 02 Apr 2009 17:51:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.blixtsystems.com/?p=47#comment-20170</guid>
		<description>Hi Paul,

I guess you might have found a solution by now, but audio generated in the flash player will be 32bit floating-point PCM data.
That is a bit heavy to send directly to server if the duration is not very short, so ideally you have to convert it to 16 bit fixed-point first. If quality is a big concern one should also apply dithering at that stage to reduce quantization error.
When you have the PCM data in the desired bitdepth you just add headers to make it into a wav.</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>I guess you might have found a solution by now, but audio generated in the flash player will be 32bit floating-point PCM data.<br />
That is a bit heavy to send directly to server if the duration is not very short, so ideally you have to convert it to 16 bit fixed-point first. If quality is a big concern one should also apply dithering at that stage to reduce quantization error.<br />
When you have the PCM data in the desired bitdepth you just add headers to make it into a wav.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.blixtsystems.com/2008/07/flash-player-10-sound-api-changes-sampledata-and-sampledataevent/comment-page-1/#comment-19225</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Tue, 17 Mar 2009 21:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.blixtsystems.com/?p=47#comment-19225</guid>
		<description>Thanks for this useful information, by the way: 

I want to generate a chord using a couple of sin waves which is simple. But, can I generate a WAV/AIFF file too?... would that be too much ?

I&#039;d love to redirecting the stream to a file (instead of being played). 

Thanks in advance,
Paul</description>
		<content:encoded><![CDATA[<p>Thanks for this useful information, by the way: </p>
<p>I want to generate a chord using a couple of sin waves which is simple. But, can I generate a WAV/AIFF file too?&#8230; would that be too much ?</p>
<p>I&#8217;d love to redirecting the stream to a file (instead of being played). </p>
<p>Thanks in advance,<br />
Paul</p>
]]></content:encoded>
	</item>
</channel>
</rss>

