Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Amir on Wed 01/05/2019 20:21:26

Title: Music stuttering
Post by: Amir on Wed 01/05/2019 20:21:26
Hi,

Code (ags) Select
function room_LeaveRight()
{
cJesus.ChangeRoom(12, 55, 695, eDirectionRight);
SetNextScreenTransition(eTransitionCrossfade);
}


Music stutters when changing room with SetNextScreenTransition, without SetNextScreenTransition it dosnt stutter (Default transition fadeout/in). It stutters only once and only if the music continues in the next room.

Is there any solution to this problem?

Resolution 1024.768
mp3
AGS  3.4.1

Thank u.
Title: Re: Music stuttering
Post by: Slasher on Wed 01/05/2019 21:14:01
Set Transition before change room...
Title: Re: Music stuttering
Post by: Amir on Wed 01/05/2019 21:56:43
it doesnt work. Its still stuttering  :-\
Title: Re: Music stuttering
Post by: Dualnames on Wed 01/05/2019 22:36:38
To my knowledge, setting the transition to instant helps, and then using a ui to replicate the transition effect you want.
Title: Re: Music stuttering
Post by: Amir on Wed 01/05/2019 23:13:47
Ui! :shocked: I just tried it, I set to instant and then SetNextScreenTransition(eTransitionCrossfade); and its still stuttering.
Title: Re: Music stuttering
Post by: morganw on Thu 02/05/2019 00:37:38
Current solutions are:
If the game is only going to be released for Windows, just enabled threaded audio in the game's config file:
Code (ini) Select
[sound]
threaded=1


Until very recently this mode didn't work on non-Windows platforms, although in newer versions of the engine (currently not released) I believe it has been fixed.
Title: Re: Music stuttering
Post by: Amir on Thu 02/05/2019 15:47:44
Thank u for ur suggestions.

WAV could be a good solution but not for my game. Coz I use almost in every room >
Code (ags) Select
if(currentMusic == null || currentMusic.PlayingClip != amymusic)
currentMusic = amymusic.Play();


and when I use WAV, the music repeats and dosnt continue. I think AGS dosnt like WAV format  :cheesy: coz if I use WAV format crossfade dosnt work or i mean if I use WAV format and use crossfade the WAV audios dont start playing at all. I dont know why WAV format causes many problems.

I dont dare the second solution becoz the game is going to be released not only for Windows  :undecided:

I've got one more question. I dont want the VOX file and when i set to InGameEXE for all channels, the VOX file still appears in the game folder. its stuck in the folder  :cheesy:
Title: Re: Music stuttering
Post by: Crimson Wizard on Thu 02/05/2019 15:56:05
Quote from: Amir on Thu 02/05/2019 15:47:44
I've got one more question. I dont want the VOX file and when i set to InGameEXE for all channels, the VOX file still appears in the game folder. its stuck in the folder  :cheesy:

Maybe it does not get automatically deleted from older times? Have you checked its date?
Title: Re: Music stuttering
Post by: Amir on Thu 02/05/2019 16:10:18
12.03.2019  (laugh) Can I just delete it? Or what should I do?
Title: Re: Music stuttering
Post by: Khris on Thu 02/05/2019 16:15:22
Just delete it. All necessary AGS files are rebuilt when you press F7.
Title: Re: Music stuttering
Post by: Amir on Thu 02/05/2019 16:25:11
Ok thank u Khris  ;-D
Title: Re: Music stuttering
Post by: Crimson Wizard on Thu 02/05/2019 17:18:52
This actually may be an issue that it's not deleted automatically since someone may distribute outdated files by mistake.
Title: Re: Music stuttering
Post by: Amir on Fri 03/05/2019 12:28:35
Aha ok.