Hi to all,
I' writing an audio editor using fmod and Qt.
Hi have a fmod callback that's called by the fmod engine when a sound is stopped to play and from it I would emit a signal.
Here the callback that's part of a class:

Qt Code:
  1. class AudioDevice : public QObject
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. static FMOD_RESULT F_CALLBACK endCallback(FMOD_CHANNEL *channel, FMOD_CHANNEL_CALLBACKTYPE type,
  7. unsigned int commanddata1, unsigned int commanddata2)
  8. {
  9. (void)commanddata1; // Unused (to avoid warnings)
  10. (void)commanddata2; // Unused (to avoid warnings)
  11.  
  12. SoundData* currentSound;
  13.  
  14. switch(type)
  15. {
  16. case FMOD_CHANNEL_CALLBACKTYPE_END:
  17. {
  18. FMOD_RESULT result;
  19. FMOD::Channel *currentChannel = (FMOD::Channel *)channel;
  20.  
  21. void *ud = NULL;
  22. result = currentChannel->getUserData( &ud );
  23.  
  24. currentSound = (SoundData*)ud;
  25.  
  26. /* inform that sound stopped */
  27. emit( soundStopped() );// <------- THIS ONE
  28. break;
  29. }
  30. default:
  31. break;
  32. }
  33.  
  34. return FMOD_OK;
  35. }
  36. public slots:
  37. // Initialize the audio system
  38. bool init();
  39.  
  40. signals:
  41. void soundStopped();
  42. ..more code...
To copy to clipboard, switch view to plain text mode 


The compiler don't like the emit call.
It says
error C2352: 'AudioDevice::soundStopped' : illegal call of non-static member function
How can I do?

Best