Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Sound pops caused by music loading then cross fade.  (Read 2810 times)

0 Members and 1 Guest are viewing this topic.

redfox

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 122
    • View Profile
Sound pops caused by music loading then cross fade.
« on: January 11, 2008, 01:50:21 PM »

Hello,

I have short 30 second looping music, which crossfade from one to the other. The problem is that between the code to load the music and the instruction to crossfade, the music has already started playing at full, (before the code has reached the crossfade instructions). This creates a pop, from the first moments of the looped track. Has anybody else encountered this and knows a way to prevent it?

My code looks like this.

Code: [Select]
Game.PlayMusicChannel(0, "music\track1.wav", true);
Game.MusicCrossfade(1, 0, 2000, false);

I have tried to use .wav files (rather than the slower loading .ogg) And I have already reduced the music track length down to a short 30 seconds.
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Sound pops caused by music loading then cross fade.
« Reply #1 on: January 11, 2008, 02:31:38 PM »

How about simply setting volume of the other channel to 0?

Game.PlayMusicChannel(1,"new track",true);
Game.SetMusicChannelVolume(1,0);
...
...

crossfade?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

redfox

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 122
    • View Profile
Re: Sound pops caused by music loading then cross fade.
« Reply #2 on: January 12, 2008, 01:30:37 PM »

Thanks,

I will try that and see if it stops the pop, will I need to reset that channel to full before the crossfade? or will the crossfade automatically put the volume up to full?
Logged
 

Page created in 0.027 seconds with 24 queries.