Rockbox Development > Starting Development and Compiling
buffer_alloc in plugin app?
(1/1)
pablito:
Hi,
I'm writing some synth-like app for rockbox. I'm using static array for the sample memory at the moment, but I want to have the sample memory size of configurable size.
The docs say, that I should use the buffer_alloc before the playback starts, but if I use that function (from "buffer.h") then RB says that buffer_alloc is undefined symbol.
What could be wrong? Why is the symbol not present?
Currently I'm working with iRiver H3x0 simulator. RockBox 3.3.
cheers
p.f.
JdGordon:
you cant use buffer_alloc() once playback has been initialised... which means definetly not in plugins...
you have 2 options to get ram...
(going from memory so function names might be slightly off)...
get_plugin_buffer() and audio_steal_buffer().. the first gets the spare ram that was set aside for the plugin but not used (512KB on most targets, so minus the plugin size and a bit more...), the second stops playback and steals the ram it would use (anywhere from 1MB to 63~MB)
pablito:
Thanx,
as I see it now I'll stay with the static buffer maximized for particular target.
Cheers
Pavel
Navigation
[0] Message Index
Go to full version