Docs: Clarity on default values for

In the SDK, the function call for does not state what the buffersize defaults to if not specified.

The nearest thing to this is that in the description for playdate.sound.fileplayer:play(...) it mentions "creating and filling a 1/4 second playback buffer if a buffer size hasn’t been set yet". If this is in fact the default, it would be nice to have it stated in the description of new()... ie:

If given, buffersize specifies the size in seconds of the fileplayer’s data buffer, or else an 0.25 second buffer will be used.

This sounds like a good improvement. Thanks for the suggestion!

1 Like

This would apply to other functions where there's an optional argument for a value, where there is a default value used, namely:

  • (octave/persistence used if not specified)
  • (I assume the offset is 0?)
  • (doesn't say what omitting imageTable does)
  • (default easing function?)

(some others, possibly... I just searched the doc for ", [" :wink:

Most of the functions in the doc already have defaults in place... eg:, playdate.datastore.write() and the playdate.file functions, or the meaning is obvious in context ('flip', and 'tile' for example)

1 Like