Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: MusicChannel can't synchronize?  (Read 4762 times)

0 Members and 1 Guest are viewing this topic.

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
MusicChannel can't synchronize?
« on: May 21, 2013, 11:49:02 AM »

I'll explain my problem briefly. I have 3 musics for the first scenes of my game. These 3 musics are supposed to play simultaneously in the following way:
1- GDTheme: this is the main theme, with its volume always set to 100;
2- oldpiano: when entering a certain scene, I set this music's volume to 100. When leaving from the scene, I set it to 0;
3- Guitar: when entering a certain scene, I set this music's volume to 100. When leaving from the scene, I set it to 0;

In order to do this, the tracks must be completely synchronized, but I noticed they aren't... while if I test them on other programs, they do. In the first scene I have this code which starts all the tracks:

Code: [Select]
  Game.PlayMusicChannel(2, "audio\GDguitar.ogg", true);
  Game.PlayMusicChannel(3, "audio\oldpiano.ogg", true);
  Game.PlayMusicChannel(4, "audio\GreendartTheme.ogg", true);
  Game.SetMusicChannelVolume(2, 0);
  Game.SetMusicChannelVolume(3, 0);
  Game.SetMusicChannelVolume(4, 95);

Is there something I'm doing wrong, or is it a bug?
Logged

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: MusicChannel can't synchronize?
« Reply #1 on: May 21, 2013, 12:19:05 PM »

maybe  I am being stupid and have missed something, would it not be safer to mix the music outside of WME and play the appropriate mix accordingly - there is always the possiblity of system lags caused by external events which I would have thought make the "real-time " mixing of tracks risky
Logged

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: MusicChannel can't synchronize?
« Reply #2 on: May 21, 2013, 12:28:28 PM »

The idea is that every scene should ADD SOMETHING to the music. When you enter to a scene there's a street guitarist who's playing a song which should play ONLY in that scene, for example. The problem is that if the guitarist music is not synchronized it will sound bad.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: MusicChannel can't synchronize?
« Reply #3 on: May 21, 2013, 12:44:04 PM »

I'm afraid WME cannot guarantee synchronized music channels (for the reasons stated by eborr). There is a plugin by Spellbreaker which tries to rectify the problem.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

The Man

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 67
    • View Profile
Re: MusicChannel can't synchronize?
« Reply #4 on: May 21, 2013, 12:49:03 PM »

Allright... I just wanted to be sure I wasn't doing something wrong!
Thanks to both of you for the answers!
Logged

Spellbreaker

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Gender: Male
  • Posts: 376
    • View Profile
    • Apeiron Studios
Re: MusicChannel can't synchronize?
« Reply #5 on: May 21, 2013, 05:41:38 PM »

Yes the Plugin works fine, if you have any question, you can contact me.
Logged
 

Page created in 0.019 seconds with 23 queries.