×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    9

    Why doesn't player realize on N73?

    I'm developing a Midlet that should play a wave-file from a custom inputstream from a socket connection. The funny is that is working perfect in the emulator but in the real device (a N73) the programs halts on the p.realize() line. Does anyone know what is wrong?

    ---- code -----

    sc = (SocketConnection)Connector.open("socket://" + server + ":" + port);
    is = sc.openInputStream();
    ...

    dis = new MediaInputStream(is);
    ...

    p = Manager.createPlayer(dis, "audio/x-wav");
    p.addPlayerListener(this);
    p.realize(); // <--- stop here
    p.prefetch();
    p.start();

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Why doesn't player realize on N73?

    What is the port number you are connecting to? Unsigned midlets are not allowed to create a socket connections to ports 80, 8080 and 443 (although a security exception error message should be shown...)

    Hartti

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

    Re: Why doesn't player realize on N73?

    I'm connecting på port 7554

  4. #4
    Super Contributor
    Join Date
    Feb 2006
    Posts
    689

    Re: Why doesn't player realize on N73?

    Hi,
    have u tried out with a sample code which plays a file in N73.
    Thanks
    Soku

  5. #5
    Registered User
    Join Date
    Oct 2007
    Posts
    9

    Re: Why doesn't player realize on N73?

    Yes I can play i file on the phone. I have also tried in an other application to play a file trough a custom inputstream. In the read() method I have added a sleep to simulate a slow network connection. On the emulator the file plays during load. This I can hear because the sound is stopping regularly. On the phone it seams like it waits til it has all the file in memory. It takes longer before the sound starts to play and when it does there are no silent breaks.
    The reason for this is that the phone doesn't support progressive playback. But WHY does the phone play the (delayed) local file and not the network transported wav-file? The API says that read returns -1 when the end of the stream is reached. This doesn't happen. Why?

Similar Threads

  1. Create 3GP player with J2ME for Mobile
    By dexxa05 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 57
    Last Post: 2012-01-10, 11:44
  2. fullscreen ignored in n73 j2me player
    By PeppeM2 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2007-07-03, 14:42

Posting Permissions

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