Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Art on November 23, 2005, 09:40:34 PM

Title: Precache music file
Post by: Art on November 23, 2005, 09:40:34 PM
Is there any way to precache entire music file, like LoadSound function ?

I use Game.PlayMusic() method to play music in my game, but when i change scene, if loading takes a little bit long - fewlast seconds of music loop, and then, after scene is loaded - it becomes ok....

I'd like to avoid this "effect" :)
Title: Re: Precache music file
Post by: Mnemonic on November 25, 2005, 12:07:06 PM
No, it's not possible at the moment. You'd have to limit the amount of data being loaded (you must be loading a lot of data, right?) or turn off the music on scene transition.
I could increase the size of the music buffer though.
Title: Re: Precache music file
Post by: Art on November 25, 2005, 09:11:43 PM
Hi Mnemonic. Good to hear you again :)
yes,right. I precache all scene data on loading...
How could we increase buffer size? Another exe or some option in registry ?
Title: Re: Precache music file
Post by: Art on November 25, 2005, 09:19:29 PM
And one more question about music:
Is it possible not to stop playing music when i call LoadWindow from scene
For example, i'd like to continue currently playing music when user pushes ESC to go to main menu...
Title: Re: Precache music file
Post by: Mnemonic on November 27, 2005, 01:11:22 PM
How could we increase buffer size? Another exe or some option in registry ?
I'll have to make a modification to the engine, perhaps making the sound buffer size controllable from a script.
Title: Re: Precache music file
Post by: Mnemonic on November 27, 2005, 01:12:47 PM
And one more question about music:
Is it possible not to stop playing music when i call LoadWindow from scene
For example, i'd like to continue currently playing music when user pushes ESC to go to main menu...
You can add:
  PAUSE_MUSIC = FALSE
to the window definition to achieve this.
Title: Re: Precache music file
Post by: Art on November 28, 2005, 08:40:59 AM
Tnx, it worked!

About music chaching, i think, i'll pause the game between sceens
Anyway, controlling this value from the scripts would be a nice feature, imho...