×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    1

    Recording audio in loop, crashes on N70

    Hi,
    we're having some problems with audio recording on the Nokia N70. The program is supposed to create a player, record 1 second of audio, close the player, and then do this in a loop many times. After each recording, some analysis is supposed to be done.

    The problem is that the program crashes after about 1 hour, with NullpointerException, or just exits. All code related to analysis etc has been taken out to be sure that the problem isn't related to that.

    Code:
    .....before loop......:
    Player p;
    RecordControl rc;
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    
    
    .....code inside loop.....:
    
        p=Manager.createPlayer("capture://audio?encoding=pcm&bits=8&rate=8000");
        p.realize();
        rc = (RecordControl)p.getControl("RecordControl");
        output.reset();
        p.start();
              
        rc.setRecordStream(output);
        rc.startRecord();
        Thread.currentThread().sleep(1000);
        rc.commit();
        p.stop();
        p.close();
     
       // now analyze the recorded 1 second of audio
       // ....
    The code above is very standard, so the probelm seem to arise when doing a huge number of recordings. Is there anything we can do to get it to work ? Or any other way we can record and analyze at the same time ?

    We have also tried with just commit()'ing and restarting the recording, without re-initializing the player every time, but it didn't work either.
    We have also tried different variants with starting the player after starting the recorder etc, but anyway it crashes in the end.

    Greetings,
    Henrik Sundt

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: Recording audio in loop, crashes on N70

    hi Henrik,

    are you using try/catch? or even simply if(... == null){}
    it could be that for example applciation cannot acquire control thus null pointer exception is thrown if:
    Code:
    rc = (RecordControl)p.getControl("RecordControl");
    if(rc == null){
    // trhow custom exception here or handle 
    }
    regards,
    Peter

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    9

    Re: Recording audio in loop, crashes on N70

    I have the same problem with the 5800 XpressMusic.
    tony

  4. #4
    Registered User
    Join Date
    Jun 2008
    Posts
    25

    Question Re: Recording audio in loop, crashes on N70

    *Bump*

    Many other people have reported this problem on different handsets:
    http://discussion.forum.nokia.com/fo...r-7-20-minutes
    http://discussion.forum.nokia.com/fo...-on-nokia-6630
    http://discussion.forum.nokia.com/fo...e-crashes-6600

    I've seen the problem on the N95_8GB and the 5230.

    I'm wondering if anyone would be will to help me test if the problem is still present on handsets with Symbian^3 and/or Nokia Java Runtime v2.1.
    Anyone?

Similar Threads

  1. Unlimited Audio Recording with J2ME on nokia 6630
    By basitj in forum Mobile Java Media (Graphics & Sounds)
    Replies: 11
    Last Post: 2010-12-29, 15:23
  2. Buggy AMR Audio Recording. Please Help!!
    By jhamby in forum Symbian
    Replies: 8
    Last Post: 2009-07-07, 10:34
  3. Video with audio recording delay problem on N90
    By vasya0 in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-12-03, 16:44
  4. Recording an audio stream using the Series 60 emulator
    By rastapasta in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2007-04-23, 11:46
  5. Half Duplex Audio Streaming
    By subhrajyotisaha in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-05-25, 04:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×