Microphone Activity Level at -1 even though Microphone.getMicrophone() is called, why?

Hi There,
I'm setting up an application where I need to record users' voice every so often during the course of the users' interaction with the application.  Recording is fine, and the quality is fine, but now my issue is understandng how Flash handles the microphone when it gets attached to a stream for publishing.
Basically, the problem is that when I "publish" my stream, the voice gets cut off (clipped) at the beginning.  So, I initially thought this may have to do with buffer settings on the FMS server side, but it wasn't.  Then I investigated client side stuff.  For some reason, my internal mic .activityLevel property is -1 even though I have called Microphone.getMicrophone().  According to Flash's documentation, this shouldn't be the case:
activityLevel    property
activityLevel:Number  [read-only]
Language Version :     ActionScript 3.0
Player Version :     Flash Player 9
The amount of sound the microphone is detecting. Values range from 0 (no sound is detected) to 100 (very loud sound is detected). The value of this property can help you determine a good value to pass to the Microphone.setSilenceLevel() method.
If the microphone is available but is not yet being used because Microphone.getMicrophone() has not been called, this property is set to -1.
Okay, I understand that fine.  So, here is my code.  I am using a timer to investigate the microphone .activityLevel property every 50 milliseconds:
package
    import fl.controls.Button;
    import fl.controls.TextInput;
    import flash.display.Sprite;
    import flash.net.NetConnection;
    import flash.net.NetStream;
    import flash.events.NetStatusEvent;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.media.Microphone;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    public class MinRecord extends Sprite
          private var nc:NetConnection;
          private var ns:NetStream;
          private var rtmpNow:String;
          private var msg:Boolean;
          private var mic:Microphone;
          private var recordBtn:Button;
          private var stopBtn:Button;
          private var textInput:TextInput;
       private var micTimer:Timer = new Timer(50, 0);
       private var recTimer:Timer = new Timer(4000, 1);
       private var recID:String = "userVoc";
       private var recording:Boolean = true;
          //Constructor
          function MinRecord ()
            nc=new NetConnection();
               nc.addEventListener (NetStatusEvent.NET_STATUS,checkConnect);
               rtmpNow="rtmp://www.fmsurl.tv/app";
               nc.connect(rtmpNow);
            mic = Microphone.getMicrophone();
            micTimer.addEventListener(TimerEvent.TIMER, showMicData);
            recTimer.addEventListener(TimerEvent.TIMER, recVoice);
            recTimer.start();
       private function showMicData(e:Event):void
            trace( mic.name + "Level: " + mic.activityLevel); 
       private function recVoice(e:TimerEvent):void
          ns.close();               
          private function addMedia():void
             mic.rate = 22;
          private function checkConnect (e:NetStatusEvent):void
               msg=(e.info.code=="NetConnection.Connect.Success");
               if (msg)
                     ns = new NetStream(nc);
                      addMedia();
               startRecord();
          private function startRecord():void
            trace("Start recording process");
               if (ns)
               micTimer.start();
                     ns.attachAudio(mic);
                     ns.publish(recID,"record");
               trace("Speak for file:" + recID + ".flv");
          private function stopRecord ():void
               ns.close ();
Here are the trace statements from my output window when I run this program.  My question is why the level is at -1 at the time of publising the stream?  I already called everything I needed to in order for the client machine to attach mic data to the published stream.  I'm at a loss here.  I want to be sure that the user's voice does not get clipped at the start.
Start recording process
Speak for voice file:userVoc.flv
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: -1
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 4
Built-in MicrophoneLevel: 6
Built-in MicrophoneLevel: 5
Built-in MicrophoneLevel: 6
Built-in MicrophoneLevel: 8
Built-in MicrophoneLevel: 9
Built-in MicrophoneLevel: 12
Built-in MicrophoneLevel: 12
Built-in MicrophoneLevel: 10
Built-in MicrophoneLevel: 9
Built-in MicrophoneLevel: 7
Built-in MicrophoneLevel: 7
Built-in MicrophoneLevel: 5
Built-in MicrophoneLevel: 2
Built-in MicrophoneLevel: 3
Built-in MicrophoneLevel: 1
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0
Built-in MicrophoneLevel: 0

Okay, after more investigation, I'm still getting clipped audio recordings even when the silence level is traced as 0 instead of -1.  Has anybody ever had the problem of clipped audio recordings after attaching mic data to a publishing stream?  Any tips as to how I might fix this?

