Problem with Stopping Music/Sound Effects/Wav Files

Started by Grapefruitologist, Wed 22/02/2006 09:10:30

Previous topic - Next topic

Grapefruitologist

Well, the music is saved under a .wav file. For some reason, it wouldn't play it as music, so I made it a sound effect instead. But now, how do I stop the music from playing when you leave the room?
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Ashen

.wav isn't an accepted format for Music (see the PlayMusic(..) entry in the manual). You could convert it to .ogg or .mp3, and then you'll be able to play it as Music, and stop it with StopMusic().
For Sounds, you could try playing it through a specific channel with PlaySoundEx(..), then stoping it with StopChannel(..). (Check your manual too - depending on which version you have you may have more channels to play with.)
I know what you're thinking ... Don't think that.

Grapefruitologist

I tried to use a .mp3, and it doesn't work. It just doesn't play.
I'm using Proskito's MI2 GUI, by the way.

I hate to double post, but I've still got a problem here, and if I didn't, I'd have to make a new thread so somebody would see it.
How can I convert it to a different file type? That might work.
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Ashen

So don't double post, just edit your last post and have a bit more patience.

Google for encoders / decoders (such as Audacity, which is free) - obviously, there's no way to covert file types using AGS itself.
Obvious, but worth checking: what version of AGS are you using, and where are you putting the .MP3 files? (Before V2.71 they should be in the main game - not 'Compiled' - folder, after they should be in the 'Music' folder.) Is there any error message, or does it just not play? What are your system volume settings like - is it possible the file is playing and you just can't hear it?
Finally, does it work if you try the same thing, but in a game not using the MI template? (Would help, to locate the problem.)
I know what you're thinking ... Don't think that.

Grapefruitologist

Well, if I didn't double post, since the thread was so old nobody would probably see it, they would think it's already solved.
Whoever made this forum (I don't know who made it) should probably add a "delete" button so people can delete their own post, like other forums-or make modified posts count as "new" posts. That would make a lot more sense...

I forgot about which folder to put it in, since I was playing them as sound files. I tried again, and it still doesn't work.
It just doesn't play. The speaker was up all the way.
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

kantor_98

Is AGS supporting Wav format ?

Gilbert

Yes, but not as music. Read the manual for more details.

strazer

And it only supports uncompressed PCM format wave files.
If you download stuff from the internet, oftentimes they're compressed with ADPCM or something. You can use (for example) Audacity to save them back to uncompressed PCM format.

Grapefruitologist

I didn't download it, it works fine as sound, just not as music, and I really need it to work as music so I can stop it...
So.
I'll try Audacity to convert them.
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Gilbert

For music, use OGG or MP3, WAV is not supported even if it's not compressed.

Grapefruitologist

Okay, I tried to use a .OGG file as music, and it doesn't work. It just doesn't play.
Nor does a .mp3 or .wav file.
.Wav files are only working as sound.

So what do I do?
I chose "play music" action on both "player enters screen (before fadein)" and "(after fadein)".
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Gilbert

Did you try rebuilding the music.vox first?

Also, depending on the version of AGS you're using, for V2.7 and earlier the sound files were all initially placed into the game's folder, for V2.71 and on you need to put the music files in the Music subfolder.

Grapefruitologist

I read the manual, and it says you only need to do that for .wav files, and yes, I did, with the .wav files.

I have the latest version of AGS, and I didn't get any "Music" subfolder, so I made a folder named "Music" in the AGS folder, and put it in there.
I tried both folders, though.
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Alun

Quote from: Grapefruitologist on Wed 01/03/2006 09:04:34I have the latest version of AGS, and I didn't get any "Music" subfolder, so I made a folder named "Music" in the AGS folder, and put it in there.

Wait...you made the "Music" subfolder in the AGS folder?  You mean in the main AGS folder?  Not within the game folder?  Because if so, that could be your problem right there...

Soup - The Comic Strip
http://www.soupcomic.com
Gods, heroes, monsters, and soup


Grapefruitologist

#14
Oh! Duh!

Apparently, looking at the folder, I already tried that, but gave up and forgot about it because it wasn't playing .wav files.

EDIT: It STILL doesn't work! xD What are the chances of that?
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Gilbert

Quote from: Grapefruitologist on Wed 01/03/2006 09:21:06
EDIT: It STILL doesn't work! xD What are the chances of that?

Did you mean it didn't work for .WAV musics? .WAV never works for musics, use MP3 or OGG instead, also, remember to rebuild music.vox after moving the files to correct position.

Grapefruitologist

No, it doesn't work for ANY of the soundfiles (that is, the .OGG file either)
(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Gilbert

Did you check if the crappy option "hide known extensions" was enabled (it was foolishly enabled by default when windows was installed) in your file manager?
It could be possible that the files were infact called something like music1.ogg.ogg, which obviously won't work.

Grapefruitologist

(\ _ /)
(o.o )
(>< )
This is Bunny
Copy Bunny into your signature to help him on his way to world domination!
http://youtube.com/watch?v=IIO2qpSsUTA
http://youtube.com/watch?v=Rg-p7xaeYes

Gilbert

You can't open the windows file manager? I think this is sometimes called something like... Explorer... though.

SMF spam blocked by CleanTalk