Hi.
There seems to be a bug when I try to loop a part of an ogg music file in AGK2 Tier 1 (Version 2018-08-30).
When I use SetMusicLoopTimesOGG() I get a glitch on certain settings.
On Windows Vista I get white noise and on Linux Mint I get a glitch.
I've tried different ogg files and different ogg encoders but the bug is still there on certain settings.
I've attached an ogg file and some code.
Can someone try the different SetMusicLoopTimesOGG() settings and see if you get the bug too?
// Project: OGG Music Bug
// Created: 2018-09-16 by Ranietz
// AGK Version 2018-08-30
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "OGG Music Bug" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
SetPrintSize(32)
musicID as integer
musicID = LoadMusicOGG( "mus01.ogg" )
rem SetMusicLoopTimesOGG( musicID, 0.0, 16.0 ) // WORKS OK
SetMusicLoopTimesOGG( musicID, 0.0, 32.0 ) // GLITCH/WHITE NOISE ON FIRST LOOP
rem SetMusicLoopTimesOGG( musicID, 16.0, 32.0 ) // GLITCH/WHITE NOISE ON FIRST LOOP
rem SetMusicLoopTimesOGG( musicID, 8.0, 56.0 ) // GLITCH/WHITE NOISE ON SECOND LOOP
PlayMusicOGG( musicID, 1 )
// main loop
do
PrintC( "FPS: " ) : Print( Round(ScreenFPS()) )
PrintC( "Music Duration: " ) : Print( GetMusicDurationOGG(musicID) )
PrintC( "Is Music Playing: " ) : Print( GetMusicPlayingOGG(musicID) )
PrintC( "Music Loop Count: " ) : Print( GetMusicLoopCountOGG(musicID) )
PrintC( "Music Position: " ) : Print( GetMusicPositionOGG(musicID) )
Sync()
loop