summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-30 20:30:27 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-31 01:18:27 +0000
commitfe2d52cc7d0180acff26349f2904fba854de6fbc (patch)
tree62dbbe9a6e6ebc011e8e02f7428b8f620a83f698 /apps/plugins
parent2d85c7215169780168032617603e9e7b06d7ba25 (diff)
downloadrockbox-fe2d52cc7d0180acff26349f2904fba854de6fbc.tar.gz
rockbox-fe2d52cc7d0180acff26349f2904fba854de6fbc.zip
pcm: Get rid of pcm_play_pause() and associated APIs
Nothing in the core has used it for some time. It's exported to the plugin API but the last plugins to use it were switched to the mixer API back in 2011. This allows us to get rid of pcm_play_dma_pause() from all audio drivers Change-Id: Ic3fa02592316f84963e41d792d1cabb436d1ff6b
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/lua/include_lua/pcm.lua2
-rw-r--r--apps/plugins/lua/rocklib.c15
2 files changed, 4 insertions, 13 deletions
diff --git a/apps/plugins/lua/include_lua/pcm.lua b/apps/plugins/lua/include_lua/pcm.lua
index 6b2b6db204..46cc5b0720 100644
--- a/apps/plugins/lua/include_lua/pcm.lua
+++ b/apps/plugins/lua/include_lua/pcm.lua
@@ -26,11 +26,9 @@ if not rb.pcm then rb.splash(rb.HZ, "No Support!") return nil end
26 26
27rb.pcm_apply_settings = function() rb.pcm("apply_settings") end 27rb.pcm_apply_settings = function() rb.pcm("apply_settings") end
28rb.pcm_set_frequency = function(freq) rb.pcm("set_frequency", freq) end 28rb.pcm_set_frequency = function(freq) rb.pcm("set_frequency", freq) end
29rb.pcm_play_pause = function(bplay) rb.pcm("play_pause", bplay) end
30rb.pcm_play_stop = function() rb.pcm("play_stop") end 29rb.pcm_play_stop = function() rb.pcm("play_stop") end
31rb.pcm_play_lock = function() rb.pcm("play_lock") end 30rb.pcm_play_lock = function() rb.pcm("play_lock") end
32rb.pcm_play_unlock = function() rb.pcm("play_unlock") end 31rb.pcm_play_unlock = function() rb.pcm("play_unlock") end
33rb.pcm_is_playing = function() return rb.pcm("is_playing") end 32rb.pcm_is_playing = function() return rb.pcm("is_playing") end
34rb.pcm_is_paused = function() return rb.pcm("is_paused") end
35rb.pcm_calculate_peaks = function() return rb.pcm("calculate_peaks") end 33rb.pcm_calculate_peaks = function() return rb.pcm("calculate_peaks") end
36rb.pcm_get_bytes_waiting = function() return rb.pcm("get_bytes_waiting") end 34rb.pcm_get_bytes_waiting = function() return rb.pcm("get_bytes_waiting") end
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 8921c0a4c3..6219bb2e5a 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -519,12 +519,12 @@ RB_WRAP(sound)
519 519
520RB_WRAP(pcm) 520RB_WRAP(pcm)
521{ 521{
522 enum e_pcm {PCM_APPLYSETTINGS = 0, PCM_ISPLAYING, PCM_ISPAUSED, 522 enum e_pcm {PCM_APPLYSETTINGS = 0, PCM_ISPLAYING,
523 PCM_PLAYSTOP, PCM_PLAYPAUSE, PCM_PLAYLOCK, PCM_PLAYUNLOCK, 523 PCM_PLAYSTOP, PCM_PLAYLOCK, PCM_PLAYUNLOCK,
524 PCM_CALCULATEPEAKS, PCM_SETFREQUENCY, PCM_GETBYTESWAITING, PCM_ECOUNT}; 524 PCM_CALCULATEPEAKS, PCM_SETFREQUENCY, PCM_GETBYTESWAITING, PCM_ECOUNT};
525 525
526 const char *pcm_option[] = {"apply_settings", "is_playing", "is_paused", 526 const char *pcm_option[] = {"apply_settings", "is_playing",
527 "play_stop", "play_pause", "play_lock", "play_unlock", 527 "play_stop", "play_lock", "play_unlock",
528 "calculate_peaks", "set_frequency", "get_bytes_waiting", NULL}; 528 "calculate_peaks", "set_frequency", "get_bytes_waiting", NULL};
529 bool b_result; 529 bool b_result;
530 int left, right; 530 int left, right;
@@ -542,13 +542,6 @@ RB_WRAP(pcm)
542 b_result = rb->pcm_is_playing(); 542 b_result = rb->pcm_is_playing();
543 lua_pushboolean(L, b_result); 543 lua_pushboolean(L, b_result);
544 break; 544 break;
545 case PCM_ISPAUSED:
546 b_result = rb->pcm_is_paused();
547 lua_pushboolean(L, b_result);
548 break;
549 case PCM_PLAYPAUSE:
550 rb->pcm_play_pause(luaL_checkboolean(L, 2));
551 break;
552 case PCM_PLAYSTOP: 545 case PCM_PLAYSTOP:
553 rb->pcm_play_stop(); 546 rb->pcm_play_stop();
554 break; 547 break;