diff --git a/starboard/nplb/BUILD.gn b/starboard/nplb/BUILD.gn index 4c94a99c6f47..e65fbf5fa408 100644 --- a/starboard/nplb/BUILD.gn +++ b/starboard/nplb/BUILD.gn @@ -96,6 +96,7 @@ target(gtest_target_type, "nplb") { "media_buffer_test.cc", "media_can_play_mime_and_key_system_test.cc", "media_configuration_test.cc", + "media_set_audio_write_duration_test.cc", "memory_allocate_aligned_test.cc", "memory_allocate_test.cc", "memory_deallocate_aligned_test.cc", diff --git a/starboard/nplb/media_set_audio_write_duration_test.cc b/starboard/nplb/media_set_audio_write_duration_test.cc index af89f56ef556..f1dce6461fe7 100644 --- a/starboard/nplb/media_set_audio_write_duration_test.cc +++ b/starboard/nplb/media_set_audio_write_duration_test.cc @@ -26,8 +26,6 @@ #include "starboard/testing/fake_graphics_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" -#if SB_API_VERSION < 15 - namespace starboard { namespace nplb { namespace { @@ -183,7 +181,9 @@ TEST_P(SbMediaSetAudioWriteDurationTest, WriteLimitedInput) { ASSERT_NE(dmp_reader_.audio_codec(), kSbMediaAudioCodecNone); ASSERT_GT(dmp_reader_.number_of_audio_buffers(), 0); +#if SB_API_VERSION < 15 SbMediaSetAudioWriteDuration(kDuration); +#endif // SB_API_VERSION < 15 SbPlayer player = CreatePlayer(); WaitForPlayerState(kSbPlayerStateInitialized); @@ -224,7 +224,9 @@ TEST_P(SbMediaSetAudioWriteDurationTest, WriteContinuedLimitedInput) { ASSERT_NE(dmp_reader_.audio_codec(), kSbMediaAudioCodecNone); ASSERT_GT(dmp_reader_.number_of_audio_buffers(), 0); +#if SB_API_VERSION < 15 SbMediaSetAudioWriteDuration(kDuration); +#endif // SB_API_VERSION < 15 // This directly impacts the runtime of the test. total_duration_ = 15 * kSbTimeSecond; @@ -297,5 +299,3 @@ INSTANTIATE_TEST_CASE_P(SbMediaSetAudioWriteDurationTests, } // namespace } // namespace nplb } // namespace starboard - -#endif // SB_API_VERSION < 15