<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox/apps/plugins/lua/rocklib.c, branch quake5</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>lua: wrap thread_set_priority with #ifdef HAVE_PRIORITY_SCHEDULING</title>
<updated>2019-07-28T18:56:59+00:00</updated>
<author>
<name>Franklin Wei</name>
<email>franklin@rockbox.org</email>
</author>
<published>2019-07-28T18:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=fd6ddf8735b527eced4954cea99ac06f32185752'/>
<id>fd6ddf8735b527eced4954cea99ac06f32185752</id>
<content type='text'>
Should fix a compile-time error on simulator.

Change-Id: I5962479579350ebffe6dcce4f65a629b108ff936
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Should fix a compile-time error on simulator.

Change-Id: I5962479579350ebffe6dcce4f65a629b108ff936
</pre>
</div>
</content>
</entry>
<entry>
<title>Lua Add Emergency Garbage Collector</title>
<updated>2019-07-28T13:17:48+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2019-07-12T10:23:52+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=45bd14b392622cb58e967a24e4652c510b3d43e4'/>
<id>45bd14b392622cb58e967a24e4652c510b3d43e4</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>lua remove unneeded plugin functions</title>
<updated>2019-07-28T12:29:10+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2019-07-28T12:26:20+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=ddf612c84b558bc3343d413c04cdddf59b23a2ed'/>
<id>ddf612c84b558bc3343d413c04cdddf59b23a2ed</id>
<content type='text'>
Change-Id: I04bc38d03b7f0ca65a815685eb6ab0f5ff825c45
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I04bc38d03b7f0ca65a815685eb6ab0f5ff825c45
</pre>
</div>
</content>
</entry>
<entry>
<title>lua add sound_current, consolidate sound_ functions</title>
<updated>2019-07-25T15:17:40+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2019-07-25T15:17:40+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=6e32e06498782f98db57bbb05baa6fc4ba3d76be'/>
<id>6e32e06498782f98db57bbb05baa6fc4ba3d76be</id>
<content type='text'>
add defines for sound functions
 SOUND_VOLUME, SOUND_BALANCE, SOUND_CHANNELS, SOUND_STEREO_WIDTH ...
 defines depend on target
 require "sound_defines" to add them to rb.sound_settings[]

consolidates:
 sound_set, sound_current, sound_default, sound_min, sound_max,
 sound_unit, sound_pitch, sound_val2phys to a single function

 rb.sound("name", setting, [value])

 require "sound.lua" for old functionality

Change-Id: Ice695218aa433f4fcbb48fbd6b8a9bf29c994110
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add defines for sound functions
 SOUND_VOLUME, SOUND_BALANCE, SOUND_CHANNELS, SOUND_STEREO_WIDTH ...
 defines depend on target
 require "sound_defines" to add them to rb.sound_settings[]

consolidates:
 sound_set, sound_current, sound_default, sound_min, sound_max,
 sound_unit, sound_pitch, sound_val2phys to a single function

 rb.sound("name", setting, [value])

 require "sound.lua" for old functionality

Change-Id: Ice695218aa433f4fcbb48fbd6b8a9bf29c994110
</pre>
</div>
</content>
</entry>
<entry>
<title>lua events from rockbox</title>
<updated>2019-07-20T01:48:34+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2019-06-27T16:28:34+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=3e2b50ed3b58daa5e3be5ea336d276b1655565f1'/>
<id>3e2b50ed3b58daa5e3be5ea336d276b1655565f1</id>
<content type='text'>
This library allows events to be subscribed / recieved within a lua script
most events in rb are synchronous so flags are set and later checked by a
secondary thread to make them (semi?) asynchronous.

There are a few caveats to be aware of:

FIRST, The main lua state is halted till the lua callback(s) are finished
 Yielding will not return control to your script from within a callback
 Also, subsequent callbacks may be delayed by the code in your lua callback
SECOND, You must store the value returned from the event_register function
 you might get away with it for a bit but gc will destroy your callback
 eventually if you do not store the event
THIRD, You only get one cb per event type
 ["action", "button", "custom", "playback", "timer"]
 (Re-registration of an event overwrites the previous one)

Usage:
 possible events =["action", "button", "custom", "playback", "timer"]

 local evX = rockev.register("event", cb_function, [timeout / flags])
  cb_function([id] [, data]) ... end

 rockev.suspend(["event"/nil][true/false]) passing nil affects all events
  stops event from executing, any but the last event before
  re-enabling will be lost, passing false, unregistering or re-registering
  an event will clear the suspend

 rockev.trigger("event", [true/false], [id])
  sets an event to triggered,
  NOTE!, CUSTOM_EVENT must be unset manually
  id is only passed to callback by custom and playback events

 rockev.unregister(evX)
  Use unregister(evX) to remove an event
  Unregistering is not necessary before script end, it will be
  cleaned up on script exit

Change-Id: Iea12a5cc0c0295b955dcc1cdf2eec835ca7e354d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This library allows events to be subscribed / recieved within a lua script
most events in rb are synchronous so flags are set and later checked by a
secondary thread to make them (semi?) asynchronous.

There are a few caveats to be aware of:

FIRST, The main lua state is halted till the lua callback(s) are finished
 Yielding will not return control to your script from within a callback
 Also, subsequent callbacks may be delayed by the code in your lua callback
