[PATCH] Add mplayer and an argument for ossplay (soundplayer)
--- a/gui_interface.py +++ b/gui_interface.py @@ -2988,11 +2988,15 @@ if gajim.config.get('soundplayer') == '': # only on first time Gajim starts - commands = ('aplay', 'play', 'esdplay', 'artsplay', 'ossplay') + commands = ('aplay', 'play', 'esdplay', 'artsplay', 'ossplay', 'mplayer') for command in commands: if helpers.is_in_path(command): if command == 'aplay': command += ' -q' + elif command == 'ossplay': + command += ' -qq' + elif command == 'mplayer': + command += ' -quiet' gajim.config.set('soundplayer', command) break
ossplay should be between
play. I think mplayer is irrelevant since ALSA or OSS has to be presented, but maybe I am wrong.
More to add:
Where a quiet switch is not available or is not completely quiet, we can use
yauap > /dev/null mplayer > /dev/null 2>&1
We can use
> /dev/null 2>&1for all instead of defining a switch, for each command, with
gstreamer most of the time need oss or alsa, so yauap and gst123 are useless.
mplayer also need oss or alsa, these are the sound systems
Problem with ALSA and PulseAudio.
[03:58:38 AM] younishd: Darlan, aplay: main:722: audio open error: Device or resource busy [03:59:21 AM] younishd: I'm getting lots of that message in terminal [04:00:14 AM] younishd: maybe sound notifications fail [04:01:00 AM] younishd: Darlan, yea indeed: I can reproduce it when I go in settings and play the notifications [04:01:17 AM] younishd: I'm using alsa+pulseaudio [04:01:39 AM] younishd: aplay is pure alsa but I'm not sure [04:04:58 AM] TheWhiteFang: advance > open > soundplayer # perhaps resolve by this way ? [04:08:30 AM] younishd: TheWhiteFang, yea but I have no idea what program to use [04:08:58 AM] younishd: aplay came with alsa but it seems to fail for some reason (maybe because I'm using pulse) [04:09:18 AM] younishd: amarok lol [04:10:46 AM] younishd: pacat I think [04:10:59 AM] younishd: pacat(1) General Commands Manual pacat(1) NAME pacat - Play back or record raw or encoded audio streams on a PulseAudio sound server [04:13:20 AM] younishd: TheWhiteFang, seems to work [04:13:21 AM] younishd: pacat -p [04:13:25 AM] younishd: thanks for the tip [04:13:54 AM] TheWhiteFang: I do nothing ^^ [04:14:02 AM] younishd: ^^ [04:18:58 AM] TheWhiteFang: http://linux.die.net/man/1/paplay # better ? [04:21:38 AM] younishd: TheWhiteFang, quite similar [04:22:02 AM] younishd: paplay and pacat [04:22:09 AM] younishd: it works so I don't care [04:22:10 AM] younishd: ^^ [04:22:21 AM] TheWhiteFang: or pacat -p call paplay ? [04:22:36 AM] younishd: that's what I think yea [04:23:36 AM] younishd: you can even mention a name for the client I think [04:23:38 AM] younishd: -n [04:25:41 AM] younishd: pacat -n 'gajim' -p