Music doesn't work

Started by negullah, Thu 01/01/2004 19:34:26

Previous topic - Next topic

negullah

Hello all. I tried to put music into my game and it doesn't play it. I copied the file in the game directory, it was named music0.mid. I know that AGS should play it automatically, but it didn't, so  tried from the room editor to play the music. Didn't work. I used the text script (PlayMusic(0);). I even tried StopMusic() before PlayMusic, or renamed the file to music1.mid and called it 1 in scripts. I tried all the drivers I had with AGS for music. In winamp the file plays ok. What could it be? Am I doing somehing wrong?

Scorpiorus

What if you try to play another file,  the same result? How about sound (WAV) files, do they work?

negullah

#2
Okay, I tried to play a sound effect (file: sound0.wav) when the main character does an action. It worked. Except that, it will not play *.mid or *.mp3 files when the same action is done. I would use only wav files, but the problems are 2: they are HUGE and cannot be used for music.

EDIT: Also, when I try and play an mp3 file, after I exit the game, AGS gives me the following message: "(in room 1): PlayMP3File: file 'filename.mp3' not found or cannot play". I'm sure that the file is in the dir. But why can't it play it?

Scorpiorus

#3
QuoteEDIT: Also, when I try and play an mp3 file, after I exit the game, AGS gives me the following message: "(in room 1): PlayMP3File: file 'filename.mp3' not found or cannot play". I'm sure that the file is in the dir. But why can't it play it?
Do you play it with the PlayMP3File(filename) function? If the mp3 file is definitely there then probably it has a format which AGS cannot recognize.
EDIT: btw, the PlayMP3File(filename) function requires the mp3 file to be in the game\compiled folder rather than game folder.

What about music*.mid files, does AGS report the same warning on exit, or just doesn't play them?

negullah

#4
No, with *.mid files it does not display any kind of warnings.

EDIT: Does someone know a good sound file convertor so I can test more sound file types?
Oh, and about the mp3 file, it found it, because it added it to the game's *.vox sound file.

Gilbert

Hmmm When you tested the game, did it generate some *.log file? Try to look at it if present.

negullah

No, AGS does not generate a log file, it cannot be activated from any preferences and cannot be manually introduced through scripting because in case of mid files, it does not see any actual errors.

Gilbert

It's probably just the common music-too-quiet problem with MIDI in some computers (like mine, it's too soft to be heard, but that only effect windows games, so i don't care much about it anyway, as I'll only make DOS games).
So possibly the musics WERE played, but not loud enough, try turning the MIDI synthesyser's volume to a maximum with your windows mixer before testing a game and see if the midi were indeed being played.

If that's the case, I'm not quite sure if there're any good ways around it, as I'm lagged behind in functionality of the engine for a long time already, maybe someone experienced on that can help you.

a-v-o

It seems to me that there are different midi-file-formats available and AGS doesn't support all. Once a midi file didn't play, so I copied another from a game and it worked. After some more testing I loaded my midi-file into a midi program, saved the file, tried again... and it worked.


negullah

a-v-o is right. I tried a midi file from the internet and it worked. Although the one I need doesn't I think I can get it to work through a midi program. Thank you all and good luck on your games. ;D ;D

SMF spam blocked by CleanTalk