Skip to content
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

Deprecate SB_HAS_QUIRK(SUPPORT_INT16_AUDIO_SAMPLES) #2915

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

xiaomings
Copy link
Contributor

@xiaomings xiaomings commented Apr 12, 2024

SB_HAS_QUIRK(SUPPORT_INT16_AUDIO_SAMPLES) was introduced to allow platforms to use kSbMediaAudioSampleTypeInt16 after it's deprecated.

Now SB_HAS_QUIRK(SUPPORT_INT16_AUDIO_SAMPLES) was removed from Starboard 16, and platforms can no longer use kSbMediaAudioSampleTypeInt16. All platforms have to support float sample type in their AudioSink implementations, which will be verified by nplb.

kSbMediaAudioSampleTypeInt16Deprecated is kept but will no longer be used by Cobalt, so the AudioSink implementations can continue to support int16 sample type for internal use. We may remove SbMediaAudioSampleType and SbAudioSinkIsAudioSampleTypeSupported() completely in a future release, and assume that the only sample type supported by AudioSink across the Starboard interface is int 16.

This only affects the usage of int 16 samples in Cobalt, where the Starboard interface is the only channel to communicate to platform implementations. Platforms using AudioSink for video playback that also need to support int 16 sample type internally can continue to do so by defining their own types and enum values for int 16 sample type below Starboard.

b/332054094

Change-Id: I8924ce5717e9d815aa46050c6e85488a8cdedc13

cobalt/audio/audio_helpers.h Outdated Show resolved Hide resolved
SB_HAS_QUIRK(SUPPORT_INT16_AUDIO_SAMPLES) was introduced to allow
platforms to use `kSbMediaAudioSampleTypeInt16` after it's
deprecated.

Now SB_HAS_QUIRK(SUPPORT_INT16_AUDIO_SAMPLES) was removed from Starboard
16, and platforms can no longer use `kSbMediaAudioSampleTypeInt16`.  All
platforms have to support float sample type in their AudioSink
implementations, which will be verified by nplb.

`kSbMediaAudioSampleTypeInt16Deprecated` is kept but will no longer be
used by Cobalt, so the AudioSink implementations can continue to support
int16 sample type for internal use.  We may remove
`SbMediaAudioSampleType` and `SbAudioSinkIsAudioSampleTypeSupported()`
completely in a future release, and assume that the only sample type
supported by AudioSink across the Starboard interface is int 16.

This only affects the usage of int 16 samples in Cobalt, where the
Starboard interface is the only channel to communicate to platform
implementations.  Platforms using AudioSink for video playback that also
need to support int 16 sample type internally can continue to do so by
defining their own types and enum values for int 16 sample type below
Starboard.

b/332054094

Change-Id: I8924ce5717e9d815aa46050c6e85488a8cdedc13
@xiaomings xiaomings merged commit 6107388 into youtube:main Apr 16, 2024
345 of 360 checks passed
@xiaomings xiaomings deleted the deprecate_int16 branch April 29, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants