Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.3
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Grahack - 2009-09-15
Last edited by mcuelenaere - 2009-10-29

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

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).

Closed by  mcuelenaere
2009-10-29 16:52
Reason for closing:  Accepted
Additional comments about closing:  

In r23404.

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).

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...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing