summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklib.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-07-12 05:23:52 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2019-07-28 15:17:48 +0200
commit45bd14b392622cb58e967a24e4652c510b3d43e4 (patch)
tree22bd2e5cafc2d82ecc4773f83de7f86515b4db43 /apps/plugins/lua/rocklib.c
parent4beafe16fafc2e5c59734ef065a6f8d23766520d (diff)
downloadrockbox-45bd14b392622cb58e967a24e4652c510b3d43e4.tar.gz
rockbox-45bd14b392622cb58e967a24e4652c510b3d43e4.zip
Lua Add Emergency Garbage Collector
Derivative of work by RobertGabrielJakabosky http://lua-users.org/wiki/EmergencyGarbageCollector I've only implemented the not enough memory part and expanded this idea to adding a mechanism to signal the OOM condition of the plugin buffer which allows us to only grab the playback buffer after garbage collection fails (SO THE MUSIC KEEPS PLAYING AS LONG AS POSSIBLE) Change-Id: I684fb98b540ffc01f7ba324ab5b761ceb59b9f9b
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r--apps/plugins/lua/rocklib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index d1ef3adaaf..c266516602 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -304,7 +304,7 @@ RB_WRAP(playlist)
304 break; 304 break;
305 } 305 }
306 306
307 rb->yield(); 307 yield();
308 lua_pushinteger(L, result); 308 lua_pushinteger(L, result);
309 return 1; 309 return 1;
310} 310}
@@ -382,7 +382,7 @@ RB_WRAP(audio)
382 return 1; 382 return 1;
383 } 383 }
384 384
385 rb->yield(); 385 yield();
386 lua_pushinteger(L, status); /* return previous (or current) audio status */ 386 lua_pushinteger(L, status); /* return previous (or current) audio status */
387 return 1; 387 return 1;
388} 388}
@@ -502,7 +502,7 @@ RB_WRAP(pcm)
502 break; 502 break;
503 } 503 }
504 504
505 rb->yield(); 505 yield();
506 return 1; 506 return 1;
507} 507}
508 508