public static void main(String[] args) {
try {
Player player = <strong>Manager.createPlayer"http://localhost/sample.wav");</strong>
player.start();
} catch (MediaException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
could the problem be leaving out a parenthesis?
public static void main(String[] args) {
try {
Player player = Manager.createPlayer("http://localhost/sample.wav");
player.start();
} catch (MediaException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
Is this for a mobile device? The library you downloaded is:
Micro Edition Mobile Media API Reference Implementation Version 1.0 (MMAPI)
You may be experiancing problems because you are trying to run the app as a PC app, and the library is not designed for the PC environment. Hence the Link error.
jerbo
Junior Poster in Training
84 posts since Sep 2004
Reputation Points: 11
Solved Threads: 1
If you simply want to play a .wav file, there are much simplier ways of doing this. That is of course, if your wanting to do this on a pc....
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
Unfortunatly, I have not done any development work using J2ME. Sorry I couldn't help; it was a shot in the dark.
jerbo
Junior Poster in Training
84 posts since Sep 2004
Reputation Points: 11
Solved Threads: 1
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
Thanks server_crash,
I have read this discussion and it is very helpful. But I think this discussion is not similar to my issue. My issue is that the sound can not be played, and the discussion is dealing with how to solve delay issue (the sound can be played in this discussion). I am wondering your comments.
regards,
George
I knew it was a little different, but I was hoping you could use their methods of playing sound in your app.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
If you downloaded the source code and it's suppose to work, my only guess would be that some kind of "library" is missing which is operating system independent.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20