Similar Messages

  • MozCancelFullScreen() not working and firefox not exiting fullscreen even though this function was called on document

    I have a container which gets into full screen mode using mozRequestFullScreen() API but I want to get back to non-fullscreen mode after one of my custom event is fired.
    As soon as my custom event is fired, I call mozCancelFullScreen() API to exit full screen but this seems to be not working. Firefox is not exiting fullscreen even though this function was called on document.
    I have to press "Esc" to get into non-fullscreen mode.
    I am uding Firefox 21.0 version.

    Hi visionmax, could you post a link to your page, or create a demo on http://jsfiddle.net/ ?

  • Agent ready Radio button remains selected even though agent is on call.

    Hi
    issue
    Agent logsin to Interacton center and system by default puts him in to NOT Ready Status.
    Agent changes the status from Not ready to Ready.
    Agent receives a call via queue
    Agent accepts call via interaction center
    Ready Radio button reamins selected even though customer care agent is on phone with Customer.
    In idle situation the radio button should move from ready to not ready or any other state.
    Landscape : SAP CRM  / AMC MCIS / CISCO IPCC.
    we did our system restarts still issue is not resolved.
    Has anyone ever noticed this issue.
    any Help or guidnace is really appreciated.  Thanks in advance
    Regards

    Hi Alok,
    That behavior may be just how your CMS and Telephony system behaves. In all likelihood you are not going to get a queued call at that point, since you already are on a queued call. As long as the state display is correct once the call is ended, that is the most important thing. I have seen some telephony systems where even the hard phone shows ready during the call, and doesn't change modes until after the call is ended. Anyway, you should check with your CMS vendor - in this case AMC MCIS.
    Sincerely,
    Glenn
    Glenn Abel
    Covington Creative
    www.covingtoncreative.com

  • After updating to 3.6.18, all add-on buttons have disappeared, even though they show enabled. Why?

    Menu items for add-ons, such as Delicious and Evernote are working, but there are no buttons on the toolbar. Those that buttons only and don't have menus or menu items simply do not show up at all, even though they are showing as enabled. This includes all those listed below:
    Delicious
    Feedly
    Evernote
    Amplify
    Morning Coffee
    Operating System is Windows 2000 (Compatibility Report Shows Windows NT 5.0)

    There may be a problem with one of the files that stores details on installed extensions. Try deleting the files as shown in the "Corrupt extension files" section of this link - https://support.mozilla.com/kb/Unable+to+install+add-ons
    If one of the files listed is corrupt it can cause problems with extensions not working even if they appear to be installed.

  • TS1292 Yes I need help activating my card again even though its activated

    my iTunes card needs to be activated

    If it's activated then it shouldn't need activating again - you should be able to redeem it onto your account.
    If it hasn't been activated then are you able to take the card back to the store that you bought it from so that they can activate it properly ? If not then you can try contacting iTunes Support (you will probably need to give them images of the front and back of the card and your receipt) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then iTunes Cards And Codes

  • Auto level control working even though unchecked?

    Greetings,
    One of my singers is cutting tracks for me using GB 6.0.5. He has the Automatic Level Control checkbox unchecked, but says that the volume slider is still moving all over the place as he sings.  Any idea what could be causing this?
    Thanks,
    DM

    That slider should indeed only move with " Automatic Level Control" enabled; perhaps the preferences file is corrupted. Try HangTime's cure for "Oddball" problems and remove the GarageBand preferences and repair permissions:
    http://www.bulletsandbones.com/GB/FAQPages/OddBallProbs.html
    Regards
    Léonie
    P.S.
    Are you using Mac OS X Lion  or later? Then your user library is hidden. You open it best from the Finder's "Go" menu, from the main menu bar:
         Go  > Go to folder           then hold down the alt/option key until the library appears in the drop down menu. Select it to open.

  • Compressor 4.0 VERY slow - even though I am using Qmaster, why?

    I am using Compressor 4.0.7 and found the threads on QMaster clusters to get it to speed up.
    I looked at my activity monitor and now see that its using about 98% of my CPU and all but 2Gb of my available RAM.   So in theory I've got it to use best settings.
    However, it has not sped up the process much and I'm still looking at 12 hrs to convert a 40 minute file to MP4 (settings below).
    Yes, it is converting a 720x480 source to 640x480 square pixel destination, but it should no way take this long.
    Is it because "frame controls" are on?   Should I upgrade to 4.1 to see if that works better?
    Name: JLOT - setting 1 640x480 1500bps
    Description: H.264 for Broadband at 5 Mbps
    File Extension: mp4
    Estimated size: 680.08 MB
    Video Encoder
              Width: 640
              Height: 480
              Pixel aspect ratio: Square
              Crop: None
              Padding: None
              Frame rate: (100% of source)
                        Selected: 29.97
              Frame Controls On:
                        Retiming: (Fast) Nearest Frame
                        Resize Filter: Linear Filter
                        Deinterlace Filter: Best (Motion Compensated)
                        Adaptive Details: Off
                        Antialias: 0
                        Detail Level: 0
                        Field Output: Same as Source
              Codec Type: MPEG-4 Video
              Multi-pass: Off, frame reorder: Off
              Pixel depth: 32
              Spatial quality: 75
              Min. Spatial quality: 75
              Key frame interval: 90
              Temporal quality: 75
              Min. temporal quality: 75
              Average data rate: 1.5 (Mbps)
              Video: MPEG-4 improved
    Enhanced Podcast: Off
    Compatible with Mac and PC

    Thanks Russ,
    Here are those details:
    OSX 10.8.5,  3.4Ghz Core i7, 8GB memory
    4.1 is WAy different to 4.0, would the customs settings all port OK?   And do you have to pay for a 4.1 upgrade or not?
    My CPU is maxed out but still, its slow.

  • Sim ring to mobile even though there is no call fwd/sim ring setup

    Hi Guys,
    This is a wierd one.
    One of the user in our firm got a new laptop with profile carried across. Since after, she is complaining that the calls gets fwded to her mobile after 15 sec.
    I deleted Lync cache/sip folder and registry settings but no change. User had Lync mobile app installed on her phone which I asked her to delete. So after all this cleaning of Lync local setting, I asked user to restart the machine.
    I noticed that her Lync status in outlook was still showing "active on mobile" when her Lync was closed/machine was restarting. Not sure from where is Lync getting these settings from??
    User does not have any other device with Lync mobile app on it. 
    Any thoughts guys?
    Regards
    Aman
    aman sahni

    Hi!
    Sefautil can be used to edit users settings. I use to verify and change the users who has incorrectly formated forward numbers.
    For delegates you can look here:
    http://blogs.msdn.com/b/ramblingsfromthefield/archive/2014/11/14/using-sefautil-to-manage-users-delegates.aspx
    About the signout and phantom logins on mobile I found out that if you have a version of Lync installed
    and running on your mobile and then get a new version of Lync you dont get correctly signed out when the client is upgrade so after I had upgraded I had two endpoints registered when I ran this script:
    https://gallery.technet.microsoft.com/office/List-last-time-a-User-b905cf5f
    The endpoint will eventually timeout. You can see when if you run the script.

  • I have an Apple ID, a game centre account and an app but when I try to log into FaceTime or iMessage it says I need to verify my email address even though I already have. Why?

    Please help me!!

    I dunno if this will work for you but I had the same issue today and had to redo what I did about two weeks ago.
    I went to "Settings" then to "General" and scrolled all the way done to "Reset"
    I didnt do a reset that erased data, just the ipad settings.
    I had to re-enter all my wifi stuff but after trying to log back into facetime it worked fine.
    It's a pain in the arse (second time I've had to do this in a couple of weeks) but it worked for me, Good Luck

  • After I use Siri the volume on my keyboard is all the way up and I can't hear the keyboard clicks even though keyboard clicks is on why does this happen after I use siri

    I need answers people please!!!!!!!!!!!!!!!!!!

    It sounds to me like your keyboard has been damaged and needs to be repaired or replaced.  Can you try an external keyboard?

  • I didn't update my phone 4s or my iPad 3 to iOS 8, so why are they not loading anything and telling me that i need a wi-fi connection even though it's connected

    I didn't update my iPhone 4s or my iPad 3 to the iOS 8 and neither one will load anything, the iPad tells me I need a wi-fi connection even though it's connected. Why am I having this trouble? I can't update any apps, load Facebook or safari. Help

    Hey ramonafromtuttle,
    Thanks for the question. After reviewing your post, it sounds like you are having difficulty with Wi-Fi. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    iOS: Troubleshooting Wi-Fi networks and connections
    Restart your iOS device.
    Tap Settings > Wi-Fi and locate the Wi-Fi network to which you're connected.
    Tap  and Forget this Network.
    Try to connect to your desired Wi-Fi network. Note: You may need to enter your Wi-Fi password again if your network requires one.
    Turn your Wi-Fi router off and on2. If your ISP also provides cable or phone service, check with them before attempting this step to avoid interruption of service.
    Update your device to the latest version of software.
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • When I go to turn up or down my volume it says I'm plugged into headphones even when I'm not. Why would that be?

    Today I was FaceTiming my friend and all of a sudden my volume wasn't working I went to turn up my volume and it said I was plugged into headphones even though I wasn't. Why would that be?

    Hello, more than likely the switch inside the headphone port is stuck open. Try looking inside the port, do you see any foreign material; lint, dirt, etc? If so try to remove it by blowing it out. If nothing appears to be in the port try plugging and unplugging the headphone jack quickly several times to unblock the switch and/or clear the contacts. If still no joy try a reset, or Reset All Settings. If still nothing try restoring from backup or restore to new. Just make sure you backup your iPod before restoring or you will loose stuff. If problem continues contact Apple Genius Bar and have your iPod evaluated. Good luck, Cheers.

  • My ipad3 asks to be activated even though I've had it for months

    I've had my ipad3 for months now. I activated it when I first got it. Last night I've left it to charge and this morning it keeps asking me for activation. I'm an apple iOS developer and I've had iOS 6 Beta on it for a while. I believe I did update it to the latest one when iOS 6 became available. When connecting to iTunes it says that "version of ipad software (6.0) is the current version" however when I hook up my iPad3 to iTunes I get the warning "The software on iPad has expired and must be updated to a newer version". Then iTunes reports it can't back up the iPad as session could not be started with it. But then when I click on Check for update button in iTunes it keeps reporting I have current version (so I guess no update is available)... its rather vicious cycle... cmon guys - get it together. What am I to do right now? I've been using my device so far with no problems. It started happening this morning for the first time. My device seems in wierd state now. When I try activating it (even though why should I? I've done it months ago) it reports back that "Your iPad could not be activated because activation server is temporarily unavailable..." what the heck?

    First - your entire post didn't provide any value of any sort apart from getting you up the ladder with your Level 10 points
    The upgrade process, whether its Beta or not, should be simplified. With Apple focusing on user experience in many areas, this Beta upgrade process is seriously stuck in the toilet. Having to Restore the device because the algorithm can't detect that released 6.0 version is not an upgrade for Beta 6.0 is probably because that "if ()" condition was coded by toddlers. The system should notice minor build difference and allow user to download latest version just like with any other type of upgrade. This upgrade flow was designed by the same team that created new Apple Maps... Jeez...

  • Credit Management-Sales value updated in FD32 even though credit set up is not active

    Dear Team,
    We are facing an issue where, for a sample order - sales value got updated as open sales order value against a customer in FD33.
    Credit set up is not active for the sales order type (OVAK) or the delivery type (OVAD). Since this has occurred in 2003, we have no clue what exactly has happened. We cannot locate any change logs in the configuration level.
    1) What is the possibility for credit management to be active for a document type, which was not meant for credit set up?
    2) How to remove the open order/ delivery value for the customer?
    Thanks and regards.
    Sivarajesh

    Credit set up is not active for the sales order type (OVAK) or the delivery type (OVAD).
    the above two settings  are credit checks at what level( example order level or delivery etc) you what to block the customer if the customer payer exceeds the credit limit.
    Where as if the credit active field is active in VOV7 in corresponding item category, system update the respective document values in to credit management (FD32/33) in your example open order value.
    Even though OVAK, OVAD settings are not done still system update the document values in to FD33 subject to credit active field is active in t code VOV7 .
    Please check in your item category whether credit active field active.
    thanks,
    Srinu.

  • When I open logic express 8 with eyetv open but not active and i close logic express 8 and make eyetv active it won't show closed captioning even though closed captioning is turned on

    when I open logic express 8 with eyetv open but not active and i close logic express 8 and make eyetv active eyetv won't show closed captioning even though closed captioning is turned on.  When I totally close eyetv and reopen eyetv and open a live tv window the closed captioning comes back.  I never noticed this with os leopard, Just after i installed os snow leopard.  All software is up to date only I think, thanks to apple they droped support for logic express.  Thanks for any suggestions.

    Does toggling CC off & back on bring it back?
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.

