diff --git a/starboard/CHANGELOG.md b/starboard/CHANGELOG.md index 2652bd01af87..93dbedbc3cc2 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. + ### Deprecated `SbMutex`, `SbConditionVariable` and `SbThread`. The standard POSIX `pthread` APIs replace the Starboard concurrency primitives. diff --git a/starboard/android/shared/configuration_constants.cc b/starboard/android/shared/configuration_constants.cc index 357c4a495645..0691cff41d12 100644 --- a/starboard/android/shared/configuration_constants.cc +++ b/starboard/android/shared/configuration_constants.cc @@ -142,4 +142,7 @@ const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB // Whether this platform can map executable memory. This is required for // platforms that want to JIT. SB_EXPORT extern const bool kSbCanMapExecutableMemory = true; + +// Platform can support partial audio frames +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = true; #endif diff --git a/starboard/configuration_constants.h b/starboard/configuration_constants.h index cb6bb6877b52..061208a18a55 100644 --- a/starboard/configuration_constants.h +++ b/starboard/configuration_constants.h @@ -157,6 +157,9 @@ SB_EXPORT extern const uint32_t kSbMaxSystemPathCacheDirectorySize; // Whether this platform can map executable memory. This is required for // platforms that want to JIT. SB_EXPORT extern const bool kSbCanMapExecutableMemory; + +// Platform can support partial audio frames +SB_EXPORT extern const bool kHasPartialAudioFramesSupport; #endif #endif // STARBOARD_CONFIGURATION_CONSTANTS_H_ diff --git a/starboard/elf_loader/exported_symbols.cc b/starboard/elf_loader/exported_symbols.cc index 801f798aa552..c73c55bab79c 100644 --- a/starboard/elf_loader/exported_symbols.cc +++ b/starboard/elf_loader/exported_symbols.cc @@ -119,6 +119,7 @@ ExportedSymbols::ExportedSymbols() { #endif // SB_API_VERSION < 16 #if SB_API_VERSION >= 16 REGISTER_SYMBOL(kSbCanMapExecutableMemory); + REGISTER_SYMBOL(kHasPartialAudioFramesSupport); #endif REGISTER_SYMBOL(SbAccessibilityGetCaptionSettings); REGISTER_SYMBOL(SbAccessibilityGetDisplaySettings); diff --git a/starboard/linux/shared/configuration_constants.cc b/starboard/linux/shared/configuration_constants.cc index 640f9f606b86..341512540dad 100644 --- a/starboard/linux/shared/configuration_constants.cc +++ b/starboard/linux/shared/configuration_constants.cc @@ -139,4 +139,7 @@ const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB #if SB_API_VERSION >= 16 SB_EXPORT extern const bool kSbCanMapExecutableMemory = true; + +// Platform can support partial audio frames +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = true; #endif diff --git a/starboard/nplb/player_test_util.cc b/starboard/nplb/player_test_util.cc index 8b63655f71d7..4bcc1385d6a4 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 77275c19b294..d1163c476cfd 100644 --- a/starboard/raspi/shared/configuration_constants.cc +++ b/starboard/raspi/shared/configuration_constants.cc @@ -143,4 +143,7 @@ const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB // Whether this platform can map executable memory. This is required for // platforms that want to JIT. SB_EXPORT extern const bool kSbCanMapExecutableMemory = true; + +// Platform can support partial audio frames +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = true; #endif diff --git a/starboard/stub/configuration_constants.cc b/starboard/stub/configuration_constants.cc index 9fedf69850e7..7b4a5cd4fec4 100644 --- a/starboard/stub/configuration_constants.cc +++ b/starboard/stub/configuration_constants.cc @@ -140,4 +140,7 @@ const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB // Whether this platform can map executable memory. This is required for // platforms that want to JIT. SB_EXPORT extern const bool kSbCanMapExecutableMemory = false; + +// Platform can support partial audio frames +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 a70cdd43cc1c..8486d3b96f0d 100644 --- a/starboard/win/shared/configuration_constants.cc +++ b/starboard/win/shared/configuration_constants.cc @@ -149,4 +149,7 @@ const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB // Whether this platform can map executable memory. This is required for // platforms that want to JIT. SB_EXPORT extern const bool kSbCanMapExecutableMemory = true; + +// Platform can support partial audio frames +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = true; #endif diff --git a/starboard/xb1/shared/configuration_constants.cc b/starboard/xb1/shared/configuration_constants.cc index 8fe8d744ece8..6a15e19925ca 100644 --- a/starboard/xb1/shared/configuration_constants.cc +++ b/starboard/xb1/shared/configuration_constants.cc @@ -146,4 +146,7 @@ const uint32_t kSbMaxSystemPathCacheDirectorySize = 24 << 20; // 24MiB // Whether this platform can map executable memory. This is required for // platforms that want to JIT. SB_EXPORT extern const bool kSbCanMapExecutableMemory = true; + +// Platform can support partial audio frames +SB_EXPORT extern const bool kHasPartialAudioFramesSupport = true; #endif