No sound in Java - No sound in flash - OSS for ALSA

Everything about X, Gnome, KDE, ... and everything running on it

No sound in Java - No sound in flash - OSS for ALSA

Postby George_Kirkham » 2007-08-09 11:53

Hi,

Should anyone be visiting this page, I have found solutions to getting Sound working under Java and Flash. Maybe you have some tips regards my comments below ?

Previously I had been frustrated because sound was not working in Runescape or other internet based Java aplications. I had not tested local java for sound until I downloaded the JavaSoundDemo (http://java.sun.com/products/java-media ... SoundDemo/) to test Java sound, and then found that sound was not working.

When I first was trying to solve my sound issue, I did have working sound from Linux GNome via ALSA and the pacakge alsa-oss was loaded, therefore I was able to hear sound from music CDs and from system sounds. The (Desktop -> Preferences -> Sound (Sound Preferences), Sounds tab and "Enable software sound mixing (ESD)", "Play system sounds" were both checked. Of course I also had installed sun-java5-jre, sun-java5-plugin and flashplugin-nonfree.

However Flash and Java were not providing sound.

After many days of searching, I finally found someone who gave the required information "by default 'libesd' is installed but you need to install 'libesd-alsa0' for ALSA sound to work", and after selecting and installing 'libesd0-alsa0' sound for flash worked (eg youtube and other flash video clips).

Please note: installing libesd-alsa0 will uninstall libesd0, this is not a problem.

However Java sound was still not working. After much more researching I found something very simple that I had previous tried but decided did not work as I had not at that time been using 'libesd-alsa0'. What I found was that many linux programs are designed to use OSS, well thought I knew this, I had believed that alsa-oss was to allow APIs for OSS to work from caling programs, so that any OSS program would be able to work, but this assumption was wrong, to have sound working for programs what were designed for OSS, I needed to prefix the program with 'aoss', for example, from a terminal window, run 'aoss /usr/bin/epiphany' and then I had sound in epiphany web browser. For sound in Sun's JavaSoundDemo, 'aoss java -jar JavaSoundDemo.jar'. If anyone reading this knows of an easier way that to use to get epiphany sound to work with ASLA without using 'aoss', please reply to this post.

Getting "iceweasle" Java sound to work was very easy (once I knew what to do), it was to edit the file '/etc/iceweasel/iceweaselrc' to change the line 'ICEWEASEL_DSP="none"' to 'ICEWEASEL_DSP="aoss"'. Please note, you will need to edit this file as root (ie the administrator) to be able to make changes (I run the command 'nautilus --no-desktop --browser' from a terminal window so I get a file browser with 'root' access and then it can easy find the file, right click, then select 'Open with "Text Editor").

Well with these few simple steps, I have sound working for Java and Flash. Very pleasing. And I must say, I do like Linux.

Summary:
Tips for Debian ALSA Sound:

1) Edit the file '/etc/apt/sources.list' and modify
deb http://ftp.au.debian.org/debian/ etch main non-free
deb http://security.debian.org/ etch/updates main contrib non-free

2) Ensure that you have alsa and alsa-oss installed and working (if you have installed ALSA and don't have sound, don't forget to run 'alsaconf' as root (ie administrator) if you have not done so).

3) Install 'libesd0-alsa0'

4) run programs that use OSS by using 'aoss' in front of the command, eg 'aoss /usr/bin/epiphany'

5) for Iceweasel, change 'ICEWEASEL_DSP="none"' to 'ICEWEASEL_DSP="aoss"' in the file '/etc/iceweasel/iceweaselrc'

Other Tips


In the file /etc/apt/sources.list, add the line"
deb http://www.debian-multimedia.org etch main

You may also want to add the line (Hey, someone respond, please, is there a better site to use?):
deb http://mirror.home-dn.net/debian-multimedia/ etch main

Install w32codecs for video decoding (ie displaying various video of various formats)

Install libdvdplay0, libdvdread3, dvd+rw-tools, gnomebaker, gstreamer0.8-mpeg2dec, libdvdcss2, libdvdnav4.

I use VLC for playing videos (in both Linux and in Windows), is there a better DVD/Video Player ?


One thing I would request of anyone reading this, if you know of other simple tips for sound, video, USB Video cameras, Fire Wire, USB memory drives, Digital Still cameras DVD writers or other devices to help with configuration or installation which does not happen with a standard installation, please post back here for me and others to pick up, as I would not like to say how long it took me to find the above simple points amongst the strange 'recompile your kernnel', and 'rebuild your ALSA drivers' type of suggestions.



Well I am posting these points that helped me, up here in this thread, in the hopes it helped you. If it did, please post back, it will give me an idea of the number of others who would benefit from a list of simple good tips to make your Debian installation more complete.
George_Kirkham
 
Posts: 57
Joined: 2007-01-31 03:00
Location: Canberra, ACT, Australia

Postby jrc » 2008-11-11 19:33

:D

I am quite new to Debian (2 months) and I have been struggeling to get sound to work with flash... I have found info about installing 'libesd0-alsa0' in several places, but never noticed that I should also run 'alsaconf' - this did the trick for me - thank you!

Why is the 'alsaconf' not run by default, when I install the library? I can see that alasconf is part of package alsa-utils, but if it should be run after installing 'libesd0-alsa0', should this not be a part of the installation of 'libesd0-alsa0'?

A bit confused but happy for now :-)

Kind regards
jrc
 
Posts: 1
Joined: 2008-11-11 19:21

Postby BioTube » 2008-11-11 23:16

Usually, running alsaconf isn't necessary. There are corner cases, though.
Image
Ludwig von Mises wrote:The elite should be supreme by virtue of persuasion, not by the assistance of firing squads.
User avatar
BioTube
 
Posts: 7551
Joined: 2007-06-01 04:34

Postby RawMustard » 2008-11-12 03:13

Or just replace that crystal radio they call alsa with a full blown stereo called OSS41. Very easy to get up and running in Debian.

Build OSS41

Help can be had here
User avatar
RawMustard
 
Posts: 119
Joined: 2008-09-15 12:06


Return to Desktop & Multimedia

Who is online

Users browsing this forum: cooler01 and 8 guests

fashionable