New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volume level: 1% must be equal const db #2111
Comments
From andrew.gaydenko on July 29, 2011 08:06:31 In fact, I just have tried tiny code modification (and am happy with it). Modified methods are: uint Engine::Base::MakeVolumeLogarithmic(uint volume) { void MainWindow::VolumeWheelEvent(int delta) { void
} void GstEnginePipeline::UpdateVolume() { float vol = 0.0; g_object_set(G_OBJECT(volume_), "volume", vol * volume_modifier_, NULL); I don't know cpp, qt, gst, g_object and so on, as well as the player code in a whole, but it works ;) As you see, small design shift in mind is needed: we must deal with level in float space only rather in integer space (percents). |
From john.maguire on August 04, 2011 07:44:23 Summary: Volume level: 1% must be equal const db |
From andrew.gaydenko on August 19, 2011 17:11:15 I'm not sure the attached patch is correct as far as have never prepared multifile patches - this is the first one :-) It is prepared against src directory. Attachment: volDb01.patch |
From arnaud.bienner on August 22, 2011 23:33:41 Labels: PatchAttached |
From davidsansome on August 26, 2011 14:46:21 Sorry it's taken me a while to look at the patch - it's been a busy week! |
From andrew.gaydenko on August 26, 2011 15:42:59
David, you have no any obligations at all in current context. Thanks for your efforts! At any case and forever users wants more rather developers can :)
Exactly! - I even can predict few upcoming thousands of years this ears' property will not change :)
No-no, here we haven't any sense of linearity. Strictly speaking a scale is infinite as far as level 0.0 corresponds to -inf in decibels scale. So a step (in db) is selecting just from practical experience, and last step is infinite also, say: Two aspects must be considered:
I suggest 50db range (rather, say, 40 or 60) as far as we use percents - at this case we just have simple 1:2 relation which is very handy for those of us who are burdened with all these nuances :) The picture also demonstrates why we must use float rather integer operation - a curve isn't straight line because of rounding errors. |
From andrew.gaydenko on September 16, 2011 08:57:22 David, Must I supply additional comments to the issue/patch? |
From andrew.gaydenko on November 25, 2011 13:15:22 David, Is my understanding correct, you have decided to postpone the patch applying until 1.0? |
From davidsansome on November 27, 2011 08:17:58 Hmm, I'm still not convinced this is the right thing to do. I'm sure your patch makes the volume control technically more accurate but the current implementation still sounds better to me. Status: WontFix |
From andrew.gaydenko on November 27, 2011 08:46:33 There is some irony: small players (Aqualung, DeadBeef) strictly follow world-wide multi-decades conventions, while big applications (A2, and now - pity of it!! - Clementine) don't... I have used the patch four months now, and am ready to continue to do :-) But - if some little chance still exists - what is that exact feeling why current implementation is better for you? I'm ready to modify the patch. |
From andrew.gaydenko on November 27, 2011 11:57:36 ...Say, as a point of consensus, we can set 1 db to be strictly equal to 3% - at this case regulation curve will be very close to current one - look at the picture attached to the first message (but will be a straight line and, OTOH, relation percent/db == 3/1 will also be evident). As I have already mentioned, the relation itself isn't too important. For such short volume regulator (as an Amarok 1.4 inheritance) percent/db == 2/1 steepness can be indeed too sharp, if it is that inconvenience you are taking in mind. |
From andrew.gaydenko on July 29, 2011 12:14:08
This (sometimes funny) discussion can be used as intriduction to a problem: https://bugs.kde.org/show_bug.cgi?id=195556 It is good current volume (as function of percents) is near linear - I have attached a graph. But there is two issues:
With cuttent slope we, in fact, have not any volume control for low levels. Another consequence is: we forced to have rather big mouse wheel step (4%).
I suggest strict 1% == 0.5 db law, and with such curve optimal wheel step will be 2% (1db - approximately the same step as now with 4%).
I'm sure gst has API for linear volume setting (i.e., say, in range 0.0..1.0 volume 0.5 corresponds to -6.02db), so it will be one-line fixing of the problem (and next line to change wheel step to 2%).
Attachment: ClementineVolumeGraph.png
Original issue: http://code.google.com/p/clementine-player/issues/detail?id=2111
The text was updated successfully, but these errors were encountered: