# Sound seems to be looping

**URL:** https://qa.fmod.com/t/sound-seems-to-be-looping/11430
**Category:** FMOD Studio
**Created:** [April 28, 2014, 6:23pm UTC](https://qa.fmod.com/t/sound-seems-to-be-looping/11430 "2014-04-28T18:23:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![SantiAKD](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@SantiAKD](https://qa.fmod.com/u/SantiAKD)
#### Post date: [April 28, 2014, 6:23pm UTC](https://qa.fmod.com/t/sound-seems-to-be-looping/11430/1 "2014-04-28T18:23:52Z")

</div>

Hi, im new in the fmod world.

im using fmod studio android version, with cocos2dx, this is my code

```auto
		void *extraDriverData = 0;
		ERRCHECK( FMOD::Studio::System::create(&system) );
		system->getLowLevelSystem(&lowLevelSystem);
		CCLOG("syst->init");
		ERRCHECK(system->initialize(32, FMOD_STUDIO_INIT_NORMAL, FMOD_INIT_NORMAL, extraDriverData));

		loadBanks("Weapons.bank");

		FMOD::Studio::ID explosionID = {0};
		CCLOG("lookupID");
		ERRCHECK( system->lookupID("event:/Explosions/Single Explosion", &explosionID) );

		FMOD::Studio::EventDescription* eventDescription = NULL;
		CCLOG("getEvent");
		ERRCHECK(system->getEvent(&explosionID, FMOD_STUDIO_LOAD_BEGIN_NOW, &eventDescription));

		ERRCHECK( eventDescription->loadSampleData() );
```

this is just the “init” function.

in my game loop i have the system-\>update()

and when i click in the screen im trying to play this sound

```auto
	FMOD::Studio::EventInstance* eventInstance = NULL;
	ERRCHECK( eventDescription->createInstance(&eventInstance) );
	ERRCHECK( eventInstance->start() );
	ERRCHECK( eventInstance->release() );
```

the main problem is: when i “play” the sound it starts, and seems to be looping playing and playing, and everything i hear is ascending noise…

im not sure what am i doing wrong, the bank is loading properly, the event instance seems to be ok since im being able to give it a -\>start, but im kinda lost on what im hearing.

any ideas ?

thanks in advance!

---

<div class="post-metadata">

### Author: ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)
#### Post date: [May 5, 2014, 7:40am UTC](https://qa.fmod.com/t/sound-seems-to-be-looping/11430/2 "2014-05-05T07:40:40Z")

</div>

Those messages are coming from FMOD Studio’s handle validation. In particular the “mgr” assert would only happen if certain bits of the handle referred to a system that didn’t exist. Most likely that is one of two things: Either the underlying Studio system was destroyed, or else the pointer is actually garbage and was never valid in the first place.

It won’t cause a crash, but it probably means something is logically wrong in the calling code. If you need additional help, I’d suggest contact FMOD support with a test case and we can identify what is happening.

---

<div class="post-metadata">

### Author: ![SantiAKD](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@SantiAKD](https://qa.fmod.com/u/SantiAKD)
#### Post date: [May 5, 2014, 1:59pm UTC](https://qa.fmod.com/t/sound-seems-to-be-looping/11430/3 "2014-05-05T13:59:07Z")

</div>

apparently i was updating the lowlevel system not the studio system, and that was my main problem, now everything is working ok, thanks 🙂

---

<div class="post-metadata">

### Author: ![Guest1](https://avatars.discourse-cdn.com/v4/letter/g/ecccb3/32.png) [@Guest1](https://qa.fmod.com/u/Guest1)
#### Post date: [April 29, 2014, 6:45am UTC](https://qa.fmod.com/t/sound-seems-to-be-looping/11430/4 "2014-04-29T06:45:44Z")

</div>

That code looks fine. That second section where you play the event, is that code getting executed repeatedly causing them to stack up? Also are you calling Studio::System::update regularly?

---

<div class="post-metadata">

### Author: ![SantiAKD](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@SantiAKD](https://qa.fmod.com/u/SantiAKD)
#### Post date: [April 30, 2014, 6:10pm UTC](https://qa.fmod.com/t/sound-seems-to-be-looping/11430/5 "2014-04-30T18:10:29Z")

</div>

Actually i was missing things on my .java file. After fixing that the banks worked good, thanks.

on the other hand, im having this msg on every tick (im calling system-\>update(); on every tick of my gameloop).

I/fmod (15212): FMOD: assert : assertion: ‘mgr’ failed  
I/fmod (15212): …/…/src/fmod\_weakhandle\_system.cpp(247) : FMOD error (33) : An invalid object handle was used.  
I/fmod (15212): FMOD: Debug\_OutputTrace : …/…/src/fmod\_weakhandle\_system.cpp(247) : FMOD error (33) : An invalid object handle was used.

so im trying to figure whats this and why it doesnt want to work.

any ideas ?
