Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Precache music file  (Read 4645 times)

0 Members and 1 Guest are viewing this topic.

Art

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
    • View Profile
Precache music file
« 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" :)
« Last Edit: November 23, 2005, 09:42:28 PM by Art »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Precache music file
« Reply #1 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Art

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
    • View Profile
Re: Precache music file
« Reply #2 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 ?
Logged

Art

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
    • View Profile
Re: Precache music file
« Reply #3 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...
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Precache music file
« Reply #4 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Precache music file
« Reply #5 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.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Art

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
    • View Profile
Re: Precache music file
« Reply #6 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...
Logged
 

Page created in 0.115 seconds with 24 queries.