Computer Science Canada

Sound in AU Format not loading

Author:  gsquare567 [ Fri Jan 12, 2007 4:29 pm ]
Post subject:  Sound in AU Format not loading

in my code, i load a .au file. it worked in past versions of the code, just isnt working now, so it has nothing to do with the class i use to load .au files. also, i load a .midi file before that and it works. it gives a NullPointerException in the java console for applets. there must be a problem in how i implement it in my code. heres where it happens:

Class that implements methods to create game:
code:
void gameStartup()
        {
                // load sounds and music
                music.load("music.midi");
                shoot.load("shoot.au"); // - line with problem
                //...


Abstract class that uses inplemented methods to generate game format:

code:
        abstract void gameStartup();
           //...
        public void init()
        {
                backBuffer = new BufferedImage(screenWidth, screenHeight, BufferedImage.TYPE_INT_RGB);
                g2d = backBuffer.createGraphics();

                sprites = new LinkedList<AnimatedSprite>();

                addKeyListener(this);

                gameStartup();// implemented by subclass - line with problem
        }


any ideas on what could be wrong? please remember this has worked before, just not by implementing a method from an abstract class.

Author:  gsquare567 [ Thu Jan 18, 2007 5:35 pm ]
Post subject:  Re: Sound in AU Format not loading

nvm, solved. having graphics problems now :S the graphics dont even show up. add me on msn if u can help in graphics or reply here w/ ur email or any suggestions.
my email = gsquare567alt@hotmail.com


: