Rockbox

Tasklist

FS#10608 - Patch exposing pcmbuf_beep() to the Lua plugin

Attached to Project: Rockbox
Opened by Christophe Gragnic (Grahack) - Tuesday, 15 September 2009, 16:30 GMT
Last edited by Maurus Cuelenaere (mcuelenaere) - Thursday, 29 October 2009, 16:52 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch adds pcmbuf_beep() (found in pcmbuf.c) to the plugin API and exposes it to the Lua plugin.

Applies to r22699.

issue #1: pcmbuf_beep doesn't beep when the music is paused because of a limitation of the playback system (http://www.rockbox.org/irc/log-20090915#17:55:56).

issue #2: rb.beep(freq, duration, amplitude) crashes for duration > 3000 so maybe I should try to test the user params (I guess it's target/buffer/RAM dependant).
This task depends upon

Closed by  Maurus Cuelenaere (mcuelenaere)
Thursday, 29 October 2009, 16:52 GMT
Reason for closing:  Accepted
Additional comments about closing:  In r23404.
Comment by Maurus Cuelenaere (mcuelenaere) - Wednesday, 28 October 2009, 21:52 GMT
I'm not sure about naming the function "beep" in Lua, atm I have been trying to stay as close as possible to the original C API which includes naming functions the same in Lua as in C.

I suppose you don't mind me committing this with the function renamed to pcmbuf_beep()?

Also you need to increase PLUGIN_API_VERSION with 1 (not PLUGIN_MIN_API_VERSION).
Comment by Christophe Gragnic (Grahack) - Thursday, 29 October 2009, 07:52 GMT
I don't mind renaming beep() to pcmbuf_beep(), I just found this a bit ugly.
Anyway a shortcut can easily be made in the Lua scripts (beep = pcmbuf_beep) for the lazy ones.
I'll try to provide a new patch in 24h for the API_VERSION thing, but feel free to not wait too.
Thanks

Loading...