summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklib.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-10-31 09:23:00 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2018-10-31 09:23:00 -0400
commitbbfe4778114c76e23e9c391225da2d6f74812735 (patch)
tree880218b3cc344e6345b192a5e9f514a93257db2a /apps/plugins/lua/rocklib.c
parent74fe5203d06aee3ad3498fa9164762cfa1efa3d5 (diff)
downloadrockbox-bbfe4778114c76e23e9c391225da2d6f74812735.tar.gz
rockbox-bbfe4778114c76e23e9c391225da2d6f74812735.zip
Lua Add underscores in audio, pcm, playlist functions
Lessen confusion for end users looking for the underlying function names in plugin.h Change-Id: I6662dc7bd9f22d83af372b3d3c5af53d9a1eac9a
Diffstat (limited to 'apps/plugins/lua/rocklib.c')
-rw-r--r--apps/plugins/lua/rocklib.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index ed76122118..54c2bc0c03 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -197,9 +197,9 @@ RB_WRAP(playlist)
197 PLAYL_SHUFFLE, PLAYL_SYNC, PLAYL_REMOVEALLTRACKS, 197 PLAYL_SHUFFLE, PLAYL_SYNC, PLAYL_REMOVEALLTRACKS,
198 PLAYL_INSERTTRACK, PLAYL_INSERTDIRECTORY, PLAYL_ECOUNT}; 198 PLAYL_INSERTTRACK, PLAYL_INSERTDIRECTORY, PLAYL_ECOUNT};
199 199
200 const char *playlist_option[] = {"amount", "add", "create", "start", "resumetrack", 200 const char *playlist_option[] = {"amount", "add", "create", "start", "resume_track",
201 "resume", "shuffle", "sync", "removealltracks", 201 "resume", "shuffle", "sync", "remove_all_tracks",
202 "inserttrack", "insertdirectory", NULL}; 202 "insert_track", "insert_directory", NULL};
203 203
204 const char *filename, *dir; 204 const char *filename, *dir;
205 int result = 0; 205 int result = 0;
@@ -210,7 +210,6 @@ RB_WRAP(playlist)
210 int option = luaL_checkoption (L, 1, NULL, playlist_option); 210 int option = luaL_checkoption (L, 1, NULL, playlist_option);
211 switch(option) 211 switch(option)
212 { 212 {
213 default:
214 case PLAYL_AMOUNT: 213 case PLAYL_AMOUNT:
215 result = rb->playlist_amount(); 214 result = rb->playlist_amount();
216 break; 215 break;
@@ -277,15 +276,14 @@ RB_WRAP(audio)
277 AUDIO_RESUME, AUDIO_NEXT, AUDIO_PREV, AUDIO_FFREWIND, 276 AUDIO_RESUME, AUDIO_NEXT, AUDIO_PREV, AUDIO_FFREWIND,
278 AUDIO_FLUSHANDRELOADTRACKS, AUDIO_GETPOS, AUDIO_ECOUNT}; 277 AUDIO_FLUSHANDRELOADTRACKS, AUDIO_GETPOS, AUDIO_ECOUNT};
279 const char *audio_option[] = {"status", "play", "stop", "pause", 278 const char *audio_option[] = {"status", "play", "stop", "pause",
280 "resume", "next", "prev", "ffrewind", 279 "resume", "next", "prev", "ff_rewind",
281 "flushandreloadtracks", "getfilepos", NULL}; 280 "flush_and_reload_tracks", "get_file_pos", NULL};
282 long elapsed, offset, newtime; 281 long elapsed, offset, newtime;
283 int status = rb->audio_status(); 282 int status = rb->audio_status();
284 283
285 int option = luaL_checkoption (L, 1, NULL, audio_option); 284 int option = luaL_checkoption (L, 1, NULL, audio_option);
286 switch(option) 285 switch(option)
287 { 286 {
288 default:
289 case AUDIO_STATUS: 287 case AUDIO_STATUS:
290 break; 288 break;
291 case AUDIO_PLAY: 289 case AUDIO_PLAY:
@@ -341,9 +339,9 @@ RB_WRAP(pcm)
341 PCM_PLAYSTOP, PCM_PLAYPAUSE, PCM_PLAYLOCK, PCM_PLAYUNLOCK, 339 PCM_PLAYSTOP, PCM_PLAYPAUSE, PCM_PLAYLOCK, PCM_PLAYUNLOCK,
342 PCM_CALCULATEPEAKS, PCM_SETFREQUENCY, PCM_GETBYTESWAITING, PCM_ECOUNT}; 340 PCM_CALCULATEPEAKS, PCM_SETFREQUENCY, PCM_GETBYTESWAITING, PCM_ECOUNT};
343 341
344 const char *pcm_option[] = {"applysettings", "isplaying", "ispaused", 342 const char *pcm_option[] = {"apply_settings", "is_playing", "is_paused",
345 "playstop", "playpause", "playlock", "playunlock", 343 "play_stop", "play_pause", "play_lock", "play_unlock",
346 "calculatepeaks", "setfrequency", "getbyteswaiting", NULL}; 344 "calculate_peaks", "set_frequency", "get_bytes_waiting", NULL};
347 bool b_result; 345 bool b_result;
348 int left, right; 346 int left, right;
349 size_t byteswait; 347 size_t byteswait;
@@ -353,7 +351,6 @@ RB_WRAP(pcm)
353 int option = luaL_checkoption (L, 1, NULL, pcm_option); 351 int option = luaL_checkoption (L, 1, NULL, pcm_option);
354 switch(option) 352 switch(option)
355 { 353 {
356 default:
357 case PCM_APPLYSETTINGS: 354 case PCM_APPLYSETTINGS:
358 rb->pcm_apply_settings(); 355 rb->pcm_apply_settings();
359 break; 356 break;