Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Lionmonkey on Wed 30/04/2008 15:51:47

Title: Playing music: "screech" and volume.
Post by: Lionmonkey on Wed 30/04/2008 15:51:47
 AGS version is 2.72.

I wanted some music to be playing when player launches the game, so I've put an mp3 file, titled "Music0" in the "Music" folder. I can hear it when I launch the game, but there are two problems with it.

First one is that I always hear a "screech" before the actual music starts playing. You know, like the sound when someone uses a badly set up microphone. 

The second one is that the volume is too low. I've tryed solving it with
"PlayAmbientSound (1, 1, 200, 0, 0)", but it didn't affect the volume.

Please give some help. Also, I'd like to know, what is the best music format for AGS?

Title: Re: Playing music: "screech" and volume.
Post by: skuttleman on Wed 30/04/2008 21:29:27
I would play the mp3 file in another program (like Windows Media Player) and make sure that the screech isn't coming from the file itself, because I have no idea how AGS could cause that.

There are two commands associated with music volume:

SetMusicMasterVolume() - which sets the overall music volume for the game.
SetMusicVolume() - which is room specific. (and can be setup in the room editor)

For these to work, I think you have to use the PlayMusic() function, not the PlayAmbientSound() function.
Title: Re: Playing music: "screech" and volume.
Post by: Dualnames on Wed 30/04/2008 21:31:38
In order to adjust its volume you can do it externally , so no reason to go bother with all the details..
Title: Re: Playing music: "screech" and volume.
Post by: Lionmonkey on Thu 01/05/2008 09:12:31
SetMusicMasterVolume() didn't seem to do anything, but SetMusicVolume() did, thanks. I find it really annoying to adjust volume of your speakers every time, you launch a game, so I wanted my game not to have this flaw.

Still looking how to solve the "screech" problem. The file plays totally ok in Media Player Classic, in Windows Media Player you can hear a short click before the track starts again if you set it to automatically repeat. Also, after some time, I've noticed that the "screech" actualy sounds after about 1 sec of music. Still got no idea, why it exists, I mean, it's between two same patterns.