Author Topic: RE: PlaySound() not working with a specific sound file from 1.69  (Read 460 times)

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RE: PlaySound() not working with a specific sound file from 1.69
« on: November 22, 2015, 01:57:58 pm »


               

Has anyone been able to get al_fanfare_horn.wav from the 1.69 patch to work with PlaySound()? I can get the sound to work as a sound object, using SounObjectPlay() and SoundObjectStop(), but I'd prefer not to use this route if I can avoid it. Its much tidier for this particular placeable if it just plays the sound when the object is used.


 


Here's the OnUsed event suggested in the Lexicon, which is what I've been using...


 



void main()

{


     PlaySound("al_fanfare_horn");

}



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
RE: PlaySound() not working with a specific sound file from 1.69
« Reply #1 on: November 22, 2015, 04:34:05 pm »


               

Yes I found more of them and fixed in last 1.72beta



 


- sea surf small sound object: fixed the interval variation which was incorrectly set to 0.05 instead of 5 seconds

- sea surf large sound object: fixed the volume which was zero before

- fixed Rain Heavy and Rain Light sound objects



al_fanfare_horn is not amongst them because _al_ is supposed to be used as sound in area setting


 


 there is as_fanfare_horn which in 1.72beta you can even found in base palette



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RE: PlaySound() not working with a specific sound file from 1.69
« Reply #2 on: November 22, 2015, 08:42:48 pm »


               

PlaySound() is supposed to play the audio file directly, without the need for a sound object to be place down in the area. I tried changing the sound file name to "as_fanfare_horn", but still no sound plays. However, the script does work with other sounds such as the gong. Therefore, I'm assuming something is wrong with the sound file.



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
RE: PlaySound() not working with a specific sound file from 1.69
« Reply #3 on: November 23, 2015, 09:27:02 am »


               

The problem is that this file is stereo, which won't play. Presumably, it wasn't tested before 1.69 was released.


 


Change it to mono (in Audacity or whatever), pop the .wav in a hak, then PlaySound works fine.


 


Happy to post the working version if anyone wants it.



               
               

               
            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
RE: PlaySound() not working with a specific sound file from 1.69
« Reply #4 on: November 23, 2015, 10:24:03 am »


               

Thanks, Proleric. I Already converted and added the file to Q - found the info in another, older, thread. I also converted the trumpet - as_fanfare_trump as well.