This commit is contained in:
@@ -59,3 +59,14 @@ TEST(AudioTest, AudioManagerVolumeClamping) {
|
||||
am.shutdown();
|
||||
std::filesystem::remove(temp_path);
|
||||
}
|
||||
|
||||
TEST(AudioTest, PlayOptionsLoopInfinite) {
|
||||
// Regression: MIX_PlayTrack() must not default to a single pass. Tracks
|
||||
// have to loop forever so playback never runs out mid-scroll; a track that
|
||||
// stops (rather than attenuates) also can't be revived by raising app
|
||||
// volume. Assert the options request infinite looping (-1).
|
||||
SDL_PropertiesID props = AudioManager::createInfiniteLoopOptions();
|
||||
ASSERT_NE(props, 0u);
|
||||
EXPECT_EQ(SDL_GetNumberProperty(props, MIX_PROP_PLAY_LOOPS_NUMBER, 0), -1);
|
||||
SDL_DestroyProperties(props);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user