I'm trying to use the audio library BASS in my application. I'm trying to use a method which triggers a callback when it detects a beat in the music.
This is my current code:
void* (^myBlock)(DWORD, double, void *) = ^(DWORD handle, double time, void *user) {
return nil;
};
BASS_FX_BPM_BeatDecodeGet(bpmStream, 0.0, playBackDuration, BASS_FX_BPM_BKGRND, myBlock,NULL);
The callback is defined in the header file as:
typedef void (CALLBACK BPMBEATPROC)(DWORD chan, double beatpos, void *user);
The error message is:
Passing 'void *(^)(DWORD, double, void *)' to parameter of incompatible type 'BPMBEATPROC *' (aka 'void (*)(DWORD, double, void *)')
I'm pretty sure the block only needs a small modification, but I'm not familiar with Objective-C.