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

Add flag for partial audio frame support #2860

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions starboard/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ since the version previous to it.

## Version 16

## Added new configuration constant `kHasPartialAudioFramesSupport`
kaidokert marked this conversation as resolved.
Show resolved Hide resolved
Set this to true if your platform supports partial audio frames.
kaidokert marked this conversation as resolved.
Show resolved Hide resolved
kaidokert marked this conversation as resolved.
Show resolved Hide resolved

### Deprecated `SbMutex`, `SbConditionVariable` and `SbThread`.
The standard POSIX `pthread` APIs replace the Starboard concurrency
primitives.
Expand Down
3 changes: 3 additions & 0 deletions starboard/android/shared/configuration_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions starboard/configuration_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_
1 change: 1 addition & 0 deletions starboard/elf_loader/exported_symbols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions starboard/linux/shared/configuration_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions starboard/nplb/player_test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions starboard/raspi/shared/configuration_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions starboard/stub/configuration_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions starboard/win/shared/configuration_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions starboard/xb1/shared/configuration_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading