Where is source data coming from?

Hi,
I've cobbled togeher a working app (based on some examples found on the net). The application works well, but I have one specific question as to why it works!
The application takes data from the mic on my pc and saves it to a file. I can play back this file through standard media player and it obviously has worked as I can hear the recording again.
I'm using a TargetDataLine to record the audio to a file. I get this from an appripriate mixer. To do this, I have the following method to provide me with an appropriate mixer:
<pre>
private Mixer getMixerSupportingDataLine(DataLine.Info dataLineInfo) {
          Info[] mixerInfoArray = AudioSystem.getMixerInfo();
          for (int i=0; mixerInfoArray!=null && i<mixerInfoArray.length; i++) {
               Mixer.Info mixerInfo = (Mixer.Info)mixerInfoArray;
               Mixer mixer=AudioSystem.getMixer(mixerInfo);
               if (mixer.isLineSupported(dataLineInfo)) {
                    System.out.println("mixer info="+mixerInfo.getName());
                    return mixer;
          return null;
</pre>
Now the parameter I pass into this method comes form the following code:
<pre>
audioFormat = getAudioFormat();
DataLine.Info dataLineInfo =
new DataLine.Info(
TargetDataLine.class,
audioFormat);
private AudioFormat getAudioFormat(){
     float sampleRate = 8000.0F;
     int sampleSizeInBits = 16;
     int channels = 1;
     boolean signed = true;
     boolean bigEndian = false;
     return new AudioFormat(sampleRate,
     sampleSizeInBits,
     channels,
     signed,
     bigEndian);
</pre>
So I have a mixer that I know supports the kind of TargetDataLine that I want. So I get a targetDataLine from the mixer:
<pre>
targetDataLine = (TargetDataLine)mixer.getLine(dataLineInfo);
</pre>
I can then open the line and read data from it, save it to a file, and all is fine.
So my question is this:
Nowhere in my code do I specify where the data (that ends up in my TargetDataLine) is coming from. I've not specified that it should come from a mic, or line-in, or any other physical device. It just magically reads data from my mic.
When I query my mixer to see its sources:
<pre>
System.out.println(" capturing and mixer has this many source lines:"+mixer.getSourceLineInfo().length);
System.out.println(" mixer info"+mixer.getMixerInfo());
System.out.println(" source lines open"+mixer.getSourceLines().length);
System.out.println(" mixer open:"+mixer.isOpen());
System.out.println(" mixer controls:"+mixer.getControls().length);
</pre>
I see that there are no sources!
<pre>
mixer info=Microsoft Sound Mapper
capturing and mixer has this many source lines:0
mixer infoMicrosoft Sound Mapper, version Unknown Version
source lines open0
mixer open:true
mixer controls:0
</pre>
I really want to understand this, as it seems fundamental. If the mixer has no source lines, how is it getting data from the mic?! Surely there must be a way to query the mixer to find the data source.
Can anyone help me understand this fundamental point?
Many thanks,
Martin
Edited by: user4621888 on 12-Feb-2011 08:57
Edited by: user4621888 on 12-Feb-2011 09:10

user4621888 wrote:
So my question is this:
Nowhere in my code do I specify where the data (that ends up in my TargetDataLine) is coming from. I've not specified that it should come from a mic, or line-in, or any other physical device. It just magically reads data from my mic.Ok.
I see that there are no sources! Source and Target lines are what the user uses to write and read data from the line (respectively)... For example, the port that's actually associated with the microphone will have zero source lines, because you're not allowed to write to the microphone...but it gets data from the microphone, behind the scenes.
So, fundamentally, just remember that just because you can't write to it doesn't mean it doesn't take in data. It often times means it's hard coded to read a specific stream of data.
In this case, the stream of data is probably the default recording device specified in Windows...

Similar Messages

  • Where is the data coming from in query

    Hi,
    When we run a query are we getting the data from source system?
    Or the cube in Bw?
    CAn somebody clarify this for me?
    And if i have a query which invloves A hierarchy,is the query execution time going to be more?
    Or because the hierarchy is master data it does not effect the query execution time?
    Thanks.
    Haarika.

    The OLAP cache is a performance aid.  A query will look in the OLAP cache to see if the data has already been retrieved from the database already, and if it has been, and all other criteria for using the cache are met, the query will get the data from the cache rather than having to read the database.  Deleting the data in the cube will invalidate the cache for that query, meaning the query must go to the cube, and surprise, surprise, find no data. Any time the cube gets changed, the cache will be invalidated.

  • In the NI Library VI: Extract Numbers, the string control is automatically loaded each time the VI is opened with "Counting to five: one 2 three 4.0 five. Where is this string data coming from?

    Even after deleting the string "Counting to five: one 2 three 4. five." from the string control and replacing it with another string the original string returns after the VI is saved then reopened. Where is this string data coming from? I've attached a copy of the library function. I've been able in my application to get around the problem by replacing the string control with a string constant. But I'm still curious as to what's going on.
    Thanks,
    Chuck
    Solved!
    Go to Solution.
    Attachments:
    Extract Numbers Test.vi ‏9 KB

    Chuck,
    String control has been set to default with the string you are seeing.  To change this, enter the new string, right click the control and select
    Data Operations>>Make Current Value Default
    Now save your vi.

  • Data deleted in ODS, data coming from the data source : 2LIS_11_VASCL

    Friends,
    I have situation :
    Data deleted in ODS, data coming from the data source : 2LIS_11_VASCL.
    when for the above ods and the data source when trying to delete the request whole data got delted.
    All the data got deleted in the fore ground. no background job has been generated for this.
    I ma really worried abt this issues. can u please tell me what should be the possibilities for this issue.
    Many Thanks
    VSM

    Hi,
    I suppose you want to know the possibilitiy of getting the data.
    If the entire data is being deleted, you can reload the data from source system.
    Load the setup table for your application. Then carry out init request.
    Please note that you would have to take a transaction-free period for carrying out this activity so that no data is missed.
    Once this is done, delta queues will again start filling up.

  • How can i use an ao card (pci 6723) to output data and to trigger an ai o acquire the data coming from the ao card?card (pci 6254) t

    Hello
    I am trying to perform AO (pci 6723) and to trigger my AO card (pci
    6254) to read the data coming from the AO card. I am using LV7,1,
    win2000.
    Is an RTSI cable necessary or I can connect the trigger signals externally ?
    I am using the LV example " multi function - synch ai-ao.vi" but i can't for some reason configure the trigger lines.
    thank you in advance for your time.
    Yiannis

    Hello Yiannis,
    If I understand you correctly, you want to synchronize your analog input and analog output that are started by a trigger on the analog input board. If you don't want to use the RTSI lines, your best bet is to export the AI Sample Clock and then read it in to the AO board. There is an example on ni.com called DAQmx - Synchronized AIAO Shared Clock. It appears to be having techincal issues so I have attached the example below. To export ai/sampleclock, use DAQmx Export Signal.vi after Get Terminal Name with Device Prefix.vi. Export Sample Clock to PFI3 (There are only connections between the sample clock and PCI3/4/8/9). Connect PFI3 on your AI board to PFI0 on your AO board (with a wire). Then change the source for the AO Timing.vi to Devx/PFI0. If you want to do triggering, stick the DAQmx Trigger.vi between the Timing property node and the DAQmx Start.vi on the AI task. I have shown how to do this in the modified version below. Please take a look at it and let me know if you have any questions. If you still get an error please take a screenshot of it and post to the forum. Have a great day!
    Sincerely,
    Marni S.
    Attachments:
    Synchronized_AIAO_Shared_Clock[Modified].vi ‏140 KB

  • How can I make rectangular speech bubbles that adapt to the text inside them without the "arrow" that points towards where the bubble is coming from getting changed?

    I have to make lots of speech bubbles (150+) that all have texts inside them which differ in length. I want the speech bubbles to look the same in terms of style, but I need different sizes of course for each text. This means that the rectangular part of the speech bubble should adapt in length and width to the text inside it, while the "arrow" pointing towards where the bubble is coming from (e.g. the person who speaks) should stay the same on every bubble. So is there a way or a workaround to make such "adapting" speech bubbles?
    I appreciate any kinds of help
    Thanks in advance!

    Here's another way I found:
    1. Draw a speech bubble. Mine is a rectangle with rounded corners and a triangular pointer added with Pathfinder > Add
    2. Drag out a frame the same size as the speech bubble. Select the speech bubble and Copy; then select the empty frame and choose Edit > Paste Into...
    3. Alt-Drag the frame with the pasted speech bubble to make a copy, then crop one copy to leave only the top of the bubble showing, and crop the other copy to leave only the bottom.
    4. Drag out a text frame and insert a table consisting of 1 column, 3 rows. Set the text frame to Autosize > Height Only.
    5. Set the stroke/fill of the top and bottom rows to none, and style the middle row to match the speech bubble, (in my case a white fill and 2pt stroke; left and right).
    6. Anchor (paste) a copy of the speech bubble top in the top table row, and a copy of the speech bubble bottom in the bottom row.
    Getting the 3 parts to match up with is where you just have to work on it until you get it right. Use the positioning tools in Anchored Object options and the column width setting in Cell options to line everything up.
    Enter your text in the middle row. (Hey, look at that...a valid application of Comic Sans!) With the Cell Height set to an "At Least" setting, the cell will expand to fit whatever text you enter, pushing the the bottom row down, with the text frame auto-sizing to keep everything in play...

  • How to store the data coming from network analyser into a text or excel file

    Hii everyone
    I'm using Agilent 8719ET network analyser and wish to store the data coming from netowrk analyser into a text file/ excel file.
    Presently I'm able to get the data on Labview graph using GPIB . Can anyone suggest how to go ahead after collect data sub vi. How can the data be stored into a file apart from showing on the graph?
    Attached is the vi for kind consideration...
    Looking for help
    Regards
    Rohit
    Attachments:
    Agilent 87XX Series Exceed Max Meas.vi ‏43 KB

    First let me say that your code really looks pretty good. The data handling could be made more efficient by calculating the number of datapoints that are going to be in the completed dataset and preallocating the entire array -- but depending upon your answer to my questions, the logic in the lower shift register may be going away - so we won't worry about that right now.
    The thing I need to know before addressing the data storage question is: Each time you call "Collect and Display Data.vi", how many element are in the array? Are you reading single data points, or a group of data? (BTW: if the answer to that question is obvious based on the way the other VIs are setup, I don't have the drivers so I can't tell what the setup values are.) Second, how fast does the loop iterate? Are we talking msec per loop?, seconds? fortnights?
    The issues here are two-fold: how much data? and how fast is it coming? The answer to these will tell you how to save the data.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to insert data coming from 2 different file adapters in to one DB adapt

    Hi
    i want insert data in to database containing two diffferent tables, so i imported tables in to DB adapter by creating relation ships.But, data for two tables are in xml format & two are in different locations.So, i used 2 file adapters to get data from 2 different & i used BPEL(Define service later) Service. now in bpel i used receive activity to receive one file adapter data ( i checked create instance in receive) then used transform activiy for tranformation & finally invoke activity to invoke DB adapteer........similarly i repeated sequetially to 2 file adapter, by keeping 2nd receive(no need to check create instance) next to invoke.*Problem is after deployment finished only data coming from 1st receive is inserting to the table...& 2 nd receive not working it showing as Pending & showing as Asynchronus Call back inte console*
    I configured all the adapters perfectly..........Can any one can help me how to Commit 2 nd receive to insert data in the 2nd table
    Regards,
    jay

    Thank u both for ur replay.........
    I am doing this in 11g there is no problem regarding transform activity.
    My requirement is
    two different files from two different folders in a drive & we can't use one file adapter bcoz both have different columns(only few are common columns) so we use two different xsd's .So, i am using two file adapters to insert in database having two different tables with respect to two different files data coming from two file adapters. i am using one DB adapter to insert bcoz both tables are in same database with relationships & i used BPEL(define service later) .
    NOW PLEASE SUGGEST ME THE FLOW IN BPEL TO INSERT BOTH FILES IN THERE RESPECTIVE TABLES IN DATABASE.
    The flow i did 1st file adater--->receive--->transform---->invoke----->DB adapter.....Then again repeating this as keeping 2nd receive below 1st invoke
    2nd file adapter-------->2nd receive---->2nd invoke------>same DB adapter
    MY problem is only data coming from 1st process is inserting & 2nd one is not working as i discussed earlier........I USED READ FILE OPTION, UNCHECKED DELETE FILES OPTION & SET DIFFERENT POLLING FREQUENCY FOR BOTH FILE ADAPTERS.
    I tried to set correlation but it is not working & later tried i kept non-blocking invoke as TRUE in DB adapter also didn't work...........also i tried this transaction property in bpel component _<property name="bpel.config.transaction"_
    many="false" type="xs:string">required / requiresNew</property>...............BUT NO CHANGE...........
    Regards,
    jay
    Edited by: 910162 on Apr 5, 2012 12:38 AM

  • Reading data coming from a port

    How can I read the data coming from a webcam?

    Reading from a parallel port. But even if you do know how to read from a serial port that would be helpful

  • Where is the data come from when BW extract data from APO's MSP

    Hi,all.
       The APO system has many datasource,I have activated all the datasource with TCODE RSA5.
      I want to extract APO data to BW(Not APO's),where the APO data come from for BW extract,APO BW or SAP transparent table of APO or APO liveCache?
      PLZ help me,thank you very much.

    Hi,
    APO to BI Data Flow :
    1. Normally APO  DS  naming convention start with "9".
    2. Normally Planning area will provide the data for the DS.
    3. Using one T-Code ( /N/SAP/ ..... Ask APO Person) DS will be generated .In the specified T-Code you will provide the relavant 
        Planning area and DS will be generated.
    4.As you know RSA3 is for checing the data for DS.If you found there is no data for some fields then you will check the data at the planning area level (In R/3 table level).
    Regards
    Ram.

  • Where is the music coming from? It's not affiliated w/ any of my open web pages. Make it stop!

    This only happens in MFF (I have 3.6). When the browser opens and the tabs begin loading, this horrible music starts playing. None of the sites I have in the tabs play music. All of my plug-ins seem to be Microsoft related. I have XP and my AV is Kaspersky and I run MFF in safe mode. Where is this music coming from and how can I get it to stop? Please help. Thank you in advance!

    A week after my first call to AppleCare, I called again for help. This time the Tech was very helpful and she did not ask for additional $$.
    My computer does not have an Airport card in it. To get my new Extreme-n to recognize my Express so that I can send iTunes wirelessly to my stereo, we spent an hour on the phone working through a manual setup. It included an initial hard-wired Ethernet connection to both Airports. It included manually copying the AirportID number from one device to the other, and then the reverse. It also took three different “hard-resets” of my Express. My “simple” Extreme-n to Express wireless connection is now working properly.
    Kudos to my Tech; she was very knowledgeable and very patient.
    Boos to Apple Extreme-n team for releasing a product without a comprehensive setup utility. This should have been a simple ten-minute set-up procedure, just like it was for my old Airport Extreme base station.
    Bottom line: Keep calling AppleCare until you get a good Tech to help.
    G4 Desktop   Mac OS X (10.4.8)  

  • Determining where a user is coming from

    I was wondering if there is anyway (through a RequestContext maybe?)
    that I can determine where a user is coming from in terms of the
    JSP/ViewBean he/she was at.
    So for example, if I'm on the Login page of my app and there's an
    associated LoginViewBean, when the user clicks 'login', he will go to
    the application's homepage (as long as he's a valid user). What I need
    to do is determine from my homepage ViewBean, where the user just
    came from. In this case I would like to obtain an object representing
    the LoginViewBean. Is there a hook into the S1AF to get this kind of
    information?
    Thanks

    Throwable t = new Throwable()
    t.fillInStackTrace();
    StackTraceElement[]      st = t.getStackTrace();
    System.out.println( st[st.length-1].getMethodName() );??

  • HT204088 I have purchases on my iTunes account that are not mine. Where could this be coming from?

    I keep getting charged for purchases that are not mine. I don't know where they are coming from and I checked my childrens accounts. Where could they be coming from?

    Hello there duxmania,
    Thank you for using Apple Support Communities!
    I have a couple of recommendations for you here. First for the purchases that you did not authorize, I would reach out to the iTunes store support directly.
    How to report an issue with your iTunes Store, App Store, Mac App Store, or iBooks Store purchase
    http://support.apple.com/kb/ht1933
    Find the email receipt for your purchase.
    Click Report a Problem under the app that is having the issue.
    When prompted, enter the Apple ID and password you used to purchase the item, then click Report a Problem.
    Click Report a Problem next to the item you are having an issue with.
    From the Choose Problem dropdown menu, choose the appropriate issue.
    Follow the onscreen instructions and—if prompted—type a description of the problem into the text field.
    Click Submit to have your issue reviewed.
    You may also want to change your Apple ID password.
    Apple ID: Changing your password
    http://support.apple.com/kb/HT5624
    Regards,
    Sterling

  • So I deleted all my apps pictures music etc. and it's saying I have 1.4 GB available where is that space coming from

    So I deleted all my apps pictures music etc. and it's saying I have 1.4 GB available where is that space coming from ? Please help

    Check your Videos and your text messages - if there are any pics or videos in text messages, they can take up a lot of space.

  • Fill a table with data coming from an RFC

    Hello everyone:
    I've followed the Weblog "How many lines of java code did i write for a simple Web Dynpro?"
    /people/durairaj.athavanraja/blog/2004/10/17/how-many-lines-of-java-code-did-i-write-for-a-simple-web-dynpro
    I've called an RFC and created a table with data coming from it (which is also a table). My question is, if in this table there's a field named "UserType" there are two possible values for this field:
    "userA"
    "userB"
    How can I get the table only show me the "userA" registers? The RFC does return all of the users, but when filling the table, can I put an if-else somewhere on my code?
    Thanks a lot
    Alejandro

    Hi Alejandro,
    Referring to the link provided "The logic of the filter process is not implemented in Web Dynpro. The application developer must implement the action to be executed."
    We would have to implement the action onFilter in the controller implementation. Ideally, we fill the data retrieved from backend into a List (java.util.List) (this could be done on init of view) and then subset the list after meeting the criteria in the action handler(say
    onActionFilterData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent).
    Having done this, you may bind the output list back to the node (shown in table)
    Regards,
    Chaitanya

Maybe you are looking for

  • How do I update my old Organizer catalog for a new version of the program?

    When you install a new versiobn of the program and start the Organizer, it will usually give you a pop-up asking if you want to convert the catalog from a previous version. However, if that tool doesn't automatically launch, contributor Barb O offers

  • Xbacklight does not work

    Hi guys, I have a samsung R510 laptop running Arch and I can't set display brightness with xbacklight. However, the command sudo setpci -s 00:02.0 F4.B=XX (where XX is a hexadecimal number from 00 to FF) does work. It needs root privileges, through.

  • Authority check in the report

    Hi All , I have created a ALV report in that displaying three different reports on three radio buttons.These three reports uses same selection screen except 2-3 fields. Now our customer wants to create two t-codes for the same report one for  first r

  • Date field in DD.MM.YYYY format printing as MM.DD.YYYY

    HI all, There is a DATE field FKDAT in an invoice whose value is in DD.MM.YYYY format (01.07.2010). In the print program, this value is being passed into a CHAR field. However, when it gets printed it prints in MM.DD.YYYY format (07.01.2010). I have

  • Slow process of ABAP code

    Dear gurus My this codes take to much time to execute. How to resolve it ?. *&      Form  call_bapi *       text *      -->P_GOODSMVT_HEADER  text *      -->P_GOODSMVT_ITEM    text FORM call_bapi USING p_goodsmvt_header LIKE goodsmvt_header