# Minor silly questions

**URL:** <https://qa.fmod.com/t/minor-silly-questions/16764>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [February 16, 2021, 12:17pm UTC](https://qa.fmod.com/t/minor-silly-questions/16764 "2021-02-16T12:17:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jiyongman](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jiyongman](https://qa.fmod.com/u/jiyongman)\
**Post date:** [February 16, 2021, 12:17pm UTC](https://qa.fmod.com/t/minor-silly-questions/16764/1 "2021-02-16T12:17:59Z")

</div>

I know I should post each question separately with a proper title for others here, but below are mostly very minor and silly questions from me, so please bear with me.

1. Is it okay just to replace the newer **libfmod.so** / **fmod.dll** with the old one and not recompile my application again with it, if the signatures of all the functions I’m accessing are still the same?  
I thought it’s one of the reasons dynamic libraries exist and actually worked well so far this way, but some guy recently told me that I needed to recompile, and even my GIT (not always but sometimes) thought my application’s binary data changed after recompiling.  
So I’m confused now…

2. Why is **FMOD** ’s default DSP buffer size on Android **512** rather than **256**? Is it because there are still many Android devices that don’t support **FEATURE\_AUDIO\_PRO** or **FEATURE\_AUDIO\_LOW\_LATENCY**? Or is it a just-in-case safe margin value for **FMOD** users that would add many **DSP** s? What if my application only uses one or two global channel-group reverbs and a few **EQ** s, and targets recent devices with **FEATURE\_AUDIO\_PRO** or **FEATURE\_AUDIO\_LOW\_LATENCY** , and low-latency is very important? Do you still recommend sticking with 512 over 256?

3. Can I implement an Audio Export feature with the **FMOD** API? I mean like professional audio apps, without playing any sound and with a faster process time.

4. I wonder what **FMOD\_Channel\_SetPosition(soundChannel, newPosition, FMOD\_TIMEUNIT\_MS)**'s expected behavior would be when the newPosition is greater than **FMOD\_Sound\_GetLength()**'s return value.  
In my simple tests, it just moved to 0.

5. After a sound stops (either by itself or **FMOD\_Channel\_Stop()**), can I still properly check the state of that sound using **FMOD\_Channel\_GetPaused()** and **FMOD\_Channel\_IsPlaying()** anytime?  
I don’t still understand how the virtual channel system exactly works. If channels are reused, I think checking the old **FMOD\_CHANNEL** variables may return the states of new sounds rather than old ones, at some point (after playing many sounds for many hours).

Sorry for spamming questions.

Thanks!

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [February 17, 2021, 3:52am UTC](https://qa.fmod.com/t/minor-silly-questions/16764/2 "2021-02-17T03:52:54Z")

</div>

1. Yes you can just replace the dynamic library with a newer one provided it’s from the same major version. So if the game is built with 2.01.00 you could swap in the dynamic library from 2.01.05 without problems. Just don’t swap in the dynamic library from 2.02.00 for instance.

2. Android audio is a terrible place, with hundreds of different devices, each with their own buffering characteristics. We highly recommend you leave the buffer size at 512 for maximum compatibility. If you can ensure you are running on a subset of known good devices then you may consider 256.

3. You can set the output via System::setOutput, if you use FMOD\_OUTPUTTYPE\_WAVWRITER\_NRT (note the NRT stands for non-realtime) you can output audio to a .wav as fast as you call System::update.

4. Id expect a return of FMOD\_ERR\_INVALID\_POSITION from setPosition.

5. No, once a Channel stops the handle will go invalid, you will received FMOD\_ERR\_INVALID\_HANDLE. Virtual voices limits how many sounds are audible, you can still use the Channel handle for a virtual voice. If you don’t have enough Channel handles (set via System::init) they can be reused, if you attempt to use a stale handle you will get an error FMOD\_ERR\_CHANNEL\_STOLEN, so you don’t have to worry about getting the new sound state.

---

<div class="post-metadata">

**Author:** ![jiyongman](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jiyongman](https://qa.fmod.com/u/jiyongman)\
**Post date:** [February 17, 2021, 5:34am UTC](https://qa.fmod.com/t/minor-silly-questions/16764/3 "2021-02-17T05:34:39Z")

</div>

Thank you very much!

Now all my confusion cleared, except for the last one…  
Are you talking about both **FMOD\_Channel\_GetPaused()** and **FMOD\_Channel\_IsPlaying()** or just the **FMOD\_Channel\_GetPaused()**?

If it applies to **FMOD\_Channel\_IsPlaying()** too, I don’t get why the function exists in the first place.  
According to you, the function will only work when playing, and it will return either **FMOD\_ERR\_INVALID\_HANDLE** or **FMOD\_ERR\_CHANNEL\_STOLEN** after stopped.

So you mean we can check if a specific sound stopped (either by itself or **FMOD\_Channel\_Stop()**) by getting a return value which is either **FMOD\_ERR\_INVALID\_HANDLE** or **FMOD\_ERR\_CHANNEL\_STOLEN**?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [February 17, 2021, 10:56pm UTC](https://qa.fmod.com/t/minor-silly-questions/16764/4 "2021-02-17T22:56:23Z")

</div>

Channel::isPlaying is slightly more accurate since there is a small window in time between when a sound stop playing naturally (at the end) and the Channel object is invalidated. The best approach when using Channel::isPlaying is to ignore any error codes returned and just rely on the isPlaying boolean returned. Even if there is an error isPlaying will be accurate.

---

<div class="post-metadata">

**Author:** ![jiyongman](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jiyongman](https://qa.fmod.com/u/jiyongman)\
**Post date:** [February 17, 2021, 11:41pm UTC](https://qa.fmod.com/t/minor-silly-questions/16764/5 "2021-02-17T23:41:28Z")

</div>

Great!

So you mean even after calling **FMOD\_Channel\_Stop(),** I can still rely on the boolean value of **FMOD\_Channel\_IsPlaying()** regardless of any error code returned by it?

Gosh, I was so worried if I had to modify all the logic in the past projects because I had been heavily relying on **FMOD\_Channel\_IsPlaying()** for everything.

I knew **FMOD\_Channel\_Stop()** does release all the resources, but I didn’t think much about the relationship with **FMOD\_Channel\_IsPlaying()** until recently.

Now I can confidently use the function.

Thank you!

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [February 17, 2021, 11:58pm UTC](https://qa.fmod.com/t/minor-silly-questions/16764/6 "2021-02-17T23:58:03Z")

</div>

Yes, that is safe. We set isplaying to false before we validate the channel handle, so even if it is invalid you can rely on isplaying.
