You are not logged in.

#1 2013-09-22 21:42:27

spotshot6544
Member
Registered: 2013-07-18
Posts: 9

bypass master volume for constant white noise play (KDE)

Is there a way to play sound while ignoring the master volume control, even bypassing mute?

I have tinnitus (ringing in the ears) and I get relief of these symptoms by playing white noise 24/7, I currently am using http://playnoise.com/ but there are many different sources of white noise, it could even be an mp3. I like it to be playing at the same volume, all the time, no exceptions. But, when I turn the volume up and down via my media keys or system tray, for a song playing in Amarok or a video playing in YouTube the white noise is also turned up and down, this is not needed or desired.

What I'm trying to do goes against the definition of what a master volume is, but I figure it's worth a shot to ask.

The next option would be to have volume adjusters for applications which I have seen done before. 90% of the time I'm adjusting web browser volume.

(I have medium-ish experience with Arch)

Thanks

Last edited by spotshot6544 (2013-09-22 21:42:48)

Offline

#2 2013-09-25 14:10:41

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,481

Re: bypass master volume for constant white noise play (KDE)

Since master volume is "card bound", i'd buy an additional cheap soundcard (usb?) to just play white noise.

Last edited by kokoko3k (2013-09-25 14:11:08)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#3 2013-09-26 00:54:37

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: bypass master volume for constant white noise play (KDE)

tricky, but you could achieve that with alsa's softvol plugin.

first you need to have alsa-plugins installed
then add something like this in your ~/.asoundrc

pcm.!default {
    type plug
    slave.pcm "softvol"
}

ctl.mixer0 {
    type hw
    card 0
}

pcm.softvol {
    type            softvol
    slave.pcm       "hw:0,0"
    control {
        name        "Master2"
        card        0
    }
}

this should create software volume control called 'Master2' and make applications use it as default (you need to restart all audio applications and sound servers until it takes effect.)

now you should be able to play white noise from mp3 and set the 'real' master channel for it's output, while all other applications are controllable via Master2. Ideally you should set your card's real master volume to 0db

only issue with this that your white noise will be played full blast unless the application from where you're playing it from has its own software volume control. You can solve this by adding another softvol device in your .alsarc (simply copy the pcm.softvol part and change the control name from Master2 to something else) and use it as output and volume control for the noise.

Offline

Board footer

Powered by FluxBB