Bug 233422

Summary: Allow AudioSampleDataSource to increase/decrease buffered data progressively
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Rebasing
none
Updated according review
none
Use > instead of == when comparing sample count none

Description youenn fablet 2021-11-22 06:54:06 PST
Allow AudioSampleDataSource to increase/decrease buffered data
Comment 1 youenn fablet 2021-11-22 07:04:04 PST
Created attachment 444964 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2021-11-29 06:55:25 PST
<rdar://problem/85814914>
Comment 3 Eric Carlson 2021-11-29 08:45:50 PST
Comment on attachment 444964 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=444964&action=review

r=me

> Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.mm:85
> +    if (m_lowConverter) {
> +        PAL::AudioConverterDispose(m_lowConverter);
> +        m_lowConverter = nullptr;
> +    }

Nit: It might be worth creating a simple AudioConverter class to handle allocation, deallocation, and setup so you can cut down on the amount of boiler plate in the destructor and here.
Comment 4 youenn fablet 2021-12-01 03:13:02 PST
Created attachment 445544 [details]
Patch
Comment 5 youenn fablet 2021-12-15 09:01:54 PST
Created attachment 447239 [details]
Rebasing
Comment 6 Eric Carlson 2021-12-15 10:17:13 PST
Comment on attachment 447239 [details]
Rebasing

View in context: https://bugs.webkit.org/attachment.cgi?id=447239&action=review

> Source/WebCore/platform/audio/cocoa/AudioSampleDataConverter.mm:87
> +        return 0;

s/0/noErr/

> Source/WebCore/platform/audio/cocoa/AudioSampleDataSource.mm:93
> +        return 0;

Ditto
Comment 7 youenn fablet 2021-12-16 06:34:01 PST
Created attachment 447351 [details]
Updated according review
Comment 8 youenn fablet 2021-12-16 08:01:42 PST
Created attachment 447357 [details]
Use > instead of == when comparing sample count
Comment 9 EWS 2021-12-16 14:04:11 PST
Committed r287157 (245334@main): <https://commits.webkit.org/245334@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447357 [details].