RESOLVED FIXED 220341
[Cocoa] Revert audioTimePitchAlgorithm to "TimeDomain" from "Spectral"
https://bugs.webkit.org/show_bug.cgi?id=220341
Summary [Cocoa] Revert audioTimePitchAlgorithm to "TimeDomain" from "Spectral"
Jer Noble
Reported 2021-01-05 14:33:08 PST
Revert audioTimePitchAlgorithm to "TimeDomain" from "Spectral"
Attachments
Patch (26.19 KB, patch)
2021-01-05 14:45 PST, Jer Noble
no flags
Patch (30.83 KB, patch)
2021-01-05 15:27 PST, Jer Noble
youennf: review+
Patch for landing (30.78 KB, patch)
2021-01-06 11:26 PST, Jer Noble
ews-feeder: commit-queue-
Patch for landing (34.50 KB, patch)
2021-01-06 15:28 PST, Jer Noble
jer.noble: commit-queue-
Patch for landing (30.78 KB, patch)
2021-01-06 15:29 PST, Jer Noble
no flags
Jer Noble
Comment 1 2021-01-05 14:45:14 PST
Radar WebKit Bug Importer
Comment 2 2021-01-05 14:45:39 PST
Jer Noble
Comment 3 2021-01-05 15:27:11 PST
Peng Liu
Comment 4 2021-01-05 15:49:55 PST
Comment on attachment 417042 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417042&action=review > Source/WebCore/platform/graphics/MediaPlayer.h:402 > + PitchCorrectionAlgorithm pitchCorrectionAlgorithm() { return m_pitchCorrectionAlgorithm; } A const function? > Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h:291 > +#define WebKitPitchCorrectionAlgorithmPreferenceKey @"WebKitPitchCorrectionAlgorithmKey" Nit. To be consistent with other keys, maybe s/WebKitPitchCorrectionAlgorithmKey/WebKitPitchCorrectionAlgorithm/
youenn fablet
Comment 5 2021-01-06 01:40:19 PST
Comment on attachment 417042 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417042&action=review > Source/WebCore/ChangeLog:11 > + Revert to "TimeDomain", which is both more computationally inexpensive, and both propogates s/propogates/propagates/ > Source/WTF/Scripts/Preferences/WebPreferences.yaml:1722 > + webcoreBinding: custom Can we remove that one so that we let WebPage::updateSettingsGenerated update the corresponding settings directly? Or maybe it is due to the Settings being typed as MediaPlayerEnums::PitchCorrectionAlgorithm. Might be nice for the pref generator to handle this code without static_cast below. That might remove some webcoreBinding custom code as well. Maybe Sam has some ideas here? > Source/WebCore/html/HTMLMediaElement.cpp:1450 > + m_player->setPitchCorrectionAlgorithm(static_cast<MediaPlayer::PitchCorrectionAlgorithm>(document().settings().pitchCorrectionAlgorithm())); Do we really need this static_cast?
Jer Noble
Comment 6 2021-01-06 09:47:58 PST
(In reply to Peng Liu from comment #4) > Comment on attachment 417042 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=417042&action=review > > > Source/WebCore/platform/graphics/MediaPlayer.h:402 > > + PitchCorrectionAlgorithm pitchCorrectionAlgorithm() { return m_pitchCorrectionAlgorithm; } > > A const function? Good idea. Will change. > > Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h:291 > > +#define WebKitPitchCorrectionAlgorithmPreferenceKey @"WebKitPitchCorrectionAlgorithmKey" > > Nit. To be consistent with other keys, maybe > s/WebKitPitchCorrectionAlgorithmKey/WebKitPitchCorrectionAlgorithm/ Ok.
Jer Noble
Comment 7 2021-01-06 09:49:20 PST
(In reply to youenn fablet from comment #5) > Comment on attachment 417042 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=417042&action=review > > > Source/WebCore/ChangeLog:11 > > + Revert to "TimeDomain", which is both more computationally inexpensive, and both propogates > > s/propogates/propagates/ Will change. > > Source/WTF/Scripts/Preferences/WebPreferences.yaml:1722 > > + webcoreBinding: custom > > Can we remove that one so that we let WebPage::updateSettingsGenerated > update the corresponding settings directly? > Or maybe it is due to the Settings being typed as > MediaPlayerEnums::PitchCorrectionAlgorithm. > Might be nice for the pref generator to handle this code without static_cast > below. > That might remove some webcoreBinding custom code as well. > Maybe Sam has some ideas here? There's an existing FIXME about adding enum support to the settings binding generator code. I decided not to tackle that bindings generator fix in this patch. > > Source/WebCore/html/HTMLMediaElement.cpp:1450 > > + m_player->setPitchCorrectionAlgorithm(static_cast<MediaPlayer::PitchCorrectionAlgorithm>(document().settings().pitchCorrectionAlgorithm())); > > Do we really need this static_cast? Yep, without it, the compiler issues a warning/error about narrowing a uint32_t to an enum.
youenn fablet
Comment 8 2021-01-06 09:54:39 PST
> > > Source/WebCore/html/HTMLMediaElement.cpp:1450 > > > + m_player->setPitchCorrectionAlgorithm(static_cast<MediaPlayer::PitchCorrectionAlgorithm>(document().settings().pitchCorrectionAlgorithm())); > > > > Do we really need this static_cast? > > Yep, without it, the compiler issues a warning/error about narrowing a > uint32_t to an enum. I would have thought document().settings().pitchCorrectionAlgorithm() to return the value as an enum and not as a uint32_t. The Settings generator should be able to do that.
Jer Noble
Comment 9 2021-01-06 11:23:12 PST
(In reply to youenn fablet from comment #8) > > > > Source/WebCore/html/HTMLMediaElement.cpp:1450 > > > > + m_player->setPitchCorrectionAlgorithm(static_cast<MediaPlayer::PitchCorrectionAlgorithm>(document().settings().pitchCorrectionAlgorithm())); > > > > > > Do we really need this static_cast? > > > > Yep, without it, the compiler issues a warning/error about narrowing a > > uint32_t to an enum. > > I would have thought document().settings().pitchCorrectionAlgorithm() to > return the value as an enum and not as a uint32_t. > The Settings generator should be able to do that. I was wrong! Just built without the static_cast and no warning/error.
Jer Noble
Comment 10 2021-01-06 11:26:38 PST
Created attachment 417106 [details] Patch for landing
EWS
Comment 11 2021-01-06 13:02:44 PST
ChangeLog entry in Source/WTF/ChangeLog contains OOPS!.
Jer Noble
Comment 12 2021-01-06 15:28:16 PST
Created attachment 417134 [details] Patch for landing
Jer Noble
Comment 13 2021-01-06 15:29:55 PST
Created attachment 417135 [details] Patch for landing
EWS
Comment 14 2021-01-06 16:17:12 PST
Committed r271219: <https://trac.webkit.org/changeset/271219> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417135 [details].
Note You need to log in before you can comment on or make changes to this bug.