It is currently Fri Apr 26, 2024 12:30 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 14 posts ] 
Author Message
Offline
 Post subject: CGoban and Stone Sound
Post #1 Posted: Mon Jul 19, 2010 7:19 pm 
Lives in sente
User avatar

Posts: 932
Location: New York, NY
Liked others: 146
Was liked: 150
Rank: KGS 1k
Universal go server handle: judicata
Hey guys, I've upgraded to the latest version Ubuntu (from several versions - I think Intrepid to Lucid), and now I cannot hear the stones clicking on KGS (CGoban). On the positive side, I can still hear them when I run it in XP through virtualbox, but I'd much rather run it natively.

I can still hear the alarms and the voice audio (i.e. in lectures), just not the sound clicking. Installing oss and running it in aoss mode doesn't help.

Ideas?

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #2 Posted: Mon Jul 19, 2010 7:25 pm 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
What flavor of java are you running? I recently discovered that upgrading ubuntu can result in your sun java getting replaced with some not-really-functional alternative.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku


This post by fwiffo was liked by 2 people: judicata, wms
Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #3 Posted: Mon Jul 19, 2010 7:33 pm 
Gosei
User avatar

Posts: 1639
Location: Ponte Vedra
Liked others: 642
Was liked: 490
Universal go server handle: Bantari
fwiffo wrote:
What flavor of java are you running? I recently discovered that upgrading ubuntu can result in your sun java getting replaced with some not-really-functional alternative.


Yeah, that's what I have discovered too.
If I understand this correctly, though, the Java should still be the same, but the browser plugin is different.

_________________
- Bantari
______________________________________________
WARNING: This post might contain Opinions!!

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #4 Posted: Mon Jul 19, 2010 7:53 pm 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
In my case it screwed up both, which kept it from working with the "-open" switch, so I couldn't open SGF files easily. And the fonts were wrong. And the sound didn't work. And everything looked funny.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #5 Posted: Mon Jul 19, 2010 8:20 pm 
Lives in sente
User avatar

Posts: 932
Location: New York, NY
Liked others: 146
Was liked: 150
Rank: KGS 1k
Universal go server handle: judicata
I'll double-check, but I think I've replaced it with sun-java and nothing happened really. The fonts DO look different than in Windows though, so maybe you're on to something.

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #6 Posted: Mon Jul 19, 2010 8:39 pm 
Lives in sente
User avatar

Posts: 932
Location: New York, NY
Liked others: 146
Was liked: 150
Rank: KGS 1k
Universal go server handle: judicata
Yippee! Thanks Fwiffo! I had installed sun-java, but had NOT removed open-jdk. Once I did that, I got my stone clicks back. Although the font still looks different, I actually like it a little better; and it loads much faster.

This makes me happier than it probably should, but that's okay.

For posterity: go to synaptic and install the sun-java6-jre package and remove openjdk-6-jdk, and openjdk-6-jre and similar packages.


This post by judicata was liked by: cdybeijing
Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #7 Posted: Mon Jul 19, 2010 11:57 pm 
Lives in gote
User avatar

Posts: 581
Location: Shanghai, China
Liked others: 96
Was liked: 100
Rank: IGS 2 dan
judicata wrote:
Yippee! Thanks Fwiffo! I had installed sun-java, but had NOT removed open-jdk. Once I did that, I got my stone clicks back. Although the font still looks different, I actually like it a little better; and it loads much faster.

This makes me happier than it probably should, but that's okay.

For posterity: go to synaptic and install the sun-java6-jre package and remove openjdk-6-jdk, and openjdk-6-jre and similar packages.


I wondered for a long time why I was having the exact same problem. This is great, thanks.

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #8 Posted: Tue Jul 20, 2010 12:03 am 
Lives in gote
User avatar

