LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   No GUI app can produce sound. (https://www.linuxquestions.org/questions/linux-newbie-8/no-gui-app-can-produce-sound-850415/)

stf92 12-15-2010 11:30 AM

No GUI app can produce sound.
 
Kernel 2.6.21.5, Slackware 12.0
Xfce 4.4

Hi:
That's what I wanna do. For example I've just issued 'mplayer foo.flac' and I do not want an error made by me while in the GUI to issue a loud sound notifying me the error and putting in risk my speakers. Any hint will be welcome.

soppy 12-16-2010 05:58 PM

Load up the terminal and log in as Root. Then type
Code:

alsaconf
This will detect and set up your sound card. Once done, load your mixer program and you can adjust your volume.

tommcd 12-16-2010 08:30 PM

I have found that MPlayer in Slackware will sometimes use OSS by default instead of alsa when run from the terminal. To make sure that MPlayer uses alsa open the: ~/.mplayer/config file and put this in it:
Code:

# use alsa
ao=alsa

Then restart MPlayer. It will then always use alsa when you play your music.

mark_alfred 12-16-2010 08:35 PM

Quote:

Originally Posted by stf92 (Post 4192482)
I do not want an error made by me while in the GUI to issue a loud sound notifying me the error and putting in risk my speakers. Any hint will be welcome.

A loud sound can be a feedback issue. Are you also set up to do recording of some sort?

stf92 12-17-2010 01:47 AM

In no way. There are all sorts of sounds output by GUI apps to signal some kink of event. Put it another way: there are all kinds of events that produce audible notifications. Examples: email notification, the KDE desktop environment crashed, some program finished his job, and so on and so on.

I have just looked into ~/.mplayer/config and saw it is empty. OK. I'll proceed to put 'ao=alsa' in it. But before I do this, I would very much wish to know what was mplayer using up to now, ALSA or OSS. How could I know?

The system-wide configuration file /etc/mplayer/mplayer.conf has all of its lines commented out. One of these lines is this:
Code:

#Specify default audio driver
#ao=oss

I think it indicates the default is presently oss, notwithstanding the fact that they are commente out. In the man page, what mplayer does when he encounters no -ao option in either the config files or the command line is a mistery. Not a word.

Electro 12-17-2010 03:30 AM

Set the volume of your amplifier to a low level and then adjust if the audio is too low. Always start at low level. If you are controlling the sound from alsamixer or GUI tool, then you will have to load those programs up all the time, so you may want to setup a dual screen to have easy access to the mixer controls. Just find an option in XFce that disables system sound events. You can do the same in other desktop or window environments.

i92guboj 12-17-2010 03:32 AM

Quote:

Originally Posted by stf92 (Post 4194432)
In no way. There are all sorts of sounds output by GUI apps to signal some kink of event. Put it another way: there are all kinds of events that produce audible notifications. Examples: email notification, the KDE desktop environment crashed, some program finished his job, and so on and so on.

I have just looked into ~/.mplayer/config and saw it is empty. OK. I'll proceed to put 'ao=alsa' in it. But before I do this, I would very much wish to know what was mplayer using up to now, ALSA or OSS. How could I know?

The system-wide configuration file /etc/mplayer/mplayer.conf has all of its lines commented out but this
Code:

#Specify default audio driver
#ao=oss

seems to indicate the default is presently oss. In the man page, what mplayer does when he encounters no -ao option in either the config files or the command line is a mistery. Not a word.

You should first be running mplayer in command line, the output will clearly tell you which AO driver is being used. I've seem similar quirks when I had jackd installed on my system. My experience with it has been quite negative, to tell the truth.

stf92 12-17-2010 05:00 AM

Thanks for your kind reply, i92guboj. Running mplayer one of the lines is
Code:

CPLAYER: AO: [oss] 44100 etcetera.
So, it is OSS.
Regards.

stf92 12-17-2010 07:53 AM

Thanks Electro for replying. If Xfce, or for that matter any other DE should have such an option, it would be a great thing indeed. Up to now, I've seen that main Xfce apps (but he can run some KDE apps too) have the option. Perhaps I could go deeper and ask directly X to disable O.S. sound events. Any ways, I'll try to enter the Xfce forum, if there is one. Thanks again.

***************************

Sorry for the double post but I had missed Electro's answer.


All times are GMT -5. The time now is 09:18 AM.