RESOLVED FIXED 216935
Declare render quantum size constant in AudioUtilities.h
https://bugs.webkit.org/show_bug.cgi?id=216935
Summary Declare render quantum size constant in AudioUtilities.h
Chris Dumez
Reported 2020-09-24 10:22:12 PDT
Declare render quantum size [1] constant in AudioUtilities.h so that it can be used in both platform/ and Modules/webaudio/. Also update the code so that we have a single constant instead of many. [1] https://www.w3.org/TR/webaudio/#render-quantum-size
Attachments
Patch (57.80 KB, patch)
2020-09-24 10:24 PDT, Chris Dumez
no flags
Patch (57.92 KB, patch)
2020-09-24 10:36 PDT, Chris Dumez
ews-feeder: commit-queue-
Patch (58.11 KB, patch)
2020-09-24 10:40 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2020-09-24 10:24:54 PDT
Chris Dumez
Comment 2 2020-09-24 10:36:41 PDT
Chris Dumez
Comment 3 2020-09-24 10:40:07 PDT
Eric Carlson
Comment 4 2020-09-24 10:49:04 PDT
Comment on attachment 409596 [details] Patch Nice!
Sam Weinig
Comment 5 2020-09-24 11:04:06 PDT
Comment on attachment 409596 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409596&action=review > Source/WebCore/ChangeLog:10 > + Declare render quantum size [1] constant in AudioUtilities.h so that it can be used in both > + platform/ and Modules/webaudio/. Also update the code so that we have a single constant > + instead of many. Conceptually, this feels wrong. The intent of platform is to abstract away differences between different platforms base libraries. Having it know about a web platform concept like a specific "render quantum size" seems like a violation of that.
Sam Weinig
Comment 6 2020-09-24 11:04:46 PDT
Comment on attachment 409596 [details] Patch Crap, bugzilla in-air-conflict made it automatically change the review flag. Eric, please re-do what ever change to the flag you made.
Chris Dumez
Comment 7 2020-09-24 11:06:48 PDT
(In reply to Sam Weinig from comment #5) > Comment on attachment 409596 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=409596&action=review > > > Source/WebCore/ChangeLog:10 > > + Declare render quantum size [1] constant in AudioUtilities.h so that it can be used in both > > + platform/ and Modules/webaudio/. Also update the code so that we have a single constant > > + instead of many. > > Conceptually, this feels wrong. The intent of platform is to abstract away > differences between different platforms base libraries. Having it know about > a web platform concept like a specific "render quantum size" seems like a > violation of that. The situation right now is that we have different constants in platform/ and WebAudio/ that need to be kept in sync. You view it as a WebPlatform concept but I am not sure I agree, this is WebKit's render quantum size.
Chris Dumez
Comment 8 2020-09-24 11:15:19 PDT
(In reply to Chris Dumez from comment #7) > (In reply to Sam Weinig from comment #5) > > Comment on attachment 409596 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=409596&action=review > > > > > Source/WebCore/ChangeLog:10 > > > + Declare render quantum size [1] constant in AudioUtilities.h so that it can be used in both > > > + platform/ and Modules/webaudio/. Also update the code so that we have a single constant > > > + instead of many. > > > > Conceptually, this feels wrong. The intent of platform is to abstract away > > differences between different platforms base libraries. Having it know about > > a web platform concept like a specific "render quantum size" seems like a > > violation of that. > > The situation right now is that we have different constants in platform/ and > WebAudio/ that need to be kept in sync. You view it as a WebPlatform concept > but I am not sure I agree, this is WebKit's render quantum size. To put it in other word, the thing you are saying is bad is not new in my patch. What my patch does it merge 5+ constants (that have to be in sync) into a single one, in a common header. It does not feel that controversial to me.
Sam Weinig
Comment 9 2020-09-24 11:16:14 PDT
(In reply to Chris Dumez from comment #7) > (In reply to Sam Weinig from comment #5) > > Comment on attachment 409596 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=409596&action=review > > > > > Source/WebCore/ChangeLog:10 > > > + Declare render quantum size [1] constant in AudioUtilities.h so that it can be used in both > > > + platform/ and Modules/webaudio/. Also update the code so that we have a single constant > > > + instead of many. > > > > Conceptually, this feels wrong. The intent of platform is to abstract away > > differences between different platforms base libraries. Having it know about > > a web platform concept like a specific "render quantum size" seems like a > > violation of that. > > The situation right now is that we have different constants in platform/ and > WebAudio/ that need to be kept in sync. You view it as a WebPlatform concept > but I am not sure I agree, this is WebKit's render quantum size. Ok, I could buy that.
Sam Weinig
Comment 10 2020-09-24 11:16:59 PDT
(In reply to Chris Dumez from comment #8) > (In reply to Chris Dumez from comment #7) > > (In reply to Sam Weinig from comment #5) > > > Comment on attachment 409596 [details] > > > Patch > > > > > > View in context: > > > https://bugs.webkit.org/attachment.cgi?id=409596&action=review > > > > > > > Source/WebCore/ChangeLog:10 > > > > + Declare render quantum size [1] constant in AudioUtilities.h so that it can be used in both > > > > + platform/ and Modules/webaudio/. Also update the code so that we have a single constant > > > > + instead of many. > > > > > > Conceptually, this feels wrong. The intent of platform is to abstract away > > > differences between different platforms base libraries. Having it know about > > > a web platform concept like a specific "render quantum size" seems like a > > > violation of that. > > > > The situation right now is that we have different constants in platform/ and > > WebAudio/ that need to be kept in sync. You view it as a WebPlatform concept > > but I am not sure I agree, this is WebKit's render quantum size. > > To put it in other word, the thing you are saying is bad is not new in my > patch. What my patch does it merge 5+ constants (that have to be in sync) > into a single one, in a common header. It does not feel that controversial > to me. Fair. Also, I really didn't mean to change the review flag at all. It was just this dumb site :(. Please put it back to the way it was.
Chris Dumez
Comment 11 2020-09-24 11:32:59 PDT
Radar WebKit Bug Importer
Comment 12 2020-09-24 11:33:19 PDT
Note You need to log in before you can comment on or make changes to this bug.