Posts: 450
Location: Portland, OR USA
Liked others: 257
Was liked: 287
KGS: wms
It's so frustrating that Ubuntu uses the "-open" version by default. Sun java sucks bad enough, but the "-open" version is even worse. So many little bugs that it has in *addition* to all the irritations of Sun's version. :(

Well, glad you got it straightened out in the end!

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #9 Posted: Tue Jul 20, 2010 7:34 am 
Gosei
User avatar

Posts: 1435
Location: California
Liked others: 53
Was liked: 171
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
I actually don't think you have to remove the openjdk version, you just have to use update-alternatives to set sun java as the default.

_________________
KGS 4 kyu - Game Archive - Keyboard Otaku

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #10 Posted: Tue Jul 20, 2010 8:15 am 
Gosei
User avatar

Posts: 2116
Location: Silicon Valley
Liked others: 152
Was liked: 330
Rank: 2d AGA
GD Posts: 1193
KGS: lavalamp
Tygem: imapenguin
IGS: lavalamp
OGS: daniel_the_smith
Oh, I have this problem too, I'll have to see if that fixes it...

_________________
That which can be destroyed by the truth should be.
--
My (sadly neglected, but not forgotten) project: http://dailyjoseki.com

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #11 Posted: Tue Jul 20, 2010 12:56 pm 
Lives in sente
User avatar

Posts: 932
Location: New York, NY
Liked others: 146
Was liked: 150
Rank: KGS 1k
Universal go server handle: judicata
fwiffo wrote:
I actually don't think you have to remove the openjdk version, you just have to use update-alternatives to set sun java as the default.


I tried that first and got an error. I may have just typed the command wrong, though; I'm not at home so I can't double check.

A primary reason I use Ubuntu is that I strongly prefer open software, so I hate it when things don't work right.

On an unlreted note, I also hate it when some design team makes almost arbitrary decisions that completely depart from established practice, with little or no benefit to usability. Case in point: moving all of the window controls (minimize, maximize, close) from the upper-right side of a window to the upper-left. Even better, there wasn't an obvious way to change it back (although it is pretty easy to do--just not obvious).

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #12 Posted: Fri Jul 23, 2010 1:18 am 
Lives in gote
User avatar

Posts: 581
Location: Shanghai, China
Liked others: 96
Was liked: 100
Rank: IGS 2 dan
judicata wrote:
fwiffo wrote:
I actually don't think you have to remove the openjdk version, you just have to use update-alternatives to set sun java as the default.


I tried that first and got an error. I may have just typed the command wrong, though; I'm not at home so I can't double check.

A primary reason I use Ubuntu is that I strongly prefer open software, so I hate it when things don't work right.

On an unlreted note, I also hate it when some design team makes almost arbitrary decisions that completely depart from established practice, with little or no benefit to usability. Case in point: moving all of the window controls (minimize, maximize, close) from the upper-right side of a window to the upper-left. Even better, there wasn't an obvious way to change it back (although it is pretty easy to do--just not obvious).


After getting used to Lucid since its initial release, I now wish there was an easy way for me to change the window controls on my Windows work pc from the right side to the left...

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #13 Posted: Mon Oct 04, 2010 9:01 pm 
Lives in sente
User avatar

Posts: 932
Location: New York, NY
Liked others: 146
Was liked: 150
Rank: KGS 1k
Universal go server handle: judicata
Even after the action described above, I could only hear cgoban and nothing else.

Then, I found this thread, which gets java to use aoss without having to launch through a terminal each time.

First, make sure you have aoss installed, then:

Code:
cd /usr/lib/jvm/java-6-sun/jre/bin
sudo mv java java.bin
sudo touch java
sudo chmod +x java
sudo gedit java

Then, insert the following code into the java file
Code:
#!/bin/bash
aoss /usr/lib/jvm/java-6-sun/jre/bin/java.bin "$@"


Should be good to go.

Top
 Profile  
 
Offline
 Post subject: Re: CGoban and Stone Sound
Post #14 Posted: Tue Oct 19, 2010 5:07 pm 
Dies in gote

Posts: 69
Liked others: 29
Was liked: 29
Rank: EGF 1d
KGS: CBlue
The command to "activate" one of several installed Java flavours is

sudo update-alternatives --config java

Note that basic OpenJDK-Java in Ubuntu, as WMS hinted, will be usually glitchy enough to not produce any stone sound at all, as was said above, while SunJava (now acquired by Oracle) will produce sound fine, but on 99% of modern sound hardware (ie ones lacking multi-channel hardware-mixing) will hog the sound device and therefore prevent other apps from playing sound while cgoban is running. Or the other way round, if another app is already playing music, Java (and Cgoban) will not produce sound.

To fix this by wrapping the Java sound output into a mixable stream, with Ubuntu for a while now shipping with Pulseaudio as default sound server, you might want to try padsp instead of aoss. You might have to install Pulseaudio utilities to get it, I'm not entirely sure and too lazy to check right now :-p. But you might want pavucontrol and padevchooser anyway, so just install all pulseaudio tools you can find. Similar to aoss, the command then will be

padsp javaws cgoban.jnlp

or for stand-alone aka offline version of CGoban, if you downloaded one

padsp java -jar cgobanwhatever.jar

Apart from latest Ubuntu going for Pulseaudio instead of just ALSA, personally I found padsp working more reliably than aoss, although it can still cease working after a while depending on various factors (if some preloading goes bad). If that happens, it might be required to terminate all apps that currently utilize Pulseaudio, then restart them and cgoban. (Basically same annoying procedure that would also happen to aoss).

The technically most low-level and therefore supposedly most reliable approach would be ossproxy, which however is still sort of beta or even alpha.. for many people it seems to work, but sometimes it just doesn't work at all, and also it requires certain kernel configs and possibly compiling stuff (possibly including kernel) yourself. OSSproxy creates fake sound devices, and sort of forwards all input to the pulseaudio server (or ALSA, if desired on different distros than Ubuntu). For this, a kernel is required that doesn't preclaim OSS device paths, and also a CUSE-supporting FUSE library will be neccesary, so things get a bit technical. Basically, search for OSSproxy on Sourceforge, to get the latest code.

As a side note, you might wonder about claims how Java supports ALSA - this doesn't mean it won't hog the oss sound device (aka /dev/dsp) unfortunately. Although it utilizes ALSA, it'll still try to reserve it exclusively..so yeah, padsp all the way (or aoss on older/other Linux distributions).


This post by C. Blue was liked by 3 people: judicata, wms, xed_over
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group