Opened 17 years ago
Closed 16 years ago
#6279 closed enhancement (duplicate)
Software volume control
Reported by: | Owned by: | JYA | |
---|---|---|---|
Priority: | trivial | Milestone: | unknown |
Component: | MythTV - General | Version: | unknown |
Severity: | low | Keywords: | software volume control |
Cc: | Ticket locked: | no |
Description
This patch allows the internal volume controls to work when audio is output via a digital device (including 'passthru' and upmixed AC-3). Depends on #5900.
Turning on internal volume controls whilst leaving the mixer device as a hardware device will give you software control over the volume of 'passthru' AC-3. Also setting the mixer device to "software" gives you software volume control of all audio.
Includes a crude attempt at normalising the volume of PCM from video, PCM from mythmusic and 'passthru' AC-3. There's a small delay between user input and change in volume due to buffering.
Attachments (11)
Change History (32)
by , 17 years ago
Attachment: | softvol-fixes.patch added |
---|
by , 17 years ago
Attachment: | softvol-trunk.patch added |
---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
I had to add #include <limits> to have it compiled using fixes-19961 in mythtv/libs/libmyth/audiooutputbase.cpp
comment:3 by , 17 years ago
Confirmed: Works perfect with fixes-19961 with audio via HDMI interface using Mixer "software".
comment:4 by , 17 years ago
wow, many thanks. works fine after my first tests. really really nice, now i can control everything with only one remote...
comment:5 by , 17 years ago
Works with -fixes svn 20023. I am particularly happy about the working dts passthru. It would be nice to see the patches being committed.
comment:6 by , 17 years ago
Please can we keep discussion and 'me too' posts out of the ticket system.
comment:7 by , 17 years ago
small Problem, after seeking thru commercials with different audio track (5.1 -> 2.0) the volume would be reset to the default value. And in general the changed volume would'nt be saved after exit from the player.
comment:8 by , 17 years ago
by , 17 years ago
Attachment: | softvol-fixes-2.patch added |
---|
by , 17 years ago
Attachment: | softvol-trunk-2.patch added |
---|
by , 17 years ago
Attachment: | softvol-fixes-3.patch added |
---|
by , 17 years ago
Attachment: | softvol-trunk-3.patch added |
---|
comment:12 by , 17 years ago
Don't think it should - I want software control of stereo (which, for me, is sent out a digital device) too.
by , 17 years ago
Attachment: | softvol-fixes-4.patch added |
---|
by , 17 years ago
Attachment: | softvol-trunk-4.patch added |
---|
comment:14 by , 17 years ago
But if i remember right, if the channel/recording/video only provides AC3/DTS audio and i disable the upmixer the result was buggy. I will check this again and produce some logs.
comment:15 by , 17 years ago
I get the following compile error with latest trunk:
audiooutputbase.cpp: In member function ‘void AudioOutputBase::_AdjustVolume(AudioDataType*, int, bool)’:
audiooutputbase.cpp:654: error: ‘numeric_limits’ was not declared in this scope
audiooutputbase.cpp:654: error: expected primary-expression before ‘>’ token
audiooutputbase.cpp:654: error: no matching function for call to ‘max()’
audiooutputbase.cpp:656: error: expected primary-expression before ‘>’ token
audiooutputbase.cpp:656: error: no matching function for call to ‘max()’
audiooutputbase.cpp:658: error: expected primary-expression before ‘>’ token
audiooutputbase.cpp:658: error: no matching function for call to ‘min()’
audiooutputbase.cpp:661: error: expected primary-expression before ‘>’ token
audiooutputbase.cpp:661: error: no matching function for call to ‘max()’
comment:16 by , 17 years ago
Need to add: #include <limits>
to mythtv/libs/libmyth/audiooutputbase.cpp
comment:18 by , 16 years ago
When mixer control is set to master, volume is reset every time audio output is initialized.
This patch needs to be applied on top of softvol-trunk-5.patch
diff --git a/mythtv/libs/libmyth/audiooutputbase.cpp b/mythtv/libs/libmyth/audiooutputbase.cpp index cf2fc42..c3e0fbf 100644 --- a/mythtv/libs/libmyth/audiooutputbase.cpp +++ b/mythtv/libs/libmyth/audiooutputbase.cpp @@ -341,7 +341,11 @@ void AudioOutputBase::Reconfigure(const AudioSettings &orig_settings) // Only used for software volume if (set_initial_vol && internal_vol) - volume = gContext->GetNumSetting("PCMMixerVolume", 80); + { + QString controlLabel = gContext->GetSetting("MixerControl", "PCM"); + controlLabel += "MixerVolume"; + volume = gContext->GetNumSetting(controlLabel, 80); + } SyncVolume();
Works great otherwise (as of r21298 in trunk). Great job and thanks a lot for contributing.
comment:19 by , 16 years ago
sofvol-trunk-6.patch
Patches against trunk r21594 and audioencoding-trunk-7.4.patch.
comment:20 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
I had to add #include <limits> to have it compiled using fixes-19961