# Soundengine basics

**URL:** <https://qa.fmod.com/t/soundengine-basics/18419>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [February 21, 2022, 10:51pm UTC](https://qa.fmod.com/t/soundengine-basics/18419 "2022-02-21T22:51:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [February 28, 2022, 12:28am UTC](https://qa.fmod.com/t/soundengine-basics/18419/2 "2022-02-28T00:28:23Z")

</div>

> [@mca2](#):
>
> Are there any good practices/flags I should add?

Might be a good idea to enable logging as well, it makes it a lot easier to debug your game and liaise with support if necessary. You can do this by calling [`FMOD::Debug_Initialize`](https://fmod.com/resources/documentation-api?version=2.02&page=core-api-common.html#debug_initialize), passing in `FMOD_DEBUG_LEVEL_LOG` as the first argument for maximum logging.

> [@mca2](#):
>
> (a lot of example use channel maps? why?)

Not sure what you mean by channel maps, are you asking why some examples use channels and others use event instances?

> [@mca2](#):
>
> Is there a good reason to go for this model?

Off the top of my head, depends on whether you think you will have lots of objects with sound managed in the same way, or few objects with sounds managed in different ways. Having a generic sound manager that only requires an object’s transform lends itself better to the former because you will only need to create one sound manager class that can latch onto anything (as the UE integration does), whereas having specialized sound managers local to specific objects lends itself better to the latter because you will be able to have fine-grained control without needing to make many arbitrary sound manager specializations.

> [@mca2](#):
>
> But what are the guidelines for especially the looping (while pressed & constant sound)?

Probably a state machine that calls a looping event during the active state, and stops in the inactive state. There was some [discussion](https://qa.fmod.com/t/visual-scripting/18354/2) about this recently using Unity bolt scripting which conveniently illustrate this concept at a high level.

> [@mca2](#):
>
> And how to attenuate eg the engine sound when shooting a laser or receiving a message?

Setting up sidechain compression in FMOD Studio is the usual way to go. Here is a [video](https://www.youtube.com/watch?v=I3eCT6KCOBw) that explains the concept.

Please let me know if anything needs clarifying!

---

_[View the full topic](https://qa.fmod.com/t/soundengine-basics/18419)._
