# FMOD\_Channel\_SetDelay link error \[ANDROID\]

**URL:** <https://qa.fmod.com/t/fmod-channel-setdelay-link-error-android/11340>\
**Category:** FMOD Studio\
**Created:** [March 17, 2014, 8:01pm UTC](https://qa.fmod.com/t/fmod-channel-setdelay-link-error-android/11340 "2014-03-17T20:01:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardl](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@richardl](https://qa.fmod.com/u/richardl)\
**Post date:** [March 17, 2014, 8:01pm UTC](https://qa.fmod.com/t/fmod-channel-setdelay-link-error-android/11340/1 "2014-03-17T20:01:55Z")

</div>

I seem to be getting a linker problem with FMOD\_Channel\_SetDelay.

> [@](#):
>
> …/Hulahoop/SoundEngine/jni/FMOD\_driver.cpp:222: error: undefined reference to ‘FMOD\_Channel\_SetDelay’  
> collect2: ld returned 1 exit status

FMOD\_Channel\_GetDelay seems to link fine.

(The calls to FMOD\_Channel\_SetDelay are inside extern “C” but within a .cpp file. All the other FMOD C-API calls compile and link fine.)

Am I missing something?

I’ve tried the 1.03.00 and 1.02.12 builds of FMOD Studio for Android with Android NDK r9c and Android SDK 19.0.1

* * *

Also FMOD\_Channel\_SetDelay has changed its syntax significantly between FMOD Studio 5 and FMOD Ex 4. Under FMOD 4 I was using FMOD\_DELAYTYPE\_DSPCLOCK\_START and FMOD\_DELAYTYPE\_DSPCLOCK\_END.

The new API has no delay type. Only dspclock\_start and dspclock\_end and a stopped flag. If I want to specify a start time for a channel, but not an end time I assume I set a value of 0 to dspclock\_end.

```auto
   FMOD_Channel_SetDelay( pFmodChannel, (unsigned long long)dspClocktime, 0ull, false );
```

If I want to specify an end time for an already playing sound I assume I set a value of 0 to dsp\_starttime.

```auto
   FMOD_Channel_SetDelay( pFmodChannel, 0ull, (unsigned long long)dspClocktime, true );
```

---

<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:** [March 20, 2014, 2:58am UTC](https://qa.fmod.com/t/fmod-channel-setdelay-link-error-android/11340/2 "2014-03-20T02:58:43Z")

</div>

Thanks for the bug report, we have fixed up a couple of C linking issues for our next release.  
We have also put checks in to ensure this doesn’t happen again.

Your assumptions about setting 0 for either the start or end delay to mean (no delay) is correct.  
I will amend the documentation to make that clear.

---

<div class="post-metadata">

**Author:** ![richardl](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@richardl](https://qa.fmod.com/u/richardl)\
**Post date:** [March 20, 2014, 5:09am UTC](https://qa.fmod.com/t/fmod-channel-setdelay-link-error-android/11340/3 "2014-03-20T05:09:05Z")

</div>

Thanks.
