- In the extension bar, click the AdBlock Plus icon
- Click the large blue toggle for this website
- Click refresh
- In the extension bar, click the AdBlock icon
- Under "Pause on this site" click "Always"
- In the extension bar, click on the Adguard icon
- Click on the large green toggle for this website
- In the extension bar, click on the Ad Remover icon
- Click "Disable on This Website"
- In the extension bar, click on the orange lion icon
- Click the toggle on the top right, shifting from "Up" to "Down"
- In the extension bar, click on the Ghostery icon
- Click the "Anti-Tracking" shield so it says "Off"
- Click the "Ad-Blocking" stop sign so it says "Off"
- Refresh the page
- In the extension bar, click on the uBlock Origin icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the uBlock icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the UltraBlock icon
- Check the "Disable UltraBlock" checkbox
- Please disable your Ad Blocker
- Disable any DNS blocking tools such as AdGuardDNS or NextDNS
- Disable any privacy or tracking protection extensions such as Firefox Enhanced Tracking Protection or DuckDuckGo Privacy.
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
Question
HopkinsProgramming
Perhaps you all can help me with this. I am using the program Robocode, to make my little death, bringing mayhem causing robot. I would like for it to play a sound to add to the effect.
I know that it can play sounds, I have gotten a Mac to play a 6kb random wave file that I have found. However, it will not play on my computer, and this is where I need to develop and test it.
I found the below code on the internet, and it worked sucessfully on the Mac.
However, whenever I try to play the sound on my pc, I get this error:
java.lang.NullPointerException
at com.sun.media.sound.DirectAudioDevice$DirectClip.open(Unknown Source)
at com.sun.media.sound.DirectAudioDevice$DirectClip.open(Unknown Source)
at myRobot.myRobot.playSound(myRobot.java:206)
at myRobot.myRobot.run(myRobot.java:23)
at robocode.peer.RobotPeer.run(RobotPeer.java:633)
at java.lang.Thread.run(Unknown Source)
The file is in the same relative directory on my as it was on the mac.
Do you guys have any idea as to shy this might be happening?
I have Java 1.5.0 update 6 installed on my pc. I know that robocode only works with v1.4.2, so I have update 11 or 13 of that installed on my pc and robocode is configured to use the rt.jar of the 1.4.2 JRE.
Thanks for the help! :)
Also, the wave file that sucessfully played on the Mac is attached.
ringout.wavFetching info...
Link to comment
https://www.neowin.net/forum/topic/453817-java-robocode-playing-a-sound/Share on other sites
5 answers to this question
Recommended Posts