Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Sound issues  (Read 4234 times)

0 Members and 1 Guest are viewing this topic.

Dan Peach

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 100
    • View Profile
    • Viperante - Game Development
Sound issues
« on: April 22, 2012, 07:22:03 AM »

Helloooooo,

Having a little sound issue. I use a script (in the PC version of Corrosion) in a loop to randomly select background sound tracks. It selects one of 4, plays it, waits 10 seconds, then selects another one to play. I attach this script in the game's first scene, and leave it attached. Works fine on the PC, but I've got the game running on my iPod Touch now, and the sound is breaking up everytime I tap to move to a new scene, which is a lot since this is a slideshow style 1st person game. Sometimes it stops playing tracks in the middle of the track, and starts playing another one. It's just not working the way it's supposed to. Sometimes it switches tracks when switching scenes. In another script I set the volume of channel 1 to 0, whilst keeping the music playing (just with the volume set to 0) and that doesn't work either.

Any ideas?

This is the random track script that I use:

Code: WME Script
  1.  
  2. #include "scripts\base.inc"
  3.  
  4. global RandomMusic1To4;
  5. global WaitForMusic;
  6.  
  7. if(Game.PrevSceneFilename=="scenes\intro\intro.scene")
  8.   {
  9.    Game.PlayMusicChannel(1, "music\Corrosion V1 M.ogg", false);
  10.   }
  11.  
  12. while(true)
  13. {
  14.  
  15.   {
  16.    Sleep(1000);
  17.   }
  18.  
  19.  if(WaitForMusic) Sleep(10000);
  20.  
  21.  WaitForMusic = true;
  22.  
  23.  RandomMusic1To4 = Random(1,4);
  24.  
  25.  if(RandomMusic1To4==1) Game.PlayMusicChannel(1, "music\Corrosion V1 M.ogg", false);
  26.  else if(RandomMusic1To4==2) Game.PlayMusicChannel(1, "music\Corrosion V2 M.ogg", false);
  27.  else if(RandomMusic1To4==3) Game.PlayMusicChannel(1, "music\Corrosion V5 M.ogg", false);
  28.  else if(RandomMusic1To4==4) Game.PlayMusicChannel(1, "music\Corrosion V6 M.ogg", false);
  29.  
  30.  Sleep(1000);
  31.  
  32. }
« Last Edit: April 22, 2012, 07:26:06 AM by Dan Peach »
Logged

Dan Peach

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 100
    • View Profile
    • Viperante - Game Development
Re: Sound issues
« Reply #1 on: April 22, 2012, 10:56:52 AM »

Ok, that weird breaking sound issue seems to have mysteriously disappeared now - didn't do a thing, so dunno what was causing that - game appears to run fine on the iPod.  :)

Still won't set the channel volume to zero though. Is that a limitation of WME Lite?
 

Page created in 0.073 seconds with 22 queries.