Utility functions
Flext support classes » Buffer handling

Construct buffer. More...

## Topics

| Atom/list handling

## Detailed Description

Construct buffer.

Parameters

  s | symbol name, can be NULL
  delayed | = true: only sets name, needs another Set(NULL) to really initialize the buffer

Remarks
  As externals can be created prior to the buffer objects they are pointing to, initialization should be done at loadbang!

Check if the buffer is valid for use

Note
  This must be true to use any of the other functions except set

Check if buffer content is valid (not in state of content change)

Note
  buffer must be Ok()

Check and update if the buffer has been changed (e.g. resized)

Note
  buffer must be Ok()

Lock buffer

Returns
  previous state (needed for Unlock)

Note
  buffer must be Ok()

Unlock buffer

Parameters

  prv | Previous state is returned by Lock()

Note
  buffer must be Ok()

Set to specified buffer.

Parameters

  nameonly | if true sets name only, but doesn't look at buffer actually

Returns
  -1 on failure, 0 on success, 1 if parameters (length, data ptr, channels) have changed

Declare buffer content as dirty.

Parameters

  refr | if true forces immediate graphics refresh

Query whether the buffer content has been changed since the last ClearDirty()

Note
  With mainstream versions of PD this will always return true, since the dirtiness can't be judged

Get pointer to buffer, channel and frame count.

Remarks
  Channels are interleaved