SECOND, You must store the value returned from the event_register function
 you might get away with it for a bit but gc will destroy your callback
 eventually if you do not store the event
THIRD, You only get one cb per event type
 ["action", "button", "custom", "playback", "timer"]
 (Re-registration of an event overwrites the previous one)

Usage:
 possible events =["action", "button", "custom", "playback", "timer"]

 local evX = rockev.register("event", cb_function, [timeout / flags])
  cb_function([id] [, data]) ... end

 rockev.suspend(["event"/nil][true/false]) passing nil affects all events
  stops event from executing, any but the last event before
  re-enabling will be lost, passing false, unregistering or re-registering
  an event will clear the suspend

 rockev.trigger("event", [true/false], [id])
  sets an event to triggered,
  NOTE!, CUSTOM_EVENT must be unset manually
  id is only passed to callback by custom and playback events

 rockev.unregister(evX)
  Use unregister(evX) to remove an event
  Unregistering is not necessary before script end, it will be
  cleaned up on script exit

Change-Id: Iea12a5cc0c0295b955dcc1cdf2eec835ca7e354d
</pre>
</div>
</content>
</entry>
<entry>
<title>lua move constants out of binary image</title>
<updated>2019-07-18T13:42:00+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2019-07-18T13:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=c9aeb4284e6456b8ca846f2bdfcd8f68d6ecd7b8'/>
<id>c9aeb4284e6456b8ca846f2bdfcd8f68d6ecd7b8</id>
<content type='text'>
Rockbox constants are auto generated by a perl script like the majority
 of the plugin functions.

Constants are contained in rb_defines.lua, if the file exists it is auto loaded
 by the lua state for backwards compatibility

Frees ~1k

Change-Id: I237700576c748f468249e501c839d89effca3f39
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rockbox constants are auto generated by a perl script like the majority
 of the plugin functions.

Constants are contained in rb_defines.lua, if the file exists it is auto loaded
 by the lua state for backwards compatibility

Frees ~1k

Change-Id: I237700576c748f468249e501c839d89effca3f39
</pre>
</div>
</content>
</entry>
<entry>
<title>lua inbinary strings</title>
<updated>2019-07-10T22:31:41+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2018-11-11T23:27:19+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=c6fcb1cf45b249b059c2d53a062f9a6c7f449047'/>
<id>c6fcb1cf45b249b059c2d53a062f9a6c7f449047</id>
<content type='text'>
Allows saving of ram by reusing strings already stored in the binary
and storing a pointer instead of malloc and copy to get them inside
the lua state

Saves about 1.5K overall

Derivative of work by bogdanm
RAM optimizations: pseudo RO strings, functions in Flash
https://github.com/elua/elua/commit/d54659b5723bcd2b1e3900362398c72c18a9aa0b

Change-Id: I21d6dcfa32523877efd9f70fb0f88f2a02872649
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows saving of ram by reusing strings already stored in the binary
and storing a pointer instead of malloc and copy to get them inside
the lua state

Saves about 1.5K overall

Derivative of work by bogdanm
RAM optimizations: pseudo RO strings, functions in Flash
https://github.com/elua/elua/commit/d54659b5723bcd2b1e3900362398c72c18a9aa0b

Change-Id: I21d6dcfa32523877efd9f70fb0f88f2a02872649
</pre>
</div>
</content>
</entry>
<entry>
<title>lua add track length &amp; elapsed to rb.audio()</title>
<updated>2019-07-10T03:07:25+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2019-07-09T16:10:08+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=c0dbfc813092faece53015c0f86313d742f7815a'/>
<id>c0dbfc813092faece53015c0f86313d742f7815a</id>
<content type='text'>
track elapsed is needed to use fast-forward and rewind effectively
track length might as well be added too..

Change-Id: I906c92eb5260164c6177d8c0a8ff879b1fad7898
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
track elapsed is needed to use fast-forward and rewind effectively
track length might as well be added too..

Change-Id: I906c92eb5260164c6177d8c0a8ff879b1fad7898
</pre>
</div>
</content>
</entry>
<entry>
<title>Lua add read/write access to global_status, global_settings, audio_current_track</title>
<updated>2018-12-16T19:33:18+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2018-12-15T19:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=9d66b5459ecb9f85ffb194194abca5d46535774f'/>
<id>9d66b5459ecb9f85ffb194194abca5d46535774f</id>
<content type='text'>
moved items to rb.system
added read access to audio_current_track and audio_next_track

Change-Id: Ia055b8cb3848e540067818f596ffd1058da057fb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
moved items to rb.system
added read access to audio_current_track and audio_next_track

Change-Id: Ia055b8cb3848e540067818f596ffd1058da057fb
</pre>
</div>
</content>
</entry>
<entry>
<title>lua add LCD_DEFAULT_FG, fix 2-bit screen fg/bg inversion</title>
<updated>2018-11-24T21:40:23+00:00</updated>
<author>
<name>William Wilgus</name>
<email>me.theuser@yahoo.com</email>
</author>
<published>2018-11-24T21:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=9ed486bdc747b505a5b7b868c363dcff3e718a0d'/>
<id>9ed486bdc747b505a5b7b868c363dcff3e718a0d</id>
<content type='text'>
Change-Id: Ibe2bc6602ff27524a3b96d9523780acbfbf03c76
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ibe2bc6602ff27524a3b96d9523780acbfbf03c76
</pre>
</div>
</content>
</entry>
</feed>
