Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Java Sound & OpenAL / Re: How do I play a sound without using an applet? on: 2003-06-04 05:41:37
okay, I've tried running your LatencyTest from your soundAPI but I get this error.

Exception in thread "main" java.lang.NoClassDefFoundError: com/dnsalias/java/gag
e/sound/WaveEngine
       at LatencyTest.main(LatencyTest.java:28 )


I tried setting the Classpath, but without succes.

By the way, I've figured out how to play .au files but the sound API doesn't support .xm files, which I want to use as background music.
2  Java Game APIs & Engines / Java Sound & OpenAL / Re: How do I play a sound without using an applet? on: 2003-06-03 15:53:14
Quote
The javax.sound package doesn't work in 1.1 applets, only 1.4. Applets originally used Applet.getAudioClip() until javax.sound was added to give applications and applets more sound control.


I don't think I've been clear enough. I do not know how to play a sound without using an APPLET.
Meaning using a Frame or a JFrame.
Is that possible?
Because I run into this problem:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
import java.applet.*;
import java.awt.*;
import javax.swing.*;

public class SoundFrame extends JFrame{
      private AudioClip snd;
      private JButton play = new JButton("Play");
      private JButton stop = new JButton("Stop");

      public SoundFrame(){
            JPanel buttons = new JPanel();
            buttons.add(play);
            buttons.add(stop);
      }

      public boolean action(Event e, Object o){
      if (e.target == play)
         snd.play();
      else if (e.target == stop)
         snd.stop();
      return true;
   }
      public void loadSound(){
            try{
                  snd = getAudioClip(, "music.au"); // right here, it's in a directory not in a URL
            }
            catch(Exception e){
                  System.err.println("Error loading sound");
            }
      }
}


Quote
Did you put sound.jar in your classpath? You may want to try getting the "LatencyTest" example working before you try doing anything else. If you still have problems, post the error message here and I'll take a look at it.  


Whoops, that's not what I meant. I meant that I can't get even to your website. Page not found.
3  Java Game APIs & Engines / Java Sound & OpenAL / Re: How do I play a sound without using an applet? on: 2003-06-03 14:31:45
You mean it's possible to use the javax.sound packages to play a sound without using an applet? I'd sure like to see a simple example. By the way, I can't load your GAGESound library.
4  Java Game APIs & Engines / Java Sound & OpenAL / How do I play a sound without using an applet? on: 2003-06-03 11:50:55
Preferably a .xm or .ogg fileĀ Smiley
5  Java Game APIs & Engines / Java 2D / Listener problems on: 2003-04-20 16:27:47
Whenever I click on of my buttons I created I see the button repainted on the top left of my panel. Why is that?

6  Java Game APIs & Engines / Java 2D / Re: does Java2D support transparency for images? on: 2003-04-20 10:33:27
Thanks, I feel so stupid now. I just forgot the A in ARGB  Grin.
7  Java Game APIs & Engines / Java 2D / Re: does Java2D support transparency for images? on: 2003-04-18 11:52:08
GIMP and it's transparent in there
8  Java Game APIs & Engines / Java 2D / does Java2D support transparency for images? on: 2003-04-18 07:34:09
I tried with png's but instead of transparent it turned up black   Sad.
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

SHC (24 views)
2014-11-25 12:00:59

SHC (22 views)
2014-11-25 11:53:45

Norakomi (19 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (67 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!