Rockbox Development > Starting Development and Compiling
Trying to use dsp_set_timestretch in plugin
(1/1)
sidnancy:
Hello, when I attempt to use rb->dsp_set_timestretch in a plugin, I get:
error: ‘const struct plugin_api’ has no member named ‘dsp_set_timestretch’
when trying to compile for the Emulator.
I was able to use timestretch in the emulator through the standard 'Now Playing' context menu, so I know the code works in general in the emulator.
Any suggestions?
Has anyone been able to get dsp_set_timestretch working in a plugin?
saratoga:
The plugin API probably doesn't export that function, although there is no reason it shouldn't. You can add it to the plugin_api struct in plugin.c/.h.
sidnancy:
It looks like it does export it.
Checking the API, I see that there is already this:
#ifdef HAVE_PITCHCONTROL
void (*dsp_set_timestretch)(int32_t percent);
#endif
in plugin.h and this:
#ifdef HAVE_PITCHCONTROL
dsp_set_timestretch,
#endif
in plugin.c
I've tried removing the ifdefs or defining HAVE_PITCHCONTROL as 1 or true and the whole plugin crashes with this error on startup:
SDL_WaitEvent() error
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 4 (X_DestroyWindow)
Resource id in failed request: 0x2023c
Serial number of failed request: 121
Current serial number in output stream: 121
On the target (ipod mini)
it dies at plugin start up with error message:
Undefined instruction a
bt pc: 0x000CF364, sp:
bt end
Any suggestions would be appreciated.
Navigation
[0] Message Index
Go to full version