Jmf

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ramola
    New Member
    • Sep 2007
    • 35

    Jmf

    I am totally new to JMF !

    I am developing a game wherein i am interested in outting some amount of sound !
    all that i know is tht it can be achieved using JMF !

    i know nothing beyond this !

    i was wondering if anybody culd help me guide ........as in tell me how to go about studying JMF n implementing it..

    n 1 very imp thing tht i want to know is does JDK 1.5 support JMF internally !
    or i need to install something in order to see a particular application using JMF function properly ?

    kind regards ,
    Malavika
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by malavikarane
    I am totally new to JMF !

    I am developing a game wherein i am interested in outting some amount of sound !
    all that i know is tht it can be achieved using JMF !
    Why not keep it simple and use the static method Applet.newAudio Clip.
    Personally I find it a strange class to put such method in but the method returns
    an AudioClip for you and has nothing to do with Applets; you can play()
    and stop() them at will and even more than one at a time can be played simultaneously.

    kind regards,

    Jos

    Comment

    • Ramola
      New Member
      • Sep 2007
      • 35

      #3
      Originally posted by JosAH
      Why not keep it simple and use the static method Applet.newAudio Clip.
      Personally I find it a strange class to put such method in but the method returns
      an AudioClip for you and has nothing to do with Applets; you can play()
      and stop() them at will and even more than one at a time can be played simultaneously.

      kind regards,

      Jos
      Applet.newAudio Clip. doesnt it require any applet thingee to run !
      My entire coding is in JFrames !

      i havent used applets anywhere !

      can u suggest any tutorial tht wuld b helpful !

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by malavikarane
        Applet.newAudio Clip. doesnt it require any applet thingee to run !

        My entire coding is in JFrames !

        i havent used applets anywhere !
        Did you *read* my reply?

        kind regards,

        Jos

        Comment

        • Ramola
          New Member
          • Sep 2007
          • 35

          #5
          Originally posted by JosAH
          Did you *read* my reply?

          kind regards,

          Jos

          yes i did.......

          I want to start with a very basic ex. initially !



          ok thanks alot !

          kind regards,
          Malavika

          Comment

          • pbmods
            Recognized Expert Expert
            • Apr 2007
            • 5821

            #6
            Heya, Malavika.

            JosAH's post mentions that it is a method of the Applet class, but it does not actually return an Applet.

            Comment

            • Ramola
              New Member
              • Sep 2007
              • 35

              #7
              Originally posted by pbmods
              Heya, Malavika.

              JosAH's post mentions that it is a method of the Applet class, but it does not actually return an Applet.
              hi,

              This was the vary basic example tht i thought of doing !
              but it doesnt seem to work........... ..

              Code:
              import java.applet.*;
              
              class Sound 
              {
              	public static void main(String[] args) 
              	{
              		try
              		{
              			System.out.println("Hello World!");
              			java.applet.AudioClip AudioClip clip =  new AudioClip(new URL("c://SOUND36.wav"));
              			clip.play();
              
              		}
              		catch (Exception ex)
              		{
              			System.out.println("Exception !!!");
              		}
              		
              	}
              }
              The error tht i am getting is really sad . Its something like this :

              C:\Sound.java:1 0: ';' expected
              java.applet.Aud ioClip AudioClip clip = new AudioClip(new URL("c://SOUND36.wav"));

              it shows a single pointer after 'new ' and before ' AudioClip'.

              I dont yarrrrrr....... .......what to do with this ! :(

              kind regards,
              Malavika

              Comment

              Working...