Extra bytes problem with audio capture,j2me

hi there
I m working on a J2ME application that captures live audio through microphone into a bytearrayoutputstream .
i have supplied the capture time,sampling rate, bits per sample, no of channels info to the program.
but when i check out the size of the byte array , i see that its greater than what it should be !!!
if the size had been lesser than expected, i could guess that sum bytes are getting lost , but what attributes to the larger size.
and everytime i run the program i c that the size is larger than expected though the number by which it exceeds is different everytime.
can ne one help??

Hi,
Thank you very much for your help. I changed the code as you suggested. It minimizes the gap, but there is still part of missing voices.
When you tried it, did you get really perfect (no gap) recording, as if it was recorded to one single stream?
below is my recording code:
for(int i=0;i<types.length;i++) {
               rc.setRecordStream(baos);
rc.startRecord();
Thread.sleep(2000);
rc.stopRecord();
rc.commit();
init.append("baos size after rec:" + baos[i].size()+"\n");
}//end of for
p.stop();
p.close();
and here is the code for playing back the voice:
for(int i=0;i<3;i++) {
            bais[i] = new ByteArrayInputStream(baos.toByteArray());
try {
p = Manager.createPlayer(bais[i],types[i]);
p.prefetch();
p.start();
Thread.sleep(p.getDuration());
p.stop();
p.close();
catch(Exception e) {
init.append("exception in playing back voice: "+e.toString()+"\n");
e.printStackTrace();
for playing back, we need to stop and close the player first, then create a new player to play the next input stream, dont we?
Thanks
- alfo

Similar Messages

  • Problem with audio capture device

    Hi!
    I can stream video perfectly but as soon as i enable Audio i get problem. I see my every audio inputs and the name of my sound card. But still it refuse to work. Sometimes it complains about audio format also. But ive choosen Mp3, Stereo, 44100 and 128 kbps. Standard format .............
    Any solutions for this ? Im using Creative X-Fi Elite Pro on Windows 7.

    I'm having a very similar issue with Blackmagic SDI4K card. The SDI4K works well with Blackmagic Media Browser software  - it captures SDI signal just fine. But FMLE doesn't properly recognise the card, generates all sorts of error messages whenever a setting is changed, and ultimately crashes before completing change of settings. Any ideas?

  • Problem with audio capturing

    hi all!
    i just bought a Phonic Digitrack to connect my audio devices with my macbook 13" - url: http://www.phonic.com/en/digitrack.html
    it officially is compatible with mac os x and capturing from it using quicktime works.
    unfortunately i cannot choose the device from the devices list in flash media live encoder allthough fmle states to support all quicktime compatible devices.
    have i done something wrong?
    maybe another device will work? eg. elgato video capture: http://www.elgato.com/elgato/na/mainmenu/products/Video-Capture/product1.en.html (which also supports video capture)
    can somebody share experience on those two products or give any hint, why fmle won't identify the devices allthough quicktime does?
    thanks in advance!
    matthias

    Are your capture settings right? In the Capture Window, there are tabs off to the upper left of the preview screen. One of them allows you to select if you want to capture only Audio, only Video, or both.
    Are both Boxes checked?
    ~Luke

  • [Vox] MSI VOX TV BOX USB 2.0 problem with audio drivers compatibility

    Ok,let's go...
    I have a DELL Latitude d510 laptop with a centrino 1.73 GHz procesor and a soundcard supported by Sigmatel software Sigmatel C-Major audio.I bought MSI VOX TV BOX USB 2.0 and tried to install it on my lap top.Yes,I had problems with SP2 on my XP and the MSIVPS software from the instalation CD was crashing every time I tried to start it,but I solved those problems by downloading the latest drivers and the 3.xx version of MSIPVS.But...I still have a problem with audio.To be precise it seems that my audio drivers are incompatible with the VOX drivers.So now I have video but I don't have audio.Also I installed the tv card on my desktop machine and it worked like a charm(everything workes:audio,video,the old MSIPVS which I like better than the new one cause it supports my remote,has better way of managing scanned channels,e.t.c ,but I have USB 1.1 on my MB so the image quality is very poor).I did a lot of experimenting,for example i uninstaled my audio drivers(that Sigmatel C-Major thing),and installed the old MSIVPS and guess what...IT WORKED but there is no use from this cause I don't have audio On the other hand if I have everything installed then in the MSIVPS (the 3.xx version not the old one) under audio I get CD Player as an input audio device(what happened with microphone...?).To cut the long story short I tried a bunch of things and still no audio.Is there any other case of DELL audio software-VOX incompatibility?Any ideas,or solutions?

    thank you for answering me. y have no pci card working, only usb 2.0 and sata devices. also, the MSI geforce 9600gt PExp 2.0 gpu. the only usb 2.0 devices which work, are the flash (pen) drives, keyboard and mouse. but no way that the WLAn adapter and TVcapture, both usb 2.0 work.i've  tested them front side and rear side and is the same failure: if i use a pendrive, works ok. if i insert the wlan or the tv capture stop work as the 2.0 and a advertising window tell me to change to a 2.0 port, means the ports are working slower, at 1.1.  i still have the other PC, built on the MSI K9N4-slif mobo, tested them and both devices work at perfection.  i have 2 screenshots to show you:
    this, is the device manager (sorry, in spanish but you understand that's about the nVIDIA EHCI USB 2.0 controller. the 2nd one seems to be more sensitive (works worth) then the first one. when the tvcapture begin work, then fails, i'm trying to update this controller, does it ok but then the devicemanager-window freeze. i must stroke the "enter" key to "accept" / finish the update. then, fails again:
    the other one is from everest corporate edition:
    both drivers marked with purple colour!
    i think i should update this Win XP drivers, but how? the usbport.inf file (C:\Windows\inf) don't change anything. i don't want to switch xp to vista, i'm happy whit it.
    i'm thinking also on another possibility: could be an energy failure? some usb devices, like the big usb flash dives. 250-320gb, fail because the 5v/usb are receiving it's not enough. could be, but that means this mobo has no solution and i'll loose my money.
    thank you very much and i'll stay alert of your suggestions. by

  • Problems with audio panning.

    Am having problems with audio tracks. For example: when capturing a clip where a person is talking, there would be 2 tracks of audio - one a radio mic (Track 1) and another mic (Tack 2)capturing ambient sound. I often delete the ambient track (Track 2) and am left with the the main audio from a radio mic (Track 1).
    The problem is when I open up the main audio track (Track 1) and pan the audio track from -1 to 0 or even to +1! It says it has done it but the sound still comes out of the left speaker.
    It is a very recent problem that I wonder may be something to do with preferences or settings.
    We have had no problems with the speakers at all.
    Thanks very much,
    Geoff

    You have your audio outputs set to 'dual mono', not 'stereo'.... go to:
    Sequence>Settings> 'Audio Outputs' tab > then highlight the 'Stereo' button, then click OK...
    problem solved...

  • FMLE 3.0.0.4743 Problem with video capture device

    log:
    Tue May 05 2009 14:26:54 : Selected video input device: Beholder A/V Capture (SAA7135) [Slot 2]
    Tue May 05 2009 14:26:54 : Selected audio input device: Beholder Aud Capture (SAA7135)
    Tue May 05 2009 14:26:55 : Problem with video capture device. Please verify that the video capture device is working correctly and is not already in use.
    Tue May 05 2009 14:26:56 : Audio Device Error : The selected audio device "Beholder Aud Capture (SAA7135)" doesn't allow setting volume intensity. Disabling the volume slider control.
    Flash Media Encoder 2.5 working without any errors

    The second message that you are getting "The selected audio device "Beholder Aud Capture (SAA7135)" doesn't allow setting volume intensity. Disabling the volume slider control." is because your device does not let you change intensity of volume. This warning message is just to tell user that volume slider will remain disabled for the selecetd device. This is new addition in FMLE 3.0 and was not there in FMLE 2.5
    Also for first message, please make sure that no other instance of FMLE is already running using this device. You can verify this from task manager. If any other instance of FMLE is running then please close that instance so that device gets free for new instance.

  • Problem with Audio on HP Envy 6-1130sw (C6F62EA)

    Hello everyone.
    I have a problem with audio on my ultrabook HP Envy 6. Sometimes when I try to play music there are no low tones and music plays really silent... And then when I restart PC problem dissapears and music plays fine... I thought there is a problem with speakers, but when I connected 5.1 speakers there were also only high tones. Same thing happens on headphones. Is it a hardware problem or maybe software? Actually I use Windows 8.1 and drivers are up to date. If any one of you had same problem please post.
    Thanks. 

    Hi piotrek1130sw,
    From what you have described, I think the best approach would be to restore the original IDT driver, restart the computer, test that driver, then install the driver update, and test the outcome of installing the newest driver.
    Use the following link for instructions to recovery the ITD driver using Recovery Manager. Restoring applications and drivers.
    Once the driver is restored, restart the computer and test the audio. If the audio is good you can continue to use this driver, or you can reinstall the update and see what happens. IDT High-Definition (HD) Audio Driver.
    If installing the newest driver causes the issue to occur but the recovered driver worked, I suggest recovering again.
    If neither driver works I will gladly follow up and provide any assistance I can.
    Please let me know the outcome.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Problem with audio configuration

    when i turned on Itunes on on my computer it had this message: Problem with audio configuration. Audio/video playback may not operate properly. How do I fix it?

    I reinstalled iTunes & QuickTime as per giterdone response to rpestow on 12 November
    instructions at: http://docs.info.apple.com/article.html?artnum=93698
    Thanks giterdone

  • I'm having a problem with device capture

    I'm having a problem with device capture. I connect my Sony HC-90 via firewire. I can start the capture process in Premier 4 but then all control freezes.
    Any ideas?
    Thanks,
    Jeff

    Are they custom EQ settings in iTunes on the computer?
    Per:
    https://discussions.apple.com/message/17383922#17383922
    "Do the EQ settings from my iTunes library transfer to my iPhone when I sync it"
    Yes.
    " thus causing my iPhone to over process the data when I turn it's EQ on? "
    No. If the EQ ison, the iPhone will use the EQ setting you assigned in iTunes. It will use only the preset EQ. If you have a custom setting or do not have an EQ setting, it will not be used and will use the setting on the iPhone.

  • Problem with Audio MIDI Setup using multiple accounts

    I'm having a problem with Audio MIDI Setup recognizing all of the MIDI devices on a G4 Tower with a non-administrator account. The main administrator account has no problem seeing anything, but the non-admin account won't see anything. Does it all have to be added in manually, or is there a preferences file to copy over that will take care of this. Failing that, is it a problem with file permissions? Any help would be greatly appreciated.

    Don't know whether this of any help, but there's an identifiable issue with AMS and Digital Performer 5 where DP5 simply won't load with AMS setups configured with previous versions of DP. Which is probably irrelevant to your problem, but ...
    What I and other DP users have found we have to do is start with a completely new, blank AMS setup, and reconfigure our devices from scratch, and although this was kind of hit and miss and on the fly (don't really understand what the the issue was, exactly), I think the bottom line was if we used the new AMS setup with DP5 before anything else that might cause its data tables to change, we were ok.
    So if you can do it, it might be worth setting AMS to a new blank template, then connecting your interfaces, see how far you get. And always make sure you've got the latest drivers of course, though I'm sure you've done that.
    Never used Mbox or 410, but I've an Ozonic which I think uses the same M-Audio firewire drivers as the 410, and don't have any problem with that, FWIW.
    G5 Dual 2.7, MacMini, iMac 700; P4/XP Desk & Lap.   Mac OS X (10.4.8)   mLan:01x/i88x; DP 5.1, Cubase SX3, NI Komplete, Melodyne.

  • Two problems with audio clips

    Hello,
    I'm having two problems with audio clips:
    1. When I try to drag a clip from the viewer, I can't do it because it won't let me drag the clip. It only lets me drag the pointer around within the clip.
    2. When I drag an audio clip from the browser into the timeline I don't get any audio, just a series of beeps (and yes, my audio media is on-line -- I can listen to it in the viewer, just not the timeline).
    What am I doing wrong?
    Thanks.

    1. Drag the little hand on speaker icon to drag from
    the Viewer...
    Thanks! (Does it actually say that in the documentation anywhere? I try to RTFM, but the FM seems to be a little, er, mute on this point.)
    2. It means your sequence settings don't match the
    properties of the source audio you're putting in it,
    and you either need to change the settings in the
    sequence, or render the audio.
    Ah, that would explain it. Thanks!

  • Premiere pro cc 2014 problems with audio

    I have edited some sequences in premiere using sony xdcam ex clips. The clips where recorded as 1080 50i. I have edited it in the same sequence properties as premiere sugested it. All there is fine and audio is playing well. The problem strats when i change the sequence properties and select it at 1080 60i or 29p. The audio is distorted and it sounds like robotic, sometimes audio is muted on audio transitions. When i revert the properties back to 50i then all is fine.
    Anyone else experience the same problems?

    Sometimes i must add some clips that are recorded on canon 6d on 29.97p. and this clips look choppy and jerky on 50i sequence. But on 60i sequence both 50i and 29.97p look good. On premiere cc i cann change sequence properties without any problems with audio, only on cc 2014 that audio problem exist.

  • Can't run itunes because it has detected a problem with audio configuration

    What does that mean and how do i fix it? I had Itunes installed on my computer for ages but I had to have it restored because the firewall was playing up and since i have tried to reinstall itunes it has been saying that there is a problem with audio configuration---any ideas?

    Some people have found the following works:
    Completely uninstall Quicktime (NOT iTunes) using ALL the method in this article:
    http://docs.info.apple.com/article.html?artnum=93698
    Turn off antivirus/anti spyware
    Go to Control Panel>Add/Remove Programs>Change or Remove Programs
    Select iTunes, then click on Change, then select Repair.
    Restart computer

  • Problems with Audio in iPhone 5

    I Have a iPhone 5 and today beginning having problems with audio, I can't hear my calls or music, somebody have the same problem?...do you know how I can fix it?

    Do you have the side switch enabled - do you see orange on the switch above the volume keys.
    Make sure all your settings are turned up.
    Try a restart of the phone by holding the home and power button until it reboots
    If that does not work you can reset your settings by going to settings > general > reset > reset network settings and then reset all settings.

  • Problem with Video capture Device

    i have a problem with FME. i am using Avermedia TV capture
    device and Canon 3ccd Digital Video Camcorder ( PAL ) when i open
    the FME interface the warning given for " Problem with Video
    Capture Device".
    i read all the topics in Flash Media Encoder Category, if
    this problem occures my capture device ( i expect MPEG ) how to
    solve this problem?
    Thanks,

    The Device Matrix is something we'll be updating in the
    future as we continue to test more and more equipement. Ideally, I
    would like for users such as yourselves to be able to add to it and
    tell us what has worked for you as well. If anyone has any ideas
    about what technology we should use to do this (e.g., this forum? a
    wiki?) please let me know.
    Regarding the devices not working - the main problem we see
    is that the system requirements are not being met. Here is what to
    check for:
    - are you running on Windows XP (only supported OS right
    now)?
    - do you have DirectX client runtime version 9c or higher
    installed?
    - do you have hardware acceleration enabled?
    - do you have 32bit graphics enabled?
    - do you have the latest direct show drivers from the
    card/device manufacturer?
    Thanks,
    Chris Hock
    Adobe Systems Inc.

Maybe you are looking for