No music.vox file created

Started by Scoville, Tue 08/06/2004 07:06:51

Previous topic - Next topic

Scoville

I've put a few music files into my game, but they won't play. The files are all labeled "musicx.wav" (I have also tried "Musicx.wav" and "MUSICx.wav" but those didn't work either). They are all located in the ags/game/ directory. The problem seems to be that no .vox file is created when I tell AGS to do so. No such file is in the compiled directory, and if I put a script in to check if a music.vox file is found, the game says it is not.

Whenever I add a new music file, AGS asks if I want to recreate the VOX file, I say yes, but still no file is made. If I hit recompile VOX files, still nothing happens. I am using the play music on room entry check box to play the music. Any suggestions?

LordHart

Are the wav files named... musicx.wav or have you named them properly with names like music1.wav?

The X is where you should put the number. Then you must have either PlaySound(X); or PlayMusic(X); where you want the sound or music to play...

After you have done that, then you must select the Make VOX file or update Vox files or whatever it says from the menu.

strazer

You can't use WAV files for music:

PlayMusic (int music_number)

Changes the currently playing background music to MUSICx.OGG, MUSICx.MP3, MUSICx.MID, MUSICx.MOD or MUSICx.XM (where X is MUSIC_NUMBER).

Scorpiorus

The manual, however, states that it is possible to have a WAV as a music file. Although I never tried to include a wav music file before I always thought it was possible. But seems like, yes, it doesn't even build a music.vox file. So, this is either a bug or some sort of inconsistency in the manual.

Mr Flibble

Couldn't you just rename your songs Soundx.wav, and tell AGS to play that sound?
Ah! There is no emoticon for what I'm feeling!

Scoville

Thanks. I did have the files named music1.wav, music2, and so on.  Playing the music as a sound effect wouldn't work, though, because the music wouldn't loop that way.

It's no big deal that wavs don't work. I was planning on converting to OGG eventually, I just don't have the program for it yet, and wanted to test the music before bother with downloading it and compressing the files.

Barbarian

Actually, you could play a sound effect as a loop, end effectively having it play as your music for a room.

Use the PlayAmbientSound (int channel, int sound, int volume, int x, int y); command.

An example (from the help manual) is:
"  PlayAmbientSound (1, 10, 150, 250, 110);

starts SOUND10.MP3 (or in your case, SOUND10.WAV) playing in the background, at a medium volume (volume can be set from 1 to 255, 255 being the loudest) and coming from co-ordinates (250, 110). "

If you want the sound to play equally from any position in the room, you'd set "X" and Y" as "0", so it would look like:

" PlayAmbientSound (1, 10, 150, 0, 0); "

Look up the PlayAmbientSound command for more details  ;)

A couple of other things to note though (quoted from the help manual again):

"NOTE: The sound will stop when the player leaves the room.

NOTE: In order to optimise the looping of the sound, the entire sound effect is loaded into memory. Therefore, do not use this function to play normal background music with, since music files tend to be very large and are better streamed from disk with the normal music functions."

Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

Ishmael

If I recall right, you could use PlaySound(1001); to play music1.wav ..?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Scorpiorus

Yeah, this is one of the things I tried at first but then eventually realized that AGS doesn't build a music.vox file (since the manual says it should do) nor attachs them to game .EXE.
Obviously, that's not really practical to distibute the final release with the WAV-ed music but could come in handy while we are in mid-design, as Scoville mentioned.

Mr Flibble

Just a thought, open windows media player. Click on "file", then "open". Select one of your .wav files. "Save As" (filename).mp3

Solved.
Basically, you can open a file in Windows Media Player and save it to almost any other format. If you have WMP.
Not technically an AGS solution, but what the hey.
Ah! There is no emoticon for what I'm feeling!

SMF spam blocked by CleanTalk