Dsp: Difference between revisions

From Hackepedia
Jump to navigationJump to search
Frankk (talk | contribs)
Frankk (talk | contribs)
Line 40: Line 40:
  /dsp
  /dsp


replacing /dev/dsp with /dev/xxx in order to stop flash from accessing my /dev/dsp, as it never released it properly.
which found /dev/dsp which I replaced with /dev/xxx in order to stop flash from accessing my /dev/dsp, as it never released it properly.

Revision as of 17:30, 6 November 2005

Sometimes you will have two applications trying to access your audio device. Here is an example screenshot of a user trying to run xmms, when something else is accessing the audio:


File:Dsp.jpg


The culprit can be discovered with lsof assuming your audio device is /dev/dsp like it is on BSD:

$ lsof | grep dsp
firefox-b 14905 frank    1w  VCHR       30,3        0t0     38 /dev/dsp0.0
firefox-b 14905 frank    1w  VCHR       30,3        0t0     38 /dev/dsp0.0
firefox-b 14905 frank    1w  VCHR       30,3        0t0     38 /dev/dsp0.0
firefox-b 14905 frank    1w  VCHR       30,3        0t0     38 /dev/dsp0.0

as you can see, one of the websites I am viewing with firefox has claimed access to my dsp first. I must now close that tab in firefox, and restart xmms, and all is well.


Stop embedded audio in Firefox

vi ~/.mozilla/firefox/0wt4rci4.default/chrome/userContent.css

and add these lines (creating the file if it doesn't already exist)

/* block embedded sounds */
embed[src*=.mid] { display: none !important }
embed[src*=.mp2] { display: none !important }
embed[src*=.mp3] { display: none !important }
embed[src*=.mp4] { display: none !important }
embed[src*=.wav] { display: none !important }
embed[src*=.wma] { display: none !important }

Stop embedded audio in flash

Not a highly recommended hack, but I opened

vi ~/.mozilla/plugins/libflashplayer.so

and did a

/dsp

which found /dev/dsp which I replaced with /dev/xxx in order to stop flash from accessing my /dev/dsp, as it never released it properly.