Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect beep.wav audio format, use for playback #65

Merged
merged 2 commits into from
Dec 15, 2014
Merged

Detect beep.wav audio format, use for playback #65

merged 2 commits into from
Dec 15, 2014

Conversation

joelpurra
Copy link
Contributor

Simple patch which should fix playback problems on Ubuntu.
http://stackoverflow.com/questions/18942424/error-playing-audio-file-from-java-via-pulseaudio-on-ubuntu

@jetthe test please.

@jetthe
Copy link

jetthe commented Dec 14, 2014

Better but not perfect. My test results:
Version 3.0.2
openjdk-7-amd64: No beep, nothing. Same error message on the console as in the stackoverflow link.
java-8-oracle: Sporadic beeps, maybe every 10th turn. No error message.
java-7-oracle: Sporadic beeps, maybe every 10th turn. No error message.

Version 3.0.2 with patch
openjdk-7-amd64: Beep on every turn.
java-8-oracle: Sporadic beeps, maybe every 10th turn. No error message.
java-7-oracle: Sporadic beeps, maybe every 10th turn. No error message.

Versions:
openjdk-7-amd64
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

java-7-oracle
java version "1.7.0_72"
Java(TM) SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode)

java-8-oracle
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

@joelpurra
Copy link
Contributor Author

@jetthe: investigated it a bit further, and tried preloading the audio clip into memory on first use. Please have a look at it again =)

@jetthe
Copy link

jetthe commented Dec 14, 2014

@joelpurra Woop! c7afea0 works great on both oracle-java and openjdk.

@joelpurra
Copy link
Contributor Author

@jetthe: great! Hope the maintainers agree.

@farin
Copy link
Owner

farin commented Dec 15, 2014

great job. thanks

farin added a commit that referenced this pull request Dec 15, 2014
Detect beep.wav audio format, use for playback
@farin farin merged commit 2f614cf into farin:master Dec 15, 2014
@joelpurra joelpurra deleted the beep-audioformat-detection branch December 16, 2014 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants