Author Topic: Sound with JMF  (Read 2300 times)

Offline MegasXLS

  • byte
  • *
  • Posts: 29
    • View Profile
Sound with JMF
« on: August 18, 2010, 03:01:44 pm »
Hell guys,
first i'm brazilian so sorry for the bad english.

I'm trying use the jmf in my aplicattion using jpct.

For execute my aplication with jpct i have change the VM options : -Djava.library.path="C:\Documents and Settings\Roxas\Meus documentos\NetBeansProjects\jpct\lib\lwjgl-2.4.2\native\windows"

When i change the VM options show the error: Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 24000.0 frame rate, FrameSize=32768 bits
Failed to realize: com.sun.media.PlaybackEngine@df6ccd
Error: Unable to realize com.sun.media.PlaybackEngine@df6ccd
18/08/2010 09:54:14 exemplo4jpct.PlayMedia <init>

But when i don't change the VM options, i listen my music clear.

Thanks in advance.

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: Sound with JMF
« Reply #1 on: August 18, 2010, 07:50:56 pm »
You probably need to include the library path to both the JMF natives and the LWJGL natives.  You would separate the two paths with a colon (:), I believe (in Linux it is a colon, but it might be a semicolon or something else in Windows since its path names have colons in them).  Or you could copy the natives from either LWJGL or JMF into the directory of the other, so you only need one library path.

Offline MegasXLS

  • byte
  • *
  • Posts: 29
    • View Profile
Re: Sound with JMF
« Reply #2 on: August 19, 2010, 03:42:55 pm »
I have make this, the both options that you say
but i don't listen any music.
The error continue:

Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 24000.0 frame rate, FrameSize=32768 bits
Failed to realize: com.sun.media.PlaybackEngine@df6ccd
Error: Unable to realize com.sun.media.PlaybackEngine@df6ccd
19/08/2010 10:38:04 exemplo4jpct.PlayMedia <init>
SEVERE: null

=(

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: Sound with JMF
« Reply #3 on: August 19, 2010, 10:37:11 pm »
I can't think of anything that would cause it to work until you change the library path, other than missing natives.  Are there any other VM options you are adding or removing besides "-Djava.library.path..."?  Also, doesn't playing mpeglayer3 require a JMF plug-in?  If so, that might be something else to look at (things like how the plug-in is registered, if it has natives of its own, etc).  I've used JMF very little myself, so sorry I can't be any more help.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: Sound with JMF
« Reply #4 on: August 19, 2010, 11:31:48 pm »
No idea either...i don't really see how adding lwjgl to the library path can break jmf... ???

Offline MegasXLS

  • byte
  • *
  • Posts: 29
    • View Profile
Re: Sound with JMF
« Reply #5 on: August 20, 2010, 02:16:44 pm »
I have move the archives natives of the lwjgl for the jdk/lib past. Remove the VM options e the music are playing. =)

Thx for the help. Paul o/