# Popping at the start of low volume sounds (API)

**URL:** <https://qa.fmod.com/t/popping-at-the-start-of-low-volume-sounds-api/11448>\
**Category:** FMOD Studio\
**Created:** [May 8, 2014, 1:57pm UTC](https://qa.fmod.com/t/popping-at-the-start-of-low-volume-sounds-api/11448 "2014-05-08T13:57:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![noknees](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@noknees](https://qa.fmod.com/u/noknees)\
**Post date:** [May 8, 2014, 1:57pm UTC](https://qa.fmod.com/t/popping-at-the-start-of-low-volume-sounds-api/11448/1 "2014-05-08T13:57:14Z")

</div>

Hello, I’m getting sound popping for 3D sounds that are played at a distance (so when their volume is low). The problem seems to be that the sounds are being played at full volume for a very short time, before the proper low volume is applied, producing the popping sound.

I’m using FMOD Studio 1.03.

Now some code in case I’m doing something wrong.

Here is how I’m initializing FMOD:

```auto
		result = _system->init(512, FMOD_INIT_NORMAL | FMOD_INIT_VOL0_BECOMES_VIRTUAL, 0);
               /* */
               _system->createChannelGroup("effects", &_effects_channel);
```

Here is how I’m initializing sounds:

```auto
		LOG_ERROR(_system->createSound(("audio\\" + filename).c_str(),
			FMOD_3D | FMOD_3D_LINEARROLLOFF, 
			0, &sound));
		
		if (sound){
			LOG_ERROR(sound->set3DMinMaxDistance(320 * DISTANCEFACTOR, 1500.0f * DISTANCEFACTOR));
```

And here is how I’m playing sounds:

```auto
			FMOD::Channel *channel = NULL;

			LOG_ERROR(_system->playSound(sound, _effects_channel, true, &channel));
			if (channel){
				FMOD_VECTOR position;
				FMOD_VECTOR vel;
				vel.x = vel.y = vel.z = 0;
				if (play3d){
					position.x = pos.x;
					position.y = pos.y;
					position.z = pos.z;
				} else {
					position.x = 0;
					position.y = 0;
					position.z = 0;
					channel->setMode(FMOD_3D_HEADRELATIVE);
				}
				LOG_ERROR(channel->set3DAttributes(&position, &vel));
				LOG_ERROR(channel->setPaused(false));
			}
```

Now, I’ve found a workaround, which is to add 5ms of silence to the start of every sound. However this adds unnecessary latency to the game sound events, which is a huge letdown.

---

<div class="post-metadata">

**Author:** ![noknees](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@noknees](https://qa.fmod.com/u/noknees)\
**Post date:** [May 9, 2014, 11:50am UTC](https://qa.fmod.com/t/popping-at-the-start-of-low-volume-sounds-api/11448/2 "2014-05-09T11:50:11Z")

</div>

Thank you! That was it 🙂

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [May 11, 2014, 11:53pm UTC](https://qa.fmod.com/t/popping-at-the-start-of-low-volume-sounds-api/11448/3 "2014-05-11T23:53:17Z")

</div>

Hi, we’re just fixing this for the next release, yes the volume ramp was set up correctly at pause / play time, but the first update resets the volume ramp from 1.0 to 0.0 if the mixer hadnt been updated yet, so you could get that pop noise. The new one fixes the ramp at pause time. You will want ramping eventually, otherwise you’ll get crackling.

---

<div class="post-metadata">

**Author:** ![dphrygian](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@dphrygian](https://qa.fmod.com/u/dphrygian)\
**Post date:** [May 9, 2014, 12:41am UTC](https://qa.fmod.com/t/popping-at-the-start-of-low-volume-sounds-api/11448/4 "2014-05-09T00:41:56Z")

</div>

I ran into this too, as described here: [http://www.fmod.org/forum/viewtopic.php?f=21&t=18770#p59277](http://www.fmod.org/forum/viewtopic.php?f=21&t=18770#p59277).

Use Channel::setVolumeRamp(false) to fix it. I reeeally think this behavior should not be enabled on channels by default. 😛
