This site requires JavaScript, please enable it in your browser!
Greenfoot back
Busch2207
Busch2207 wrote ...

2012/4/29

play wav files in loop...

Busch2207 Busch2207

2012/4/29

#
This is especially to the greenfoot Team... I recognized, that it's not possible to play wav files in loops any more... Here is the code, I've written, to check it out:
    private GreenfootSound GS_Fire = new GreenfootSound("Fire.WAV");
    public void act() 
    {
        System.out.println(GS_Fire.isPlaying());
        GS_Fire.playLoop();
    }
And it always prints: false and you don't hear anything...
USBest USBest

2012/4/30

#
Have you tried it with other files? e.g. mp3 or midi?
Busch2207 Busch2207

2012/4/30

#
I tried it with mp3 and it worked fine... It just don't work with wav files... I'm sure, there is no error in my code, I think there might be a small error with the GreenfootSound class...
davmac davmac

2012/4/30

#
Yep, there's a bug in Greenfoot 2.2.0. Turns out that nobody tested this with the beta, unfortunately! We'll fix it in the next release.
SPower SPower

2012/4/30

#
I also thought there might be a bug doing this with the beta, but I thought that my code was wrong. Sorry for not reporting this :(, next time, I'll do.
You need to login to post a reply.