<?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: Microphone activityLevel in Flash</title>
	<atom:link href="http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/</link>
	<description>personal blog and portfolio website</description>
	<lastBuildDate>Fri, 20 Aug 2010 10:29:40 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Phillip Kerman</title>
		<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/comment-page-1/#comment-1942</link>
		<dc:creator>Phillip Kerman</dc:creator>
		<pubDate>Fri, 27 Nov 2009 19:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.rockabit.com/?p=133#comment-1942</guid>
		<description>Glad I searched for this one instead of banging my head against the wall--I was thinking about the old way to silence audio ( new Sound( instance ) ).  Now what I can&#039;t seem to figure out is how to ascertain which mic the user currently has selected.  That is, if the user selects their second mic and then visits your application I can&#039;t find a way to show selected (in my combo box listing all mics) their current mic selection.  

My current hack is to just set their mic to the first index--which is annoying to the user who may have already selected the second mic.

Any clue?   Thanks!</description>
		<content:encoded><![CDATA[<p>Glad I searched for this one instead of banging my head against the wall&#8211;I was thinking about the old way to silence audio ( new Sound( instance ) ).  Now what I can&#8217;t seem to figure out is how to ascertain which mic the user currently has selected.  That is, if the user selects their second mic and then visits your application I can&#8217;t find a way to show selected (in my combo box listing all mics) their current mic selection.  </p>
<p>My current hack is to just set their mic to the first index&#8211;which is annoying to the user who may have already selected the second mic.</p>
<p>Any clue?   Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/comment-page-1/#comment-1908</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 17 Sep 2009 06:52:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.rockabit.com/?p=133#comment-1908</guid>
		<description>If it were actually a question of security (which I can well imagine), than I would expect to see the security warning trying to connect to the mic rather than when I set the loopback property.
Which is exactly what happens by the way, so why the necessity of using loopback to be able to read the volume? It&#039;s just weird...</description>
		<content:encoded><![CDATA[<p>If it were actually a question of security (which I can well imagine), than I would expect to see the security warning trying to connect to the mic rather than when I set the loopback property.<br />
Which is exactly what happens by the way, so why the necessity of using loopback to be able to read the volume? It&#8217;s just weird&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ousama</title>
		<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/comment-page-1/#comment-1907</link>
		<dc:creator>Ousama</dc:creator>
		<pubDate>Wed, 16 Sep 2009 17:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.rockabit.com/?p=133#comment-1907</guid>
		<description>Thanks for this. I ran into the same issue yesterday. I wonder if it&#039;s a security issue - setLoopBack triggers the security warning for microphone use.  Maybe Flash doesn&#039;t want to risk being used to detect the activityLevel for users who haven&#039;t yet accepted the security dialog.</description>
		<content:encoded><![CDATA[<p>Thanks for this. I ran into the same issue yesterday. I wonder if it&#8217;s a security issue &#8211; setLoopBack triggers the security warning for microphone use.  Maybe Flash doesn&#8217;t want to risk being used to detect the activityLevel for users who haven&#8217;t yet accepted the security dialog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/comment-page-1/#comment-1870</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Mon, 13 Jul 2009 15:43:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.rockabit.com/?p=133#comment-1870</guid>
		<description>How counterintuitive.  I don&#039;t see any mention of setLoopback as applied to activityLevel in the Adobe docs.  I was checking activityLevel and getting -1, and the docs simply said that the microphone wasn&#039;t available because I hadn&#039;t called getMicrophone() yet...how did I get the microphone instance to check the activity level then?!...ridiculous.

Anyway, thank you very much for posting this information.</description>
		<content:encoded><![CDATA[<p>How counterintuitive.  I don&#8217;t see any mention of setLoopback as applied to activityLevel in the Adobe docs.  I was checking activityLevel and getting -1, and the docs simply said that the microphone wasn&#8217;t available because I hadn&#8217;t called getMicrophone() yet&#8230;how did I get the microphone instance to check the activity level then?!&#8230;ridiculous.</p>
<p>Anyway, thank you very much for posting this information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Micro Application: Proto 05 &#171; Interaction Design Project Blog</title>
		<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/comment-page-1/#comment-1852</link>
		<dc:creator>Micro Application: Proto 05 &#171; Interaction Design Project Blog</dc:creator>
		<pubDate>Tue, 10 Mar 2009 19:57:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.rockabit.com/?p=133#comment-1852</guid>
		<description>[...] to calculate a mic input value and drive the animations accordingly. Also check out this posting on www.rockabit.com Possibly related posts: (automatically generated)Wanted Weapons of Fate gets Hollywood voice talent [...]</description>
		<content:encoded><![CDATA[<p>[...] to calculate a mic input value and drive the animations accordingly. Also check out this posting on <a href="http://www.rockabit.com" rel="nofollow">http://www.rockabit.com</a> Possibly related posts: (automatically generated)Wanted Weapons of Fate gets Hollywood voice talent [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/comment-page-1/#comment-1846</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 10 Feb 2009 08:55:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.rockabit.com/?p=133#comment-1846</guid>
		<description>It seems to me that the first thing that could go wrong is that you&#039;re using Microphone.get(); instead of Microphone.getMicrophone();

In the AS3 language reference (http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html) you can find a basic connection example at the bottom of the page.
I used this code to start up the microphone:

mic = Microphone.getMicrophone();
				
if (mic != null)
{
	mic.addEventListener(StatusEvent.STATUS, handleStatus);
	if (!mic.muted)
	{
		connectMic();
	}
	else
	{
		Security.showSettings(SecurityPanel.PRIVACY);
	}
}

The handleStatus() and connectMic() methods look like this:

private function handleStatus(event : StatusEvent) : void 
{
	if (event.code == &quot;Microphone.Unmuted&quot;)
	{
		mic.removeEventListener(StatusEvent.STATUS, handleStatus);
		connectMic();
	}
}
		
private function connectMic() : void
{
	mic.setLoopBack(true);
	mic.soundTransform = new SoundTransform(0, 0);
}


This should do the trick. I think your soundTransform may not work because you&#039;re retrieving mic.SoundTransform and not mic.soundTransform (lowercase &#039;s&#039;). But maybe the mic doesn&#039;t even have a soundTransform instance here just yet. I simply create a new one and assign it to the microphone instead of trying to adjust the existing one. Work like a charm :)

Furthermore, the language reference tells you the following: &quot;To prevent the microphone from detecting sound at all, pass a value of 100 for silenceLevel  ; the activity  event is never dispatched.&quot;
I can see you are setting the silenceLevel to 100, which would prevent any response.

I think with these changes you should be able to fix it.
Good luck!</description>
		<content:encoded><![CDATA[<p>It seems to me that the first thing that could go wrong is that you&#8217;re using Microphone.get(); instead of Microphone.getMicrophone();</p>
<p>In the AS3 language reference (<a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html" rel="nofollow">http://help.adobe.com/en_US/AS3LCR/Flash_10.0/index.html</a>) you can find a basic connection example at the bottom of the page.<br />
I used this code to start up the microphone:</p>
<p>mic = Microphone.getMicrophone();</p>
<p>if (mic != null)<br />
{<br />
	mic.addEventListener(StatusEvent.STATUS, handleStatus);<br />
	if (!mic.muted)<br />
	{<br />
		connectMic();<br />
	}<br />
	else<br />
	{<br />
		Security.showSettings(SecurityPanel.PRIVACY);<br />
	}<br />
}</p>
<p>The handleStatus() and connectMic() methods look like this:</p>
<p>private function handleStatus(event : StatusEvent) : void<br />
{<br />
	if (event.code == &#8220;Microphone.Unmuted&#8221;)<br />
	{<br />
		mic.removeEventListener(StatusEvent.STATUS, handleStatus);<br />
		connectMic();<br />
	}<br />
}</p>
<p>private function connectMic() : void<br />
{<br />
	mic.setLoopBack(true);<br />
	mic.soundTransform = new SoundTransform(0, 0);<br />
}</p>
<p>This should do the trick. I think your soundTransform may not work because you&#8217;re retrieving mic.SoundTransform and not mic.soundTransform (lowercase &#8217;s&#8217;). But maybe the mic doesn&#8217;t even have a soundTransform instance here just yet. I simply create a new one and assign it to the microphone instead of trying to adjust the existing one. Work like a charm <img src='http://www.rockabit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Furthermore, the language reference tells you the following: &#8220;To prevent the microphone from detecting sound at all, pass a value of 100 for silenceLevel  ; the activity  event is never dispatched.&#8221;<br />
I can see you are setting the silenceLevel to 100, which would prevent any response.</p>
<p>I think with these changes you should be able to fix it.<br />
Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tj New</title>
		<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/comment-page-1/#comment-1845</link>
		<dc:creator>Tj New</dc:creator>
		<pubDate>Tue, 10 Feb 2009 02:53:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.rockabit.com/?p=133#comment-1845</guid>
		<description>So I have recently been on a search to do the same. That is to have a mic input and display graphics with no sound output.And have succeeded until the last bit,I tryed setting the soundTransform property to zero.
Heres what Ive got sofar

 m = Microphone.get();
attachAudio(m);
microphone.gain = 50;
mic.rate =12;
mic.setUseEchoSuppression(true);
mic.setLoopBack(true);
mic.setSilenceLevel(100);
soundTransform = mic.SoundTransform;
trans.volume = 0;
mic.soundTransform = trans;

onEnterFrame = function () {
	circle._xscale = circle._yscale = m.activityLevel+10;
};

I was wondering if you could could help me out and tell me what went wrong.Thanks much
Tj New</description>
		<content:encoded><![CDATA[<p>So I have recently been on a search to do the same. That is to have a mic input and display graphics with no sound output.And have succeeded until the last bit,I tryed setting the soundTransform property to zero.<br />
Heres what Ive got sofar</p>
<p> m = Microphone.get();<br />
attachAudio(m);<br />
microphone.gain = 50;<br />
mic.rate =12;<br />
mic.setUseEchoSuppression(true);<br />
mic.setLoopBack(true);<br />
mic.setSilenceLevel(100);<br />
soundTransform = mic.SoundTransform;<br />
trans.volume = 0;<br />
mic.soundTransform = trans;</p>
<p>onEnterFrame = function () {<br />
	circle._xscale = circle._yscale = m.activityLevel+10;<br />
};</p>
<p>I was wondering if you could could help me out and tell me what went wrong.Thanks much<br />
Tj New</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/comment-page-1/#comment-1843</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 02 Feb 2009 08:44:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.rockabit.com/?p=133#comment-1843</guid>
		<description>Honestly, I haven&#039;t implemented microphone input frequency analysis, but it can be done by using the Flash Media Server (if money is of no importance in your life) or an open source server such as Red5, and write your own service to pass back frequency information. That way you can have the server do the analysis and minimize the amount of data to be sent over the line.</description>
		<content:encoded><![CDATA[<p>Honestly, I haven&#8217;t implemented microphone input frequency analysis, but it can be done by using the Flash Media Server (if money is of no importance in your life) or an open source server such as Red5, and write your own service to pass back frequency information. That way you can have the server do the analysis and minimize the amount of data to be sent over the line.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vamoss</title>
		<link>http://www.rockabit.com/2009/01/14/microphone-activitylevel-in-flash/comment-page-1/#comment-1842</link>
		<dc:creator>Vamoss</dc:creator>
		<pubDate>Mon, 02 Feb 2009 00:01:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.rockabit.com/?p=133#comment-1842</guid>
		<description>Good article, I&#039;m trying to analise the frequense of microphone too.

Check this forum to see my progress[pt]:
http://flashmasters.net/forum/index.php?topic=49403.0

If you have some sources, i will apreciate to contribute to this.

Thanks,
Vamoss</description>
		<content:encoded><![CDATA[<p>Good article, I&#8217;m trying to analise the frequense of microphone too.</p>
<p>Check this forum to see my progress[pt]:<br />
<a href="http://flashmasters.net/forum/index.php?topic=49403.0" rel="nofollow">http://flashmasters.net/forum/index.php?topic=49403.0</a></p>
<p>If you have some sources, i will apreciate to contribute to this.</p>
<p>Thanks,<br />
Vamoss</p>
]]></content:encoded>
	</item>
</channel>
</rss>
