read & change audio volume
Ladies & Gents,
I have two audio streams that I use on a regular basis. Switching back and forth between these streams is somewhat automated via a bash script. But the volume of one stream is higher than the other and so there is a need to manually adjust the volume when switching between them. My goal is to fully automate this. With that in mind I was wondering if there was a way that the in-comming stream volume could be determined before any local processing was done or during processing so that the volume could be adjusted via alsamixer(?) to an appropriate level. Note that one of the streams is some what unstable where the volume is concerned. Sometimes there is mostly silence, at others it is quite loud. Yes I know that with a little time, testing and effort, the required volumes can be determined and hard-coded into the script. I would rather avoid that if possible as later I want to offer the user a choice of streams. I don't have the time to test each one, and then my levels may not be the greatest for someone else. I have looked at ffmpg and sox briefly but not enough to know if they will do what i want with a live stream. So far google has no revealed a coarse of action. Thanks. |
Code:
bash-4.3$ amixer get Master Playback Quote:
Hope that's what you're looking for. |
All times are GMT -5. The time now is 03:16 AM. |