JMF on pocket pc

F

Fbx

I wrote an application for my iPAQ, and use JMF cross-platform
version, with Jeode, to playback a file.wav, but when the application
starts, the console shows these errors :

at com.sun.media.renderer.audio.JavaSoundRenderer.initDevice()
at com.sun.media.renderer.audio.JavaSoundRenderer.open()
at com.sun.media.BasicRendererModule.doPrefetch()
at com.sun.media.BasicTrackControl.prefetchTrack()
at com.sun.media.PlaybackEngine.doPrefetch1()
at com.sun.media.PlaybackEngine.doPrefetch()
at com.sun.media.PrefetchWorkThread.process()
at com.sun.media.StateTransitionWorkThread.run()

Why???
 
R

Rhino

Fbx said:
I wrote an application for my iPAQ, and use JMF cross-platform
version, with Jeode, to playback a file.wav, but when the application
starts, the console shows these errors :

at com.sun.media.renderer.audio.JavaSoundRenderer.initDevice()
at com.sun.media.renderer.audio.JavaSoundRenderer.open()
at com.sun.media.BasicRendererModule.doPrefetch()
at com.sun.media.BasicTrackControl.prefetchTrack()
at com.sun.media.PlaybackEngine.doPrefetch1()
at com.sun.media.PlaybackEngine.doPrefetch()
at com.sun.media.PrefetchWorkThread.process()
at com.sun.media.StateTransitionWorkThread.run()

Why???

I'm guessing that it's because the code you wrote has a bug in it. However,
I'm not psychic so I can't debug code that you didn't post.

Rhino
 
F

Fbx

Rhino said:
I'm guessing that it's because the code you wrote has a bug in it. However,
I'm not psychic so I can't debug code that you didn't post.

Rhino

The code is this:
import java.awt.*;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.FlowLayout;
import java.awt.event.*; //per WindowListner
import javax.media.*;
import java.io.*;
import java.util.*;

public class Prov {
public Player pl=null;

public static void main(String[] args)
{
Prov prov=new Prov();
}
public Prov()
{
Frame fr=new Frame("FRAME");
FlowLayout flow=new FlowLayout();
fr.setVisible(true);
fr.setSize(200,200);
fr.setBackground(Color.blue);
fr.setLayout(flow);
fr.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
System.out.println("Frame On Line");
MediaLocator ml=new MediaLocator("file:///Windows/ring.wav");
try
{
pl=Manager.createPlayer(ml);
} catch (NoPlayerException e)
{System.out.println("NoPlayerException");}
catch (IOException e) {System.out.println("IOException");}
Button bts=new Button("START");
Button btst=new Button("STOP");
Button btrec=new Button("REC");
System.out.println("Creazione Pulsanti");
fr.add(bts);
fr.add(btst);
fr.add(btrec);
System.out.println("Pulsanti aggiunti al Frame");
bts.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
System.out.println("Premuto il pulsante START");
StartSound();
}
});
btst.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
System.out.println("Premuto il pulsante STOP");
StopSound();
}
});
btrec.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
System.out.println("Premuto il pulsante REC");
Rec();
}
});
}
public void StartSound()
{
pl.start();
}
public void StopSound()
{
pl.stop();
}
}

The application runs on iPAQ where is installed Jeode VM, but
Exception, that i described, is thrown when push START button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top