Why we need to call writeFloat twice?

When we playback the audio recorded, why we need to call  e.data.writeFloat(sample) twice?
private function playRecorded(e:SampleDataEvent): void
                if (!rec.bytesAvailable > 0)       
                    return;
                var length:int = 8192;
                for (var i:int = 0; i < length; i++)
                    var sample:Number = 0;   
                    if (rec.bytesAvailable > 0) sample = rec.readFloat();
                    e.data.writeFloat(sample);
                     e.data.writeFloat(sample);   

hi,
Why do we need to call thread.start() to execute a
thread. why not just calling run().
Because, start() does two things.
- start a new thread of execution and then
- call the run method....and calling run does NOT start a new thread of execution. It's just a plain old regular method.

Similar Messages

  • Why I need to click it twice show buttons?

    Hi,
    First I don't see any buttons (Buttons -This is a movie clip) on Stage. When I click on Show button using the following code, I can see my Buttons. But first I need to click twice to see the Buttons. While second time there is no problem. How to solve the problem?
    this.Buttons.visible = false;
    import fl.controls.Button;
    var myButton:Button = new Button();
    myButton.label = "Show Menu";
    myButton.name = "btn1";
    myButton.toggle = true;
    myButton.move(55, 95);
    addChild(myButton);
    myButton.addEventListener(Event.CHANGE, changeHandler);
    function changeHandler (event:Event):void {
        if (event.currentTarget.selected == false) {
            Buttons.visible = true;
            myButton.label = "Hide Menu";
        } else {
            Buttons.visible = false;
            myButton.label = "Show Menu";       
    Thanks and regards,

    use:
    function changeHandler (event:Event):void {
        if (event.currentTarget.selected) {
            Buttons.visible = true;
            myButton.label = "Hide Menu";
        } else {
            Buttons.visible = false;
            myButton.label = "Show Menu";       

  • Why supplier needs to be maintained twice in COMMPR01 for interlinkage?

    Hi Everyone,
    if I want to create an interlinkage in COMMPR01 (price-product-vendor-relationship), I need to maintain the vendor twice. Once within the tab "conditions" and once within the tab "relationships".
    Does onyone out there have a clue, if there is some special meaning behind this "redundant" maintenance, or if it is just for technical reasons?
    Thanks and best regards
    Julian

    Hi Danielis
    This kind of errors usally occurs when there is a file corruption. In either the application of the configuration files. The Datasocket configuration is save in the 'cwdssini.dss' file. this is by default installed in 'C:\Program Files\National Instruments\DataSocket'. Yu could try and remove this and then run the Datasocket Server Manager once to recreate a file with default settings.
    We it is a problem with the Application you could try and install a fresh copy on a other machine and run the VI and server on that machine. Or just run the server on the other machine and connact you Front panel object to that server instead.
    As for other ways of doing this you could look into the Shared Variables that have been introduced in LabVIEW 8
    Hope this helps
    Karsten

  • Does anyone know why a web page would suddenly pop up telling me I have a computer virus and need to call them?  When I've called they said they needed access to my computer in order to fix the problem - which I didn't do.  Is this legit?  An Ad?

    Does anyone know why a web page would suddenly pop up telling me I have a computer virus and need to call them?  When I've called they said they needed access to my computer in order to fix the problem - which I didn't do.  Is this legit?  An Ad?

    That is not legit, it is a scam to gain access to your computer and information.
    You can protect against pop-up adware with the AdwareMedic tool Thomas Reed has http://www.thesafemac.com Tom is a major contributor on these communities and great security guy.

  • Why do we need to call start() to execute a thread.

    hi,
    Why do we need to call thread.start() to execute a thread. why not just calling run().
    Vjoy

    hi,
    Why do we need to call thread.start() to execute a
    thread. why not just calling run().
    Because, start() does two things.
    - start a new thread of execution and then
    - call the run method....and calling run does NOT start a new thread of execution. It's just a plain old regular method.

  • Why we need Acrobat 9.2 Professional?

    Hi,
        Thanks for replying my previous post....
        there is one question on my mind...why we need Acrobat 9.2 Professional?
        I mean in the whole process of word to pdf generation what is the function of
        Acrobat 9.2 Professional?
       Thanks nd regards,
       Barun barik

    Acrobat includes a plugin to Office that performs the actual conversion.   Generator automates the calling of that plugin

  • Why we need doGet() or doPost() instead of service()

    Though we have service() method in http servlet why we need to override the doGet() or doPost() of Httpservlets
    2services methods are availbale in HttpServlets
    1.protected void service( Httpservelt request hreq, HttpServletResponse hresp);
    2. Public void service( servletRequest req, servletResponse resp)
    Read this and tell how it is(it was collected from documentation of Jguru site)
    NOTE: the doGet() and doPost() methods (as well as other HttpServlet methods) are called by the service() method.

    The service() method from the Servlet interface is overloaded in HttpServlet to accept HttpServletRequest and HttpServletResponse. If you read the API documentation, you will note that it says the overloaded service() method will dispatch to doGet, doPost, doPut, etc. based on the type of request.
    This approach makes sense, because it is bad design to put all your code in one method, or one class for that matter. Usually the doGet/doPost/do<Whatever> methods are themselves dispatcher methods that call the proper classes/methods based on the logical contents of the request.
    This is in fact a common pattern in servlet frameworks like Struts and Spring. Said frameworks use a generic DispatcherServlet that redirects requests to the appropriate classes/beans as declared in the configuration files.

  • Why we need reference in java?

    Hi
    I faced one problem while I was doing heapdump analysis.I had to find memory leak suspect.
    Somewhere in parent node I have found soft reference.
    My question is that why we need reference in java?
    and why IBM jdk1.4.2 and above have inbulit class like
    softreference
    weakreference
    phatomreference

    These Reference objects have special ways of interacting with the garbage collecor. A normal reference is, in comparison, called a "hard" reference. If an object is only reachable through a special reference it is said to be "softly reachable" or the like, and the garbage collector can collect it. When this happens the reference object is cleared, and will return null if you try to acccess the object through it.
    SoftReference tells the garbage collector "On the whole I'd like you to hang on to this, but feal free to delete it if you're short of space."
    Weakly and Phantom reachable objects are collected as normal.
    A typical use of a WeakReference is when you want to hold onto a pointer to an object as long as that object exists, but allow it to be collected when there are no other references. For example, some object might listen for events on some window, but if you abandon the object you don't want the listener to prevent the object being disposed of.
    A typical use of a SoftReference is when you've arrived at some sizable data object through a moderately expensive process e.g. retrieving it from a database. You can rebuild it if it's lost, but you can save time if it's still there when you want it again.
    A PhantomReference is used instead of finalize(). You can arrange for references to be added to a queue when cleared, and you can have a background thread removing references from the queue and doing what you like with them. By extending the Reference type you can store information needed for a clean-up.

  • I need auto call reject how can make it in iphone 4s. 6.0.1

    I need auto call reject in iphone 4s 6.0.1

    Call blocking is not a feature that is available on the phone. You'd need to contact your carrier to see what services they offer.
    You can quickly silence the ringer for calls you don't intend to answer by tapping the power button once. Tapping it twice will send a call directly to voice mail.

  • What is the need for calling default constructor by JVM?

    What is the need for calling default constructor by JVM? why the JVM should intiializes default values to the data
    fields if the constructor is not there in our class?

    mahar wrote:
    What is the need for calling default constructor by JVM? Huh? The JVM does not need to call the default constructor. It needs to call a constructor.
    You decide which one by the way you use "new".
    why the JVM should initialize default values to the data fieldsHuh?
    ... if the constructor is not there in our class?Huh? The default constructor is always there. It may be private but it is still there.

  • Why is the last script executed twice?

    Here is my problem. I have two files, file1.sql and file2.sql that are called in a third file test.sql. The output from test.sql show that file2.sql was called twice
    --file1.sql
    select 'file1' as str from dual;
    --file2.sql
    select 'file2' as str from dual;
    --test.sql
    @file1.sql
    @file2.sql
    The output shows:
    STR
    file1
    STR
    file2
    STR
    file2
    Why is the last file execute twice. If I change the order of files in test.sql, then file1 is displayed twice

    I found my problem. In test.sql I had '/' in the last line
    --test.sql
    @file1.sql
    @file2.sql
    /

  • Why we need to use webutil

    Hi all
    why we need to use webuti?
    sarah
    Edited by: SarahSarahSarah on Sep 15, 2009 5:36 AM

    Hi Sarah!
    You need webutil for client side integration.
    There are functions to get information about the client
    like read the client name (pc-name), read and write in the registry and so on.
    Without webutil it is not possible to read an imagefile
    on the clients filesystem and save it to the database.
    There is a file-transfer package, to copy files from and to the server
    and to download files from a http-url!
    If you submit a call to the forms host build-in to call
    for example a batch file, this call would be executed on the server, not the client!
    For this Mr. Duncan Mills gave us webutil. Thanks!
    Regards

  • Why we need E-Sourceing for Rfx?

    Hi Experts,
    When RFX functionality is available in SAP SRM server it self? Why we need E sourceing separate system.
    What are all the advanatges / additional functionalities for using E sourceing system for Rfx compoared to SRM Server?
    Thanks & Regards
    Giri

    Hi,
    Rfx or bidding functionality is available both in SRM bidding engine and E-sourcing. A customer has to take the call whether his requirements will be filled with SRM bidding itself or he needs to go to E-sourcing as well.
    One major difference between SRM sourcing and E-sourcing is that in E-sourcing, one can conduct sourcing event on project mode which enables you to plan a sourcing event more elaborately.
    Secondly, in E-sourcing, one can generate or author legal contract out of an RFx event. In SRM, you can generate only operational contract.
    However, E-sourcing has its own limitation.E-sourcing can connect to only one ERP backend system unlike SRM. Sometimes, one needs E-Sourcing to generate or author a legal contract and then transfer it to SRM system using custom devlopment. Once the contract reaches SRM system, you can distribute it to multiple backend systems. In such cases, the customer needs both E-sourcing and SRM systems.
    Thanks and regards,
    Ranjan

  • Password Needed - Networking basic authentication twice??

    Why do I have to authenticate twice??? Using basic authentication, IIS asks me my username and password but then I also get another popup from Sun JVM asking to login again! I've seen other posts on this topic with no solutions yet. Anyone have any idea? Sun, are you working on fixing this issue? I'm so sad that MSJVM will be discontinued. It was much faster and less problematic.

    Nope, no answer yet. Until Sun addresses this problem, the only suggestion I can make is not to use the Sun JVM.
    You can disable it in Internet Explorer by choosing:
    1. Tools
    2. Internet Options...
    3. Advanced
    4. Uncheck (disable): Use Java 2 v1.4.2_04 for <applet> (requires restart)
    5. Under Microsoft VM, should already be checked but if not check(enable): JIT compiler for virtual machine enabled (requires restart)
    Other reference: http://www.java.com/en/download/help/switchvm.jsp
    Of course this is only a temporary workaround for now, but hopefully Sun will fix this before Microsoft completely ends their support for MSJVM on December 31, 2007.
    http://www.microsoft.com/mscorp/java/
    http://www.microsoft.com/mscorp/java/faq.asp
    New Microsoft products will not have MSJVM included so in that case you will need to find, download, and install msjavx86.exe (might be gambling on security if not the most updated version, oh well).
    Personally, I don't care which company's JVM software I have to use, I just want one that completely works, is fast, and not problematic.

  • Why we need abap XI ?

    why we need abap XI with one business scenario?

    Hi Narendra,
    Good Check this documentation and corresponding links
    SAP Exchange Infrastructure
    Purpose
    SAP Exchange Infrastructure (SAP XI) enables you to implement cross-system processes. It enables you to connect systems from different vendors (non-SAP and SAP) in different versions and implemented in different programming languages (Java, ABAP, and so on) to each other. SAP Exchange Infrastructure is based on an open architecture, uses open standards (in particular those from the XML and Java environments) and offers those services that are essential in a heterogeneous and complex system landscape:
    &#9679;     Modeling and design of messages, transformations, and cross-component integration processes
    &#9679;     Configuration options for managing collaborative processes and message flow
    &#9679;     Runtime for message and process management
    &#9679;     Adapter Engine for integrating heterogeneous system components
    &#9679;     Central monitoring for monitoring message flow and processes
    SAP XI supports internal company scenarios and cross-company scenarios.
    https://www.sdn.sap.com/irj/sdn/developerareas/xi
    http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    http://www.sap-press.com/product.cfm?account=&product=H1950
    see following links,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e1532f46-0a01-0010-bc88-af3272254881
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e1532f46-0a01-0010-bc88-af3272254881
    /people/sap.user72/blog/2005/05/31/my-experience-with-xi-installation-on-fedora-core-3-linux
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/95d7d490-0301-0010-ce93-c58f9a3cde0b
    http://help.sap.com/bp_bpmv130/Documentation/Installation/XI30InstallGuide.pdf
    http://help.sap.com/bp_bpmv130/Documentation/Installation/Configuration_Guide_FP.pdf
    check out these threads
    XI installation
    XI installation
    http://help.sap.com
    Introduction to XI technology
    XI Materials
    XI Material
    /people/sravya.talanki2/blog/2006/12/25/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-i
    /people/sravya.talanki2/blog/2006/12/26/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-ii
    /people/sravya.talanki2/blog/2006/12/27/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-iii
    then practice the following scenario's you will get every thing about XI
    1. Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part I /people/sravya.talanki2/blog/2006/12/25/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-i
    2. Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part II /people/sravya.talanki2/blog/2006/12/26/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-ii
    3. Aspirant to learn SAP XI...You won the Jackpot if you read this!-Part III /people/sravya.talanki2/blog/2006/12/27/aspirant-to-learn-sap-xiyou-won-the-jackpot-if-you-read-this-part-iii
    and once you are through ...follow the following links to weblogs which explain all the basic scenarios in XI
    Following are the links to weblogs which will help to develop the basic scenarios.
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters - IDoc to File
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy - ABAP Proxy to File
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30 - File to JDBC
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy - File to ABAP Proxy
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1 - File to File Part 1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 - File to File Part 2
    /people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping - Any flat file to any Idoc
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken] - File to Mail
    /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i - Dynamic File Name Part 1
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii - Dynamic File Name Part 2
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address - Dynamic Mail Address
    /people/siva.maranani/blog/2005/05/25/understanding-message-flow-in-xi - Message Flow in XI
    /people/krishna.moorthyp/blog/2005/06/09/walkthrough-with-bpm - Walk through BPM
    /people/siva.maranani/blog/2005/05/22/schedule-your-bpm - Schedule BPM
    /people/sriram.vasudevan3/blog/2005/01/11/demonstrating-use-of-synchronous-asynchronous-bridge-to-integrate-synchronous-and-asynchronous-systems-using-ccbpm-in-sap-xi - Use of Synch - Asynch bridge in ccBPM
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken] [original link is broken] - Use of Synch - Asynch bridge in ccBPM
    /people/michal.krawczyk2/blog/2005/08/22/xi-maintain-rfc-destinations-centrally - Maintain RFC destination centrally
    /people/sravya.talanki2/blog/2005/08/18/triggering-e-mails-to-shared-folders-of-sap-is-u - Triggering Email from folder
    /people/sravya.talanki2/blog/2005/08/17/outbound-idocs--work-around-using-party - Handling different partners for IDoc
    /people/siva.maranani/blog/2005/08/27/modeling-integration-scenario146s-in-xi - Modeling Integration Scenario in XI
    /people/michal.krawczyk2/blog/2005/08/25/xi-sending-a-message-without-the-use-of-an-adapter-not-possible - Testing of integration process
    /people/michal.krawczyk2/blog/2005/05/25/xi-how-to-add-authorizations-to-repository-objects - Authorization in XI
    http://help.sap.com/saphelp_nw04/helpdata/en/58/d22940cbf2195de10000000a1550b0/content.htm - Authorization in XI
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step - Alert Configuration
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide - Trouble shoot alert config
    /people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi - Call UNIX Shell Script
    /people/sravya.talanki2/blog/2005/11/02/overview-of-transition-from-dev-to-qa-in-xi - Transport in XI
    /people/r.eijpe/blog/2005/11/04/using-abap-xslt-extensions-for-xi-mapping - Using ABAP XSLT Extensions for XI Mapping
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure - Mail Adaptor options
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm - Collection of IDoc to Single File
    /people/sap.user72/blog/2005/11/17/xi-controlling-access-to-sensitive-interfaces - Controlling access to Sensitive Interfaces
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14 - The same filename from a sender to a receiver file adapter - SP14
    /people/prasad.illapani/blog/2005/11/14/payload-based-message-search-in-xi30-using-trex-engine - Payload Based Message Search in XI30 using Trex Engine
    /people/sap.user72/blog/2005/11/24/xi-configuring-ccms-monitoring-for-xi-part-i - XI : Configuring CCMS Monitoring for XI- Part I
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter - XI: HTML e-mails from the receiver mail adapter
    /people/sap.user72/blog/2005/11/22/xi-faqs-provided-by-sap-updated - XI : FAQ's Provided by SAP
    Good Luck and thanks
    AK

Maybe you are looking for

  • How to delete tracks from Music Folder?

    After selecting all of the tracks of one of my iTunes playlists, i.e., an album, and clicking Option + Delete to move them to the Trash, I accidentally clicked Enter and, by default, selected the "Keep Files" option instead of the "Move to Trash" opt

  • Why do I have a question mark on top of Ichat Icon

    why do I have a question mark on top of Ichat Icon ?

  • Webservice returning string (but I need XML for XSLT Tranformation)

    Hello everybody, I have configured an ip with a webservice. So far so good - everything works fine. Now I want to transform the output of the webservice with xslt. The webservice returns the data as a String in form of XML. e.g.     <!XML> <!String>

  • Using the ComboboxColumn Object with a grid

    Hello everyone, I am writing an addon dealing with user tables, it basically loads data from user tables into a grid and then lets the user perform several operations on it, my problem is that whennever a field contains valid values, the grid display

  • BP - Employee relationships to an org unit and changes

    Dear Colleagues of CRM, The scenario pertains to an employee and its relationship to an org unit to which it is assigned. Once an employee is assigned to an org unit, a relationship too gets created with the Employee as BP. This relationship has the