# Correct way to call getFadePoints

**URL:** <https://qa.fmod.com/t/correct-way-to-call-getfadepoints/19361>\
**Category:** FMOD Engine\
**Tags:** cpp\
**Created:** [October 4, 2022, 11:45am UTC](https://qa.fmod.com/t/correct-way-to-call-getfadepoints/19361 "2022-10-04T11:45:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joshechoes](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joshechoes/32/558_2.png) [@joshechoes](https://qa.fmod.com/u/joshechoes)\
**Post date:** [October 4, 2022, 11:45am UTC](https://qa.fmod.com/t/correct-way-to-call-getfadepoints/19361/1 "2022-10-04T11:45:28Z")

</div>

What is the correct way to call `getFadePoints`?

```auto
unsigned int numpoints;
unsigned long long *point_dspclock;
float *point_volume;
result = channel->getFadePoints(&numpoints, point_dspclock, point_volume);

```

I’m doing this, but get a crash. I’d ideally like to check the dspclocks and volumes.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![joshechoes](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joshechoes/32/558_2.png) [@joshechoes](https://qa.fmod.com/u/joshechoes)\
**Post date:** [October 7, 2022, 1:40pm UTC](https://qa.fmod.com/t/correct-way-to-call-getfadepoints/19361/2 "2022-10-07T13:40:43Z")

</div>

I eventually worked this out. You have to call `getFadePoints` twice with different arguments:

1st time will `nullptr` args for the volumes/fade points:

```auto
unsigned int numpoints;
result = channel->getFadePoints(&numpoints, nullptr, nullptr);

```

then you pass an integer corresponding to the point number to `getFadePoints`

```auto
for (int i = 0; i < numpoints; i++) {
    unsigned int num_point = static_cast<unsigned int>(i);
    unsigned long long point_dspclock;
    float point_volume;
    result = channel->getFadePoints(&num_point, &point_dspclock, &point_volume);
}

```

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [October 10, 2022, 4:12am UTC](https://qa.fmod.com/t/correct-way-to-call-getfadepoints/19361/3 "2022-10-10T04:12:34Z")

</div>

Hi,

Apologies for not getting back to you, but thank you for sharing the solution!
