# Channel events

**URL:** <https://qa.fmod.com/t/channel-events/13478>\
**Category:** FMOD Engine\
**Created:** [October 2, 2017, 8:58pm UTC](https://qa.fmod.com/t/channel-events/13478 "2017-10-02T20:58:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark81](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Mark81](https://qa.fmod.com/u/Mark81)\
**Post date:** [October 2, 2017, 8:58pm UTC](https://qa.fmod.com/t/channel-events/13478/1 "2017-10-02T20:58:25Z")

</div>

Hi! I’m sorry if my question was already asked but I cannot find anything in the past threads. I’m looking for events (callback) to know when the state of a channel change. Example:

- isPlaying changed
- getLoopCount changed
- …

I really don’t want to polling all that functions!

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [October 2, 2017, 10:20pm UTC](https://qa.fmod.com/t/channel-events/13478/2 "2017-10-02T22:20:34Z")

</div>

Hi Mark,

There aren’t any callbacks for those sort of state changes like those; you will need to query them periodically to check if they are changed.

There are some Studio Event callbacks that you can use to check various states:

[https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD\_STUDIO\_EVENT\_CALLBACK\_TYPE.html](https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_STUDIO_EVENT_CALLBACK_TYPE.html)

I hope this helped.

Thanks,  
Richard

---

<div class="post-metadata">

**Author:** ![Mark81](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@Mark81](https://qa.fmod.com/u/Mark81)\
**Post date:** [October 3, 2017, 7:27pm UTC](https://qa.fmod.com/t/channel-events/13478/3 "2017-10-03T19:27:09Z")

</div>

> [@](#):
>
> Hi Mark,
> 
> There aren’t any callbacks for those sort of state changes like those; you will need to query them periodically to check if they are changed.
> 
> There are some Studio Event callbacks that you can use to check various states:
> 
> [https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD\_STUDIO\_EVENT\_CALLBACK\_TYPE.html](https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_STUDIO_EVENT_CALLBACK_TYPE.html)
> 
> I hope this helped.
> 
> Thanks,  
> Richard

Thanks. In low-level API what is the right way to know if a sound has ended? I would check both isPlaying() == false && getPause() == false. Is it correct?

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [October 3, 2017, 10:06pm UTC](https://qa.fmod.com/t/channel-events/13478/4 "2017-10-03T22:06:16Z")

</div>

Hi Mark81,

If you’re using FMOD Studio events, you can use the FMOD\_STUDIO\_EVENT\_CALLBACK\_SOUND\_STOPPED callback from the FMOD\_STUDIO\_EVENT\_CALLBACK\_TYPE. If you’re using the low-level API (ie. FMOD::Sound) then you will need to use the two functions you listed.

Thanks,  
Richard
