You are not logged in.

#1 2009-10-13 00:39:48

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

[Solved]OSS Questions

1) I have the following in my xbindkeysrc to increase/decrease volume by 5

# volume control
"ossmix vol +5"
    m:0x40 + c:112
    Mod4 + Prior

"ossmix vol -- -5"
    m:0x40 + c:117
    Mod4 + Next

"ossmix vol 0"
    m:0x40 + c:115
    Mod4 + End

The ossmix line work perfectly in CLI. But when I assign them to the keybindings, the one for decreasing the volume does not work. This is probably a xbindkeys issue which does not like the -- (just my guess though). Ideally it would work with the Fn + Pg Up and Fn + Pg dn keys, but I am using the windows key, because xev doesn't recognize the Fn key at all sad

What can I do so that it accepts the keybinding for decreasing the volume?


2) For mute, I simply set the volume to 0. But, I was searching the web and I found a patch for toggling of the volume here How can I apply this patch to my oss ?

Note that I would have to do this for version 4.1 -- since oss4.2, for some reason doesn't support my card.

Here's the website that I found the soundcards that are supported on version 4.2. If someone can also provide me a link that shows the sound card supported by oss4.1, I can then email the oss devs and ask them as to why they dropped support for my card since 4.1 definitely works on my machine.


My sound card is ESS Maestro3 and uses the oss_allegro module.

Last edited by Inxsible (2009-10-14 06:07:11)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#2 2009-10-13 01:05:24

guzz46
Member
From: New Zealand
Registered: 2009-06-18
Posts: 190

Re: [Solved]OSS Questions

I don't know if you have tried this but when i was using oss this worked fine with xbindkeys

"ossmix vmix0-outvol -- -1"

"ossmix vmix0-outvol -- +1"

Offline

#3 2009-10-13 01:17:05

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [Solved]OSS Questions

yeah, my mixer name is vol. and vmix0-outvol is a monovol -- so it doesn't increase/decrease the left and right speakers evenly for me, whereas the vol does


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#4 2009-10-13 06:05:15

guzz46
Member
From: New Zealand
Registered: 2009-06-18
Posts: 190

Re: [Solved]OSS Questions

It's a bit odd that it works in the terminal but not with xbindkeys, if you happen to be running compiz you could see if it works in compiz's commands section

As a side note you could also try something like this to mute & unmute

ossmix misc.front-mute ON
ossmix misc.front-mute OFF

Depending on what your mixer's names are

Offline

#5 2009-10-13 10:26:33

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [Solved]OSS Questions

This is what I'm using atm.

# xbindkeysrc
# Volume
"vmix +2"
  m:0x0 + c:176

"vmix -2"
  m:0x0 + c:174

"vmix toggle"
  m:0x0 + c:160

# Player
"mocp -r"
  m:0x0 + c:144

"mocp -f"
  m:0x0 + c:153

"mocp -G"
  m:0x0 + c:162

"mocp -s"
  m:0x0 + c:164
#vmix
#!/bin/sh

MIXER=vmix0-outvol
MAXVOL=25

CURRENTVOL=`ossmix -d0 $MIXER | awk '{print $10}'`
CURRENTVOL=${CURRENTVOL/.*}


case "$1" in
    toggle)
   VOLUME=$(cat $HOME/.volume)
   if [ "$CURRENTVOL" -le 0 ]; then
       ADJUSTED=$VOLUME
       > $HOME/.volume
      
   else
       ADJUSTED=0
       echo $CURRENTVOL > $HOME/.volume

   fi
   
    ;;
   
    *)       
   ADJUSTED=$(($1+$CURRENTVOL))

   
       
esac

if (( $ADJUSTED < 0 )) ; then
    ADJUSTED=0 ;
fi
 
if (( $ADJUSTED > $MAXVOL )) ; then
    ADJUSTED=$MAXVOL ;
fi
ossmix -d0 $MIXER $ADJUSTED:$ADJUSTED

Last edited by Mr.Elendig (2009-10-13 10:27:07)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2009-10-13 10:43:13

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: [Solved]OSS Questions

Have a look at ghost1227's ossvol


English is not my native language .

Offline

#7 2009-10-13 17:41:08

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [Solved]OSS Questions

Thanks guzz, elendig and nezmer. I will try out all the options later tonight and then see which one i like.

guzz's idea probably needs two keybindings - though not a  big deal.

and elendig and nezmer's ideas are good because I wouldn't have to go about patching oss on every upgrade, since its already been done once smile


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#8 2009-10-13 18:12:58

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: [Solved]OSS Questions

Ah, not trying to repeat anyone, but I found the easiet way was to simply use "ossvol" as it appears to work through oss versions. I'm not a big fan of dealing with patches all the time. I have this is my .xbindkeysrc and haven't had a problem.

"ncmpcpp prev"
XF86AudioPrev

"ncmpcpp toggle"
XF86AudioPlay

"ncmpcpp next"
XF86AudioNext

"ncmpcpp stop"
XF86AudioStop

"ossvol -t"
XF86AudioMute

"ossvol -d 2"
XF86AudioLowerVolume

"ossvol -i 2"
XF86AudioRaiseVolume

"ncmpcpp volume -10"
Shift+XF86AudioLowerVolume

"ncmpcpp volume +10"
Shift+XF86AudioRaiseVolume

Offline

#9 2009-10-14 06:06:54

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [Solved]OSS Questions

went ahead and installed ossvol. Thanks guys.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB