diff options
author | Brandon Low <lostlogic@rockbox.org> | 2006-02-07 20:38:55 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2006-02-07 20:38:55 +0000 |
commit | 413da2a3d93d989d4474edad437ff67888487cb9 (patch) | |
tree | ecf938aa0aedc92db749be69e62648050f2fd712 /apps/plugin.c | |
parent | 566ce5f95163f8bbb7357dc7353bb132365f7b6e (diff) | |
download | rockbox-413da2a3d93d989d4474edad437ff67888487cb9.tar.gz rockbox-413da2a3d93d989d4474edad437ff67888487cb9.zip |
Rework PCM buffer
* Linked list instead of static array buffer pointers
* Variable sized chunks
* Improved mix handling
* Reduction in duplicated code
* Reduced IRAM usage w/o sacrificing performance
* Converted to almost entirely unsigned math
* Add pause function to reduce pcm_* exposure to playback.
This WILL break playback on the iPod until linuxstb makes a followup commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8612 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
-rw-r--r-- | apps/plugin.c | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 286c36cfb7..f5b33c65ce 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -124,6 +124,10 @@ static const struct plugin_api rockbox_api = { | |||
124 | lcd_bitmap_part, | 124 | lcd_bitmap_part, |
125 | lcd_bitmap, | 125 | lcd_bitmap, |
126 | #endif | 126 | #endif |
127 | #if LCD_DEPTH == 16 | ||
128 | lcd_bitmap_transparent_part, | ||
129 | lcd_bitmap_transparent, | ||
130 | #endif | ||
127 | lcd_putsxy, | 131 | lcd_putsxy, |
128 | lcd_puts_style, | 132 | lcd_puts_style, |
129 | lcd_puts_scroll_style, | 133 | lcd_puts_scroll_style, |
@@ -198,6 +202,7 @@ static const struct plugin_api rockbox_api = { | |||
198 | settings_parseline, | 202 | settings_parseline, |
199 | #ifndef SIMULATOR | 203 | #ifndef SIMULATOR |
200 | ata_sleep, | 204 | ata_sleep, |
205 | ata_disk_is_active, | ||
201 | #endif | 206 | #endif |
202 | 207 | ||
203 | /* dir */ | 208 | /* dir */ |
@@ -225,6 +230,17 @@ static const struct plugin_api rockbox_api = { | |||
225 | timer_unregister, | 230 | timer_unregister, |
226 | timer_set_period, | 231 | timer_set_period, |
227 | #endif | 232 | #endif |
233 | queue_init, | ||
234 | queue_delete, | ||
235 | queue_post, | ||
236 | queue_wait_w_tmo, | ||
237 | usb_acknowledge, | ||
238 | #ifdef RB_PROFILE | ||
239 | profile_thread, | ||
240 | profstop, | ||
241 | profile_func_enter, | ||
242 | profile_func_exit, | ||
243 | #endif | ||
228 | 244 | ||
229 | /* strings and memory */ | 245 | /* strings and memory */ |
230 | snprintf, | 246 | snprintf, |
@@ -238,6 +254,7 @@ static const struct plugin_api rockbox_api = { | |||
238 | strncasecmp, | 254 | strncasecmp, |
239 | memset, | 255 | memset, |
240 | memcpy, | 256 | memcpy, |
257 | memmove, | ||
241 | _ctype_, | 258 | _ctype_, |
242 | atoi, | 259 | atoi, |
243 | strchr, | 260 | strchr, |
@@ -332,6 +349,23 @@ static const struct plugin_api rockbox_api = { | |||
332 | menu_insert, | 349 | menu_insert, |
333 | menu_set_cursor, | 350 | menu_set_cursor, |
334 | 351 | ||
352 | /* power */ | ||
353 | battery_level, | ||
354 | battery_level_safe, | ||
355 | battery_time, | ||
356 | #ifndef SIMULATOR | ||
357 | battery_voltage, | ||
358 | #endif | ||
359 | #ifdef HAVE_CHARGING | ||
360 | charger_inserted, | ||
361 | # ifdef HAVE_CHARGE_STATE | ||
362 | charging_state, | ||
363 | # endif | ||
364 | #endif | ||
365 | #ifdef HAVE_USB_POWER | ||
366 | usb_powered, | ||
367 | #endif | ||
368 | |||
335 | /* misc */ | 369 | /* misc */ |
336 | srand, | 370 | srand, |
337 | rand, | 371 | rand, |
@@ -353,8 +387,6 @@ static const struct plugin_api rockbox_api = { | |||
353 | count_mp3_frames, | 387 | count_mp3_frames, |
354 | create_xing_header, | 388 | create_xing_header, |
355 | find_next_frame, | 389 | find_next_frame, |
356 | battery_level, | ||
357 | battery_level_safe, | ||
358 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 390 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
359 | peak_meter_scale_value, | 391 | peak_meter_scale_value, |
360 | peak_meter_set_use_dbfs, | 392 | peak_meter_set_use_dbfs, |
@@ -368,37 +400,7 @@ static const struct plugin_api rockbox_api = { | |||
368 | 400 | ||
369 | /* new stuff at the end, sort into place next time | 401 | /* new stuff at the end, sort into place next time |
370 | the API gets incompatible */ | 402 | the API gets incompatible */ |
371 | #ifdef RB_PROFILE | 403 | |
372 | profile_thread, | ||
373 | profstop, | ||
374 | profile_func_enter, | ||
375 | profile_func_exit, | ||
376 | #endif | ||
377 | battery_time, | ||
378 | #ifndef SIMULATOR | ||
379 | ata_disk_is_active, | ||
380 | battery_voltage, | ||
381 | #endif | ||
382 | queue_init, | ||
383 | queue_delete, | ||
384 | queue_post, | ||
385 | queue_wait_w_tmo, | ||
386 | usb_acknowledge, | ||
387 | #if LCD_DEPTH == 16 | ||
388 | lcd_bitmap_transparent_part, | ||
389 | lcd_bitmap_transparent, | ||
390 | #endif | ||
391 | memmove, | ||
392 | #ifdef HAVE_CHARGING | ||
393 | charger_inserted, | ||
394 | # ifdef HAVE_CHARGE_STATE | ||
395 | charging_state, | ||
396 | # endif | ||
397 | #endif | ||
398 | #ifdef HAVE_USB_POWER | ||
399 | usb_powered, | ||
400 | #endif | ||
401 | |||
402 | }; | 404 | }; |
403 | 405 | ||
404 | int plugin_load(const char* plugin, void* parameter) | 406 | int plugin_load(const char* plugin, void* parameter) |