Maybe you are looking for

  • How to go from one slide to another by pressing a key

    Dear forum, I am a newby to Captivate 5 but even after having read all related documentation I got stuck with a beginners problem: I have recorded a demo from a software simulation (120 slides) and when I play the movie its all fine. I would like how

  • Blackmagic Intensity - Crashes during stream every time

    Howdy folks. I'm having an immense problem with attempting to stream both in Mac OSX and Windows 7 (same box) with my BlackMagic Intensity Pro. Everything is updated, and I can stream with the crappy web-based tools. No matter what I do, be it resolu

  • Wallstreet 233mhz to 300mhz... boots up, but no video

    I picked up a 300mhz card for my Wallstreet. I even saw it running, in person, on another Wallstreet just fine (it was reported at 350mhz under OS 8, but I know that there were some issues with Wallstreets and OS 8 and 9 with regards to processor spe

  • Urgent response required-  thanx

    Hello, DB Version: 10.1.0.3.0 After running catalog.sql & utlrp.sql I still have 12 objects invalid in my database. Two packages body in sys schema are invalid as below: DBMS_STATS_INTERNAL PACKAGE BODY DBMS_STATS PACKAGE BODY I would like to recreat

  • Hewlett Packard Combo Printer Scanners - Supporting Software and Leopard

    Just to let everyone know my brand new HP ColorSmart C7280 works fine in Leopard when used for printing but the scanning software isn't quite up to the job just yet. Also it doesn't like MPA2 encryption when used with the Airport Extreme. I had to dr