V3: Playing song, sound issues (maybe it was packed.exe issues?)
Displaying 1-1 of 1 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
KingOfTheNorth

I have not seen a thread on this either. I have started to use sounds and thought that using OGG would be good too. However, whenever I the code hits PlaySong(song1) [where song1 would be "data/folder/songname.OGG"], Verge throws up an error. Full details as follows.

I was playing around with the included tool packed.exe. I figured out how it works after packing the entire data folder and the folders inside it and getting verge.exe to work. This was before I had songs in there. I packed the same code with a simple song in the beginning (something that would play at the start with an intro menu). I hit verge.exe and it throws up an error. I knew it was before the song played since the song never played at all before it puts out the error. The error itself was not a V3 error like a bad array out of bounds nor was it a missing brackets error. The program itself actually puts up a windows error and shuts V3 down. The code where it would put up the error, as I found out, was at the PlaySong() part:

int song1 = LoadSong("songname.OGG");
PlaySong(song1);
...
StopSong(song1);
FreeSong(song1);

I went to a previous saved copy of the program with working music to make sure that it wasn't the new code that was messing it up. Sure enough, when I hit verge.exe (also tried Textpad >> Tools >> Run), it also throws up an error and shuts down Verge3. This was true with all of the previous saved copies. I tried to look in the forums to make sure that I wasn't missing anything. Nothing turned up relating to problems with OGG. I ran through the code again to make sure that there weren't any memory leaks, in case that was the fault. I thought that it was the OGG files that were at fault. I changed the music files to MP3. They worked. To make sure that it wasn't the other code that was messing it up, I just stuck this code to the autoexec:

void autoexec()
{
int done;
int song1 = LoadSong("songname.OGG");
int font = LoadFont("font.gif");
PlaySong(song1);
while(!done)
{
Render();
PrintString(0,0,screen,font,str(GetSongPos(song1)));
ShowPage();
}
StopSong(song1);
FreeSong(song1);
}

Now, strangely enough, THIS code worked. It just shows the byte count and plays the song right. Confused, I went back to my current copy and hit verge.exe (also tried Textpad >> Tools >>Run) and it started working again. Backtracking, I went to the copy where it started the problem. I ran the program and the simple OGG song played. Then....I used packed.exe to pack the data folder. The project folder now consists of [data.vpk] [verge.exe] [verge.cfg] [fmod.dll] [system.vc] after deleting the data folder. After mount1 data.vpk in the verge.cfg, I hit verge.exe....and error....v3 shut down. I retraced my steps to get the music working again. This time, after packing it with OGG, it played....without sound.... Thinking that this has something to do with OGG, I replaced the OGG files with MP3s, packed the program with MP3s instead of OGG, and hit verge.exe. It worked. OGG works fine if it is not packed.

QUESTIONS:
What seems to be the problem that v3 is running into when trying to access the OGG in the pack file? [It seems to access MP3s just fine. I didn't try WAV.]

Does packed.exe work with OGG? [Does not seem so...]

Should OGG be in a separate, non-directory packfile?

Posted on 2010-08-10 16:44:32


Displaying 1-1 of 1 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.