The Be Book The Media Kit The Media Kit Index

BSmallBuffer

Derived from: BBuffer
Declared in:  be/media/Buffer.h
Library: libmedia.so
Allocation: Constructor only
Summary:  more...


The BSmallBuffer class provides small, efficient buffers for MIDI and other small packet-based media types.

To use BSmallBuffers, create a BSmallBuffer, then fill it with up to SmallBufferSizeLimit() bytes of data. Then call SendBuffer(). You can then immediately reuse the buffer.

How is this possible? BSmallBuffers don't go in buffer groups. The receiver immediately either processes the buffer (if it's time) or caches it until it's needed, then recycles the buffer.

If you're writing a node, and receive a buffer with the B_SMALL_BUFFER flag set, you must recycle the buffer in your BufferReceived() function.


Constructor


BSmallBuffer()

BSmallBuffer(void)

Constructor. Creates a small buffer that can hold up to SmallBufferSizeLimit() bytes.


Static Functions


SmallBufferSizeLimit()

size_t *SmallBufferSizeLimit(void)

Returns the maximum number of bytes a BSmallBuffer can contain.


The Be Book The Media Kit The Media Kit Index

The Be Book,
...in lovely HTML...
for BeOS Release 5.

Copyright © 2000 Be, Inc. All rights reserved..