Bug 233422 - Allow AudioSampleDataSource to increase/decrease buffered data progressively
Summary: Allow AudioSampleDataSource to increase/decrease buffered data progressively
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-22 06:54 PST by youenn fablet
Modified: 2021-12-16 14:04 PST (History)
10 users (show)

See Also:


Attachments
Patch (14.95 KB, patch)
2021-11-22 07:04 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (37.07 KB, patch)
2021-12-01 03:13 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Rebasing (38.14 KB, patch)
2021-12-15 09:01 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Updated according review (39.75 KB, patch)
2021-12-16 06:34 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Use > instead of == when comparing sample count (39.80 KB, patch)
2021-12-16 08:01 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].