Having problem with sound fx in A16.

Started by rhtstm, December 26, 2016, 12:34:39 PM

Previous topic - Next topic

rhtstm

Hi all,
I have notice that sound defs script in Alpha 16 added a new <context>MapOnly</context> line.
I have managed to change them all in my mod's script.
The problem is, some weapon's sound fx are acting weird. The first burst shot of a weapon do play the correct sound fx, then the rest of the shots sound fx just disappears/go silence while shooting.
Here is the current sound script example:

<?xml version="1.0" encoding="utf-8"?>
<DefPackage-SoundDef>
  <SoundDef>
    <defName>WeaponA</defName>
<context>MapOnly</context>
    <eventNames />
           <maxVoices>3</maxVoices>
           <maxSimultaneous>1</maxSimultaneous>
    <subSounds>
      <li>
        <grains>
          <li Class="AudioGrain_Folder">
            <clipPath>WeaponAsound</clipPath>
          </li>
        </grains>
        <volumeRange>
          <min>60</min>
          <max>80</max>
        </volumeRange>
        <pitchRange>
          <min>0.935690</min>
          <max>1.055345</max>
        </pitchRange>
      </li>
    </subSounds>
  </SoundDef> 
</DefPackage-SoundDef>


Anyone have any idea what is going on?

Thanks!

AlyxMS

#1
Update: Problem solved by converting files to .ogg, seems like A16 broke .wav.

I'm bumping up this thread because I have the exact same problem.
It worked perfectly in A15, in A16 it had the problem OP mentioned. Adding <context>MapOnly</context> did not help.

Relevant xml part:
<SoundDef>
    <defName>AMSBoltAction</defName> 
    <context>MapOnly</context>
    <eventNames /> 
    <maxSimultaneous>1</maxSimultaneous> 
    <subSounds>
      <li>
        <grains>
          <li Class="AudioGrain_Clip">
            <clipPath>Weapons/SmallArms/AMSBoltAction</clipPath>
          </li>
        </grains>
      </li>
    </subSounds>
  </SoundDef>


More Details:
File Format: WAV, 16 Bit Stereo
Issue: Only first shot can be heard per game.