LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Sound stops in certain applications if any other application plays a sound file. (https://www.linuxquestions.org/questions/linux-software-2/sound-stops-in-certain-applications-if-any-other-application-plays-a-sound-file-532905/)

gregorian 02-27-2007 08:23 AM

Sound stops in certain applications if any other application plays a sound file.
 
I'm using RH9 and using the KDE.

If I'm watching a flash video, the sound plays only if no other sounds have been played before loading the swf file (Sounds include system beeps). If *any* sound plays before or during the flash video, the sound from the video ceases. The only way I can watch the flash video without experiencing a loss in sound, is to ensure that no other sound is played before opening the file. This means that I can never play any song on the computer before loading the swf file if I'm to watch the video with its sound.

I'm not using Flash Player 9 but Flash Player 7. Flash Player 9 does not play the sound under any circumstance, and often crashes my browser.

I face the same problem with a game called Chromium, so the problem does not lie in the Flash software alone, unless both of them are bugged (Chromium is shipped along with RH9).

I googled for help and came across some web pages which mentioned that some applications "capture" the sound device; but I'm not entirely sure if that is the problem, as my sounds are interrupted by ordinary system beeps too.


Thank you for your help.

EDIT: NEVER MIND. PROBLEM SOLVED BY UPGRADING OS

hansalfredche 02-27-2007 08:45 AM

Is RH using OSS or ALSA? If it uses OSS, try ALSA. Flash Player 9 requires ALSA, as much as I know.

Maybe this helps.

gregorian 02-27-2007 09:25 AM

I don't know. When I issue ps -e, it shows artsd in the list. I've always thought that this is the sound daemon. Besides, the problem is not limited to flash; it also applies to Chromium. Note that Flash plays the sound-- it only stops if something else is played before or during the playback of the video.

Thanks for the help.

hansalfredche 02-27-2007 09:49 AM

arts is only a sound server which uses either ALSA or OSS (if I remember correctly - at least it works with ALSA, this is sure). The new Flash Player like other applications talk to the sound "infrastructure" itself, that is either ALSA or OSS. Use your rpm manager to find out what is installed and what not. What version are installed? I remember having such problems long ago with Mandriva (was still Mandrake at the time), but they have gone now ...

gregorian 02-27-2007 11:12 AM

Well, I searched for the rpm oss, but I couldn't find it. But I found this: alsa-lib-0.9.8-1.fr.i386.rpm

Since there isn't any oss rpm on the system, I assume that the system uses alsa. It isn't a problem with Flash Player 9. If there was a problem with alsa, it should not have played the sound in the first place, right? What I can't understand is-- why do Chromium and flash stop playing sound after any sound is played on the system?

Is something "capturing" the sound device as it is called?

reddazz 02-27-2007 12:11 PM

I doubt that you are using alsa because with alsa you can play sounds from multiple apps at the same time without one source stopping. Instead of wasting time with an old, outdated and unsupported distro why not just use something newer e.g. Fedora Core. All modern distros support alsa out of the box and OSS has now been deprecated.

hansalfredche 02-27-2007 12:30 PM

Well, at least older versions of ALSA did not allow more than one application accessing the sound card (if the card didn't supported it itself, like many on-board chips). You could try to update your ALSA package, seems there are some more recent packages on http://rpm.pbone.net .

@reddazz

It seems gregorian has (an old version of) ALSA installed. And like I wrote above, at least older (but not THAT old) versions of ALSA wouldn't allow more than one application. I had the problem myself. Why change if the rest works? He could just as well change to Ubuntu then ;)

reddazz 02-27-2007 12:43 PM

Quote:

@reddazz

It seems gregorian has alsa installed. And like I wrote above, at least older (but not THAT old) versions of alsa wouldn't allow more than one application. I had the problem myself. Why change if the rest works? He could just as well change to Ubuntu then
Sometimes its not worth the hassle and getting something newer is less problematic than trying to fix some problem on an old release.

gregorian 02-27-2007 08:22 PM

I downloaded this package: http://www.alsa-project.org/alsa/ftp....14rc2.tar.bz2

But when I tried to install it, I got errors. Here is the last part:

Code:

sound.c: In function `snd_open':
sound.c:171: warning: assignment discards qualifiers from pointer target type
sound.c:176: warning: assignment discards qualifiers from pointer target type
sound.c: At top level:
sound.c:380: warning: `struct device_attribute' declared inside parameter list
sound.c:381: conflicting types for `snd_add_device_sysfs_file'
/home/<******>/Desktop/alsa-driver-1.0.14rc2/include/sound/core.h:239: previous declaration of `snd_add_device_sysfs_file'
make[1]: *** [sound.o] Error 1
make[1]: Leaving directory `/home/<******>/Desktop/alsa-driver-1.0.14rc2/acore'
make: *** [compile] Error 1


While playing videos in Mplayer, I see this:

AO: [oss] 22050Hz 2ch s16le (2 bytes per sample)

How do I switch to alsa? I've already pointed out that an alsa is package already present on my system.


All times are GMT -5. The time now is 10:59 PM.