Platforms to show: All Mac Windows Linux Cross-Platform

Back to PortAudioStreamBufferedMBS class.

PortAudioStreamBufferedMBS.AddAudio(Data as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, BitSize as Integer=16, ClearBuffers as boolean=false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Adds audio to the queue.

Data: a memoryblock with the sound data
offsetBytes: the number of the bytes to start playing (0=first)
countBytes: the number of bytes to play from offset. If countBytes is zero, the memoryblock's size property is used.

You need to set numOutputChannels to 1 or 2 when opening the stream. For 2 channels, sound data must be interleaved.

Values for bitsize:
7signed byte
8unsigned byte
15signed short
16unsigned short
24unsigned medium
31signed integer
32unsigned integer

This method copies the data to the internal queue. It returns directly.

If ClearBuffers is true, the buffer list will be cleared before this new data is added. This allows to have the next minute in the buffers and still do a change in the stream quick.

Returns true on success and false on failure (e.g. out of memory).

PortAudioStreamBufferedMBS.AddAudioStereo(Data1 as memoryblock, Data2 as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, BitSize as Integer=16, ClearBuffers as boolean=false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Adds audio to the queue.

This is a special version of AddAudio which takes samples from both memoryblocks and interleaves them.

Data1: a memoryblock with the sound data
Data2: a memoryblock with the sound data
offsetBytes: the number of the bytes to start playing (0=first)
countBytes: the number of bytes to play from offset. If countBytes is zero, the memoryblock's size property is used.

The stream must use 2 channels for this method to work correctly.

Values for bitsize:
7signed byte
8unsigned byte
15signed short
16unsigned short
24unsigned medium
31signed integer
32unsigned integer

This method copies the data to the internal queue. It returns directly.

If ClearBuffers is true, the buffer list will be cleared before this new data is added. This allows to have the next minute in the buffers and still do a change in the stream quick.

Returns true on success and false on failure (e.g. out of memory).

PortAudioStreamBufferedMBS.AddFloatAudio(FloatData as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, ClearBuffers as boolean=false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Adds audio to the queue.

FloatData: a memoryblock with the sound data filled with single values.
offsetBytes: the number of the bytes to start playing (0=first)
countBytes: the number of bytes to play from offset. If countBytes is zero, the memoryblock's size property is used.

You need to set numOutputChannels to 1 or 2 when opening the stream. For 2 channels, sound data must be interleaved.

The samples are stored in 32bit float values (memoryblock.SingleValue)

This method copies the data to the internal queue. It returns directly.

If ClearBuffers is true, the buffer list will be cleared before this new data is added. This allows to have the next minute in the buffers and still do a change in the stream quick.

Returns true on success and false on failure (e.g. out of memory).

PortAudioStreamBufferedMBS.AddFloatAudioStereo(FloatData1 as memoryblock, FloatData2 as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, ClearBuffers as boolean=false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Adds audio to the queue.

This is a special version of AddFloatAudio which takes samples from both memoryblocks and interleaves them.

FloatData1: a memoryblock with the sound data filled with single values.
FloatData2: a memoryblock with the sound data filled with single values.
offsetBytes: the number of the bytes to start playing (0=first)
countBytes: the number of bytes to play from offset. If countBytes is zero, the memoryblock's size property is used.

The samples are stored in 32bit float values (memoryblock.SingleValue)

This method copies the data to the internal queue. It returns directly.

The stream must use 2 channels for this method to work correctly.

If ClearBuffers is true, the buffer list will be cleared before this new data is added. This allows to have the next minute in the buffers and still do a change in the stream quick.

Returns true on success and false on failure (e.g. out of memory).

PortAudioStreamBufferedMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 20.1 ✅ Yes ✅ Yes ✅ Yes ❌ No All
The constructor.

PortAudioStreamBufferedMBS.FreeSpace as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Returns the number of buffer entries available in the queue.

The size of the buffers is not limited except your available memory.

PortAudioStreamBufferedMBS.HasFreeSpace as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Returns true if the internal sound buffer has free space.

Returns true if freespace returns a value greater than zero.

This function was named IsQueueEmpty in plugin version 7.4.

PortAudioStreamBufferedMBS.OpenDefaultStream(numOutputChannels as Integer, sampleRate as Double) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
A simplified version of OpenStream() that opens the default input and/or output devices.

Sampleformat is always 32bit float in this class. All data you add the queue is converted to float internally.

numOutputChannels: The number of channels of sound to be delivered to the stream callback or passed to Write. It can range from 1 to the value of maxOutputChannels in the PortAudioDeviceInfoMBS object for the default output device. If 0 the stream is opened as an output-only stream.

sampleRate: Same as OpenStream parameter of the same name.

Returns an error code.

PortAudioStreamBufferedMBS.OpenStream(outputParameters as PortAudioStreamParametersMBS, sampleRate as Double, framesPerBuffer as Integer, streamFlags as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Opens a stream for either input, output or both.

Sampleformat is always 32bit float in this class. All data you add the queue is converted to float internally.

outputParameters: A object that describes the output parameters used by the opened stream. See PortAudioStreamParametersMBS for a description of these parameters.

sampleRate: The desired sampleRate. For full-duplex streams it is the sample rate for both input and output

framesPerBuffer: The number of frames passed to the stream callback function, or the preferred block granularity for a blocking read/write stream. The special value paFramesPerBufferUnspecified (0) may be used to request that the stream callback will recieve an optimal (and possibly varying) number of frames based on host requirements and the requested latency settings.
Note: With some host APIs, the use of non-zero framesPerBuffer for a callback stream may introduce an additional layer of buffering which could introduce additional latency. PortAudio guarantees that the additional latency will be kept to the theoretical minimum however, it is strongly recommended that a non-zero framesPerBuffer value only be used when your algorithm requires a fixed number of frames per stream callback.

const paFramesPerBufferUnspecified=0

streamFlags: Flags which modify the behaviour of the streaming process. This parameter may contain a combination of flags ORed together. Some flags may only be relevant to certain buffer formats.

const paNoFlag= 0no flags
const paClipOff= 1Disable default clipping of out of range samples.
const paDitherOff= 2Flag requests that where possible a full duplex stream will not discard overflowed input samples without calling the stream callback. This flag is only valid for full duplex callback streams and only when used in combination with the paFramesPerBufferUnspecified (0) framesPerBuffer parameter. Using this flag incorrectly results in a paInvalidFlag error being returned from OpenStream and OpenDefaultStream.
const paNeverDropInput= 4Flag requests that where possible a full duplex stream will not discard overflowed input samples without calling the stream callback. This flag is only valid for full duplex callback streams and only when used in combination with the paFramesPerBufferUnspecified (0) framesPerBuffer parameter. Using this flag incorrectly results in a paInvalidFlag error being returned from OpenStream and OpenDefaultStream.
const paPrimeOutputBuffersUsingStreamCallback= 8Call the stream callback to fill initial output buffers, rather than the default behavior of priming the buffers with zeros (silence). This flag has no effect for input-only and blocking read/write streams.

Upon success OpenStream() returns paNoError and places a pointer to a valid PaStream in the stream argument. The stream is inactive (stopped).
If a call to OpenStream() fails, a non-zero error code is returned (see PaError for possible error codes) and the value of stream is invalid.

PortAudioStreamBufferedMBS.PlayAudio(Data as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, BitSize as Integer=16, ClearBuffers as boolean=false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Adds audio to the queue and starts playback.

Data: a memoryblock with the sound data
offsetBytes: the number of the bytes to start playing (0=first)
countBytes: the number of bytes to play from offset. If countBytes is zero, the memoryblock's size property is used.

You need to set numOutputChannels to 1 or 2 when opening the stream. For 2 channels, sound data must be interleaved.

Values for bitsize:
7signed byte
8unsigned byte
15signed short
16unsigned short
24unsigned medium
31signed integer
32unsigned integer

This method copies the data to the internal queue. It returns directly.

If ClearBuffers is true, the buffer list will be cleared before this new data is added. This allows to have the next minute in the buffers and still do a change in the stream quick.

PortAudioStreamBufferedMBS.PlayAudioStereo(Data1 as memoryblock, Data2 as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, BitSize as Integer=16, ClearBuffers as boolean=false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Adds audio to the queue and starts playback.

This is a special version of AddAudio which takes samples from both memoryblocks and interleaves them.

Data1: a memoryblock with the sound data
Data2: a memoryblock with the sound data
offsetBytes: the number of the bytes to start playing (0=first)
countBytes: the number of bytes to play from offset. If countBytes is zero, the memoryblock's size property is used.

The stream must use 2 channels for this method to work correctly.

Values for bitsize:
7signed byte
8unsigned byte
15signed short
16unsigned short
24unsigned medium
31signed integer
32unsigned integer

This method copies the data to the internal queue. It returns directly.

If ClearBuffers is true, the buffer list will be cleared before this new data is added. This allows to have the next minute in the buffers and still do a change in the stream quick.#

PortAudioStreamBufferedMBS.PlayFloatAudio(FloatData as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, ClearBuffers as boolean=false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Adds audio to the queue and starts playback.

FloatData: a memoryblock with the sound data filled with single values.
offsetBytes: the number of the bytes to start playing (0=first)
countBytes: the number of bytes to play from offset. If countBytes is zero, the memoryblock's size property is used.

You need to set numOutputChannels to 1 or 2 when opening the stream. For 2 channels, sound data must be interleaved.

The samples are stored in 32bit float values (memoryblock.SingleValue)

This method copies the data to the internal queue. It returns directly.

If ClearBuffers is true, the buffer list will be cleared before this new data is added. This allows to have the next minute in the buffers and still do a change in the stream quick.#

PortAudioStreamBufferedMBS.PlayFloatAudioStereo(FloatData1 as memoryblock, FloatData2 as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, ClearBuffers as boolean=false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Audio MBS Audio Plugin 7.4 ✅ Yes ✅ Yes ✅ Yes ❌ No All
Adds audio to the queue and starts playback.

This is a special version of AddFloatAudio which takes samples from both memoryblocks and interleaves them.

FloatData1: a memoryblock with the sound data filled with single values.
FloatData2: a memoryblock with the sound data filled with single values.
offsetBytes: the number of the bytes to start playing (0=first)
countBytes: the number of bytes to play from offset. If countBytes is zero, the memoryblock's size property is used.

The samples are stored in 32bit float values (memoryblock.SingleValue)

This method copies the data to the internal queue. It returns directly.

The stream must use 2 channels for this method to work correctly.

If ClearBuffers is true, the buffer list will be cleared before this new data is added. This allows to have the next minute in the buffers and still do a change in the stream quick.

The items on this page are in the following plugins: MBS Audio Plugin.


The biggest plugin in space...