Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to make certain processes to not have access to my sound card ?
Let's say i have 2 processes running: firefox and my music player and i want to make sure only my music player can produce sound..

I imagine there must be some sort of request from the application to the sound card to "acces the sound card" (perhaps via drivers?), so i could basically redirect all requests that don't come from my music player to /dev/null (i'm in ubuntu). Perhaps this is possible with some shell script or C script ?

share|improve this question
add comment

migrated from stackoverflow.com Dec 24 '10 at 16:17

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 2 down vote accepted

There is a daemon that runs on Ubuntu called Pulse Audio. Most applications make requests to use the sound device to pulse and it decides how and which one to give the privilege to (or mix if necessary).

The link above has details. It's where you should begin searching.

share|improve this answer
    
worked, thanks :) –  Aerus Dec 25 '10 at 11:05
    
You're welcome. –  Noufal Ibrahim Dec 25 '10 at 11:26
add comment

If I understand your question correctly, you intend to allow access to only one application, e.g., your music player. In Ubuntu, AppArmor profiles can help you accomplish this, but it's more of a blacklist-type in its current configuration.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.