Page 1 of 2

Consistant Sound File Problem.....

PostPosted: Sat Jan 26, 2008 10:44 am
by andylegate
Okay, this was something that both I and Nadnerb were looking at, and he wanted to see if it was consistant before adding it possibly to his Wiki tutorial on Adding Sounds.

Here is the problem:

I've found that, when you have added several sound files to your Age, everything works like a champ and exports fine.

Now, save your .blend file and close down Blender. Go have dinner, watch TV, whatever, continue on with Real Life.

Later, or the next day, sit down and open Blender back up, load up your Age's .blend file, do some more work of some sort, like adding some other objects and texturing them, or something.

Now go to re-export the Age to check out your new stuff in Uru...........uh oh, I'm getting and export Error. Say's it can't find a certain sound file.

Sure enough, if you change one of your screens to the Audio Window, and click on the up/down window to see what sound files are loaded, if you have more than one, you'll find the others "missing" for some reason. Sometimes it's just one, sometimes (if you have like 5) it's missing 3 of the 5.
If you turn around and re-open up each of the wav files, the Age will export just fine, no "Missing File" error.

However, this happens to me, every single time I save my blend file, and then shut down Blender, and go else where. When I load everything back up, some or many of the sound files will be missing from the Audio Window, and I'll get a Missing File error upon export.

Okay, easy fix, just remember to check to make sure all your sound files are there when you go to export......

BUT....what happens when you've got a HUGE age, with a LOT of sound files down the road? I guess one answer is to write down a list of all the files on paper and tape it next to your screen, so you can double check each time.......

But, I think this problem will need to be looked at in the future.

Re: Consistant Sound File Problem.....

PostPosted: Sat Jan 26, 2008 11:53 am
by Paradox
Whoever wrote Blender's sound "saving" code deserves to be shot IMO.

I'm going to add a hack to the plugin that will force the sounds to be saved when you export so that they will still be there next time.

You will need to add all of your sounds/make sure that they are all there, export, then save the .blend file. The next time, all of the sounds should still be there.

Re: Consistant Sound File Problem.....

PostPosted: Sat Jan 26, 2008 12:00 pm
by Trylon
Well, I was thinking - maybe it's better NOT to use blender's sound system.

How about a subfolder in the place where your age is stored - like "<yourage>_Sounds" (as we already have the <yourage>_TexCache"), that must contain your wav files, instead of blender...
It probably makes more sense as well.


P.S.
When doing so, we could also make it a single "<yourage>_PyPRPData" folder that thas subfolders for Sound and Texcache

Re: Consistant Sound File Problem.....

PostPosted: Sat Jan 26, 2008 12:59 pm
by andylegate
Whoever wrote Blender's sound "saving" code deserves to be shot IMO.



heheheh......look at Paradox's avatar pic..........

Sniper captured from bell tower!

"You know....he was one of those quiet ones.....didn't say much.....I mean, he doesn't look like a killer does he?"


Hehehehe, ROFL, sorry, just had that pop in my mind while reading your response! :D

Re: Consistant Sound File Problem.....

PostPosted: Sat Jan 26, 2008 6:54 pm
by Nadnerb
I think the <yourage>_SoundCache would be a good idea as long as it works like the texCache, and is generated automatically on export. So, during export, the plugin would look in blender, and in the soundcache folder for sounds, and copy the file into the soundcache folder if not already there.

Re: Consistant Sound File Problem.....

PostPosted: Sat Jan 26, 2008 6:57 pm
by Paradox
That would be a great system, except that Uru uses .ogg and Blender only supports .wav.

So the sounds that were copied into the sound_cache folder would be .wav, thus not usable by Uru.

Re: Consistant Sound File Problem.....

PostPosted: Sat Jan 26, 2008 8:02 pm
by Nadnerb
So? The plugin only seems to use these files to export the dat files anyway. We'll move the ogg and wavs manually to the sfx directories, just as before. The cache would just be a way to fix the saving problem.

Re: Consistant Sound File Problem.....

PostPosted: Tue Jan 29, 2008 12:38 pm
by andylegate
Guys?

I tested this myself. I went and deleted all the wav files from the streamingcache folder that I had put there.

The sounds in my Age are still there and work fine.

That's great news since the ogg files are MUCH smaller in size than the wavs.

Re: Consistant Sound File Problem.....

PostPosted: Tue Jan 29, 2008 3:58 pm
by Chacal
Did Uru create the wav files in the cache?
Did you notice a difference in performance?

Re: Consistant Sound File Problem.....

PostPosted: Tue Jan 29, 2008 4:07 pm
by andylegate
Uru CC creates a streamingcache folder and dumps a ton of wav files there.

The ONLY wav files I deleted were the ones I created for my Age.

There was no difference in performance.