diff --git a/starboard/CHANGELOG.md b/starboard/CHANGELOG.md index fd5dfcc2cade..215263568a87 100644 --- a/starboard/CHANGELOG.md +++ b/starboard/CHANGELOG.md @@ -9,6 +9,9 @@ since the version previous to it. ## Version 16 +## Added new configuration constant `kHasPartialAudioFramesSupport` +Set this to true if your platform supports partial audio frames. + ## Removed configs for `SB_EXPORT_PLATFORM` and `SB_IMPORT_PLATFORM` These are auto-detected based on compilers, platforms can optionally override. diff --git a/starboard/android/shared/configuration_constants.cc b/starboard/android/shared/configuration_constants.cc index 79d25f251ab2..316306781125 100644 --- a/starboard/android/shared/configuration_constants.cc +++ b/starboard/android/shared/configuration_constants.cc @@ -137,3 +137,7 @@ const uint32_t kSbUserMaxSignedIn = 1; // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB #endif + +#if SB_API_VERSION >= 16 +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = false; +#endif diff --git a/starboard/configuration_constants.h b/starboard/configuration_constants.h index b552bd445d89..02ed389eff0e 100644 --- a/starboard/configuration_constants.h +++ b/starboard/configuration_constants.h @@ -153,4 +153,9 @@ SB_EXPORT extern const uint32_t kSbUserMaxSignedIn; SB_EXPORT extern const uint32_t kSbMaxSystemPathCacheDirectorySize; #endif +#if SB_API_VERSION >= 16 +// Platform can support partial audio frames +SB_EXPORT extern const bool kHasPartialAudioFramesSupport; +#endif + #endif // STARBOARD_CONFIGURATION_CONSTANTS_H_ diff --git a/starboard/linux/shared/configuration_constants.cc b/starboard/linux/shared/configuration_constants.cc index e7ba36c27df4..05c3e0cb166f 100644 --- a/starboard/linux/shared/configuration_constants.cc +++ b/starboard/linux/shared/configuration_constants.cc @@ -136,3 +136,7 @@ const uint32_t kSbUserMaxSignedIn = 1; // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB #endif + +#if SB_API_VERSION >= 16 +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = false; +#endif diff --git a/starboard/nplb/player_test_util.cc b/starboard/nplb/player_test_util.cc index 175d05782134..636f1c9942f5 100644 --- a/starboard/nplb/player_test_util.cc +++ b/starboard/nplb/player_test_util.cc @@ -402,7 +402,11 @@ bool IsOutputModeSupported(SbPlayerOutputMode output_mode, bool IsPartialAudioSupported() { #if SB_API_VERSION >= 15 +#if SB_API_VERSION >= 16 + return kHasPartialAudioFramesSupport; +#else return true; +#endif #else // SB_API_VERSION >= 15 return SbSystemGetExtension(kCobaltExtensionEnhancedAudioName) != nullptr; #endif // SB_API_VERSION >= 15 diff --git a/starboard/raspi/shared/configuration_constants.cc b/starboard/raspi/shared/configuration_constants.cc index 0f2fb9eaa67a..21ccfe4746f8 100644 --- a/starboard/raspi/shared/configuration_constants.cc +++ b/starboard/raspi/shared/configuration_constants.cc @@ -138,3 +138,7 @@ const uint32_t kSbUserMaxSignedIn = 1; // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB #endif + +#if SB_API_VERSION >= 16 +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = false; +#endif diff --git a/starboard/stub/configuration_constants.cc b/starboard/stub/configuration_constants.cc index 80bbb4326dde..e32d43cc4ce8 100644 --- a/starboard/stub/configuration_constants.cc +++ b/starboard/stub/configuration_constants.cc @@ -135,3 +135,7 @@ const uint32_t kSbUserMaxSignedIn = 1; // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB #endif + +#if SB_API_VERSION >= 16 +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = false; +#endif diff --git a/starboard/win/shared/configuration_constants.cc b/starboard/win/shared/configuration_constants.cc index d4e4dd39b56f..48bb8a2d4c3c 100644 --- a/starboard/win/shared/configuration_constants.cc +++ b/starboard/win/shared/configuration_constants.cc @@ -144,3 +144,7 @@ const uint32_t kSbUserMaxSignedIn = 1; // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB #endif + +#if SB_API_VERSION >= 16 +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = false; +#endif diff --git a/starboard/xb1/shared/configuration_constants.cc b/starboard/xb1/shared/configuration_constants.cc index 05d2f5a912d8..113cc8cec31a 100644 --- a/starboard/xb1/shared/configuration_constants.cc +++ b/starboard/xb1/shared/configuration_constants.cc @@ -141,3 +141,7 @@ const uint32_t kSbUserMaxSignedIn = 1; // The maximum size the cache directory is allowed to use in bytes. const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB #endif + +#if SB_API_VERSION >= 16 +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = false; +#endif