Opened 14 years ago
Closed 14 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)
Changed 14 years ago by
Attachment: | softvol-fixes.patch added |
---|
Changed 14 years ago by
Attachment: | softvol-trunk.patch added |
---|
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
I had to add #include <limits> to have it compiled using fixes-19961 in mythtv/libs/libmyth/audiooutputbase.cpp
comment:3 Changed 14 years ago by
Confirmed: Works perfect with fixes-19961 with audio via HDMI interface using Mixer "software".
comment:4 Changed 14 years ago by
wow, many thanks. works fine after my first tests. really really nice, now i can control everything with only one remote...
comment:5 Changed 14 years ago by
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 Changed 14 years ago by
Please can we keep discussion and 'me too' posts out of the ticket system.
comment:7 Changed 14 years ago by
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 Changed 14 years ago by
Changed 14 years ago by
Attachment: | softvol-fixes-2.patch added |
---|
Changed 14 years ago by
Attachment: | softvol-trunk-2.patch added |
---|
Changed 14 years ago by
Attachment: | softvol-fixes-3.patch added |
---|
Changed 14 years ago by
Attachment: | softvol-trunk-3.patch added |
---|
comment:10 Changed 14 years ago by
New patches fix volume set to zero when skipping over stream change.
comment:12 Changed 14 years ago by
Don't think it should - I want software control of stereo (which, for me, is sent out a digital device) too.
Changed 14 years ago by
Attachment: | softvol-fixes-4.patch added |
---|
Changed 14 years ago by
Attachment: | softvol-trunk-4.patch added |
---|
comment:14 Changed 14 years ago by
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 Changed 14 years ago by
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 Changed 14 years ago by
Need to add: #include <limits>
to mythtv/libs/libmyth/audiooutputbase.cpp
comment:18 Changed 14 years ago by
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 Changed 14 years ago by
sofvol-trunk-6.patch
Patches against trunk r21594 and audioencoding-trunk-7.4.patch.
comment:20 Changed 14 years ago by
Owner: | changed from Isaac Richards to JYA |
---|---|
Status: | new → assigned |
I had to add #include <limits> to have it compiled using fixes-19961