I solved it calling a method of the "userdata" object instead of emitting a signal so:

Qt Code:
  1. //! Executed when a sound finish playing
  2. FMOD_RESULT F_CALLBACK endCallback(FMOD_CHANNEL *channel, FMOD_CHANNEL_CALLBACKTYPE type,
  3. unsigned int commanddata1, unsigned int commanddata2)
  4. {
  5. (void)commanddata1; // Unused (to avoid warnings)
  6. (void)commanddata2; // Unused (to avoid warnings)
  7.  
  8. WaveWidget* wave;
  9.  
  10. switch(type)
  11. {
  12. case FMOD_CHANNEL_CALLBACKTYPE_END:
  13. {
  14. FMOD_RESULT result;
  15. FMOD::Channel *currentChannel = (FMOD::Channel *)channel;
  16.  
  17. void *ud = NULL;
  18. result = currentChannel->getUserData( &ud ); // Here I get the userdata
  19.  
  20. wave = (WaveWidget*)ud; // I cast it
  21. wave->stopTimer(); // Call userdata method
  22.  
  23. //emit AudioDevice::getInstance()->soundStopped(); //inform that sound is stopped
  24. break;
  25. }
  26. default:
  27. break;
  28. }
  29.  
  30. return FMOD_OK;
  31. }
To copy to clipboard, switch view to plain text mode 

Bye