Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Questions on playing of music  (Read 2464 times)

0 Members and 1 Guest are viewing this topic.

Lion

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 101
    • View Profile
Questions on playing of music
« on: June 15, 2007, 10:00:46 AM »

- I want that music played in a menu. I do a window, after do WinMainMenu.GoSystemExclusive(), and music is
played on Game.PlayMusicChannel() does not hear.

- Change of the scene(with the loading of actors and other objects) during playing of music, results music begins looping and make mistakes. Is it possible to do something?

Tried (Game.SoundBufferSize = 60), does not help.

A problem is in that at you during the loading of objects update is not caused. If you did it, during the loading of objects it was possible to play animation sprite and music was not looping and make mistakes.

- After the function of Game.MusicCrossfade(0, 1, 3000), does a script proceed at once or after 3 seconds?

------------------------------------------------------
On one scene:
Game.PlayMusicChannel(0, "music\FirstChannel.ogg", true);

On the second scene:
Game.PlayMusicChannel(1, "music\SecondChannel.ogg");
Game.MusicCrossfade(0, 1, 3000);

In change from the first scene to second one, there is sounding(0.5 sec) of "music\SecondChannel.ogg" on a
maximal volume, and then fading of sound works. It must be so?
« Last Edit: June 16, 2007, 09:56:34 AM by Lion »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Questions on playing of music
« Reply #1 on: June 16, 2007, 02:07:06 PM »

- I want that music played in a menu. I do a window, after do WinMainMenu.GoSystemExclusive(), and music is
played on Game.PlayMusicChannel() does not hear.
Add PAUSE_MUSIC = FALSE to the window definition.


Tried (Game.SoundBufferSize = 60), does not help.
It does. But it affects the sounds/music created AFTER you set this property. So if the music is already playing and you change the sound buffer size, it will not be affected. Also, 60 seconds is an overkill, it will waste a LOT of memory.

- After the function of Game.MusicCrossfade(0, 1, 3000), does a script proceed at once or after 3 seconds?
No, the script doesn't wait for the crossfade to end.


In change from the first scene to second one, there is sounding(0.5 sec) of "music\SecondChannel.ogg" on a
maximal volume, and then fading of sound works. It must be so?
It shouldn't be happening. But you can try setting the volume of the second channel to zero.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Lion

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 101
    • View Profile
Re: Questions on playing of music
« Reply #2 on: June 16, 2007, 02:32:20 PM »

Game.SoundBufferSize

-What size of buffer by default?
-What can be done size of buffer, if the loading of objects to 20 seconds?
-That will be, if I will start loading of objects in that moment when playing of buffer will be finished?
« Last Edit: June 16, 2007, 02:52:14 PM by Lion »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Questions on playing of music
« Reply #3 on: June 16, 2007, 09:42:23 PM »

As you can easily find, the default value is 3 seconds. If your loading takes so long, perhaps you should stop the music.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.047 seconds with 20 queries.