Aller au contenu

Photo

RE: PlaySound() not working with a specific sound file from 1.69


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

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");
}



#2
Shadooow

Shadooow
  • Members
  • 4 470 messages

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



#3
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

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.



#4
Proleric

Proleric
  • Members
  • 2 352 messages

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.


  • Pstemarie aime ceci

#5
Pstemarie

Pstemarie
  • Members
  • 2 745 messages

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.