Music stuttering

Started by Amir, Wed 01/05/2019 20:21:26

Previous topic - Next topic

Amir

Hi,

Code: ags
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.
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Slasher

Set Transition before change room...

Amir

it doesnt work. Its still stuttering  :-\
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Dualnames

To my knowledge, setting the transition to instant helps, and then using a ui to replicate the transition effect you want.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Amir

Ui! :shocked: I just tried it, I set to instant and then SetNextScreenTransition(eTransitionCrossfade); and its still stuttering.
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

morganw

Current solutions are:

  • use wave format for the music
  • enabled threaded audio playback
If the game is only going to be released for Windows, just enabled threaded audio in the game's config file:
Code: ini
[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.

Amir

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
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:
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

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?

Amir

12.03.2019  (laugh) Can I just delete it? Or what should I do?
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Khris

Just delete it. All necessary AGS files are rebuilt when you press F7.

Amir

Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

Crimson Wizard

This actually may be an issue that it's not deleted automatically since someone may distribute outdated files by mistake.

Amir

Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

SMF spam blocked by CleanTalk