Platforms to show: All Mac Windows Linux Cross-Platform
PortAudioStreamBufferedMBS class
Super class: PortAudioStreamBaseMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Audio | MBS Audio Plugin | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
Currently this class allows you to add 200 buffers to the internal playlist. The buffer size is not limited. FreeSpace returns you the number of buffers you have currently. Buffers are freed after they are played.
Subclass of the PortAudioStreamBaseMBS class.
- event Finished
- 4 properties
- property HadUnderflow as Boolean
- property NoUnderflow as Boolean
- property OutputPosition as Double
- property OutputPositionRelative as Double
- 13 methods
- method AddAudio(Data as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, BitSize as Integer=16, ClearBuffers as boolean=false) as boolean
- method 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
- method AddFloatAudio(FloatData as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, ClearBuffers as boolean=false) as boolean
- method AddFloatAudioStereo(FloatData1 as memoryblock, FloatData2 as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, ClearBuffers as boolean=false) as boolean
- method Constructor
- method FreeSpace as Integer
- method HasFreeSpace as boolean
- method OpenDefaultStream(numOutputChannels as Integer, sampleRate as Double) as Integer
- method OpenStream(outputParameters as PortAudioStreamParametersMBS, sampleRate as Double, framesPerBuffer as Integer, streamFlags as Integer) as Integer
- method PlayAudio(Data as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, BitSize as Integer=16, ClearBuffers as boolean=false) as boolean
- method 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
- method PlayFloatAudio(FloatData as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, ClearBuffers as boolean=false) as boolean
- method PlayFloatAudioStereo(FloatData1 as memoryblock, FloatData2 as memoryblock, offsetBytes as Integer=0, countBytes as Integer=0, ClearBuffers as boolean=false) as boolean
Super class PortAudioStreamBaseMBS
- 9 properties
- property CPULoad as Double
- property IsStreamActive as Integer
- property IsStreamStopped as Integer
- property MacCoreAudioStreamInputDevice as Integer
- property MacCoreAudioStreamOutputDevice as Integer
- property ReadAvailable as Integer
- property Time as Double
- property WriteAvailable as Integer
- property UseSafeThreading as boolean
- 14 methods
- method Abort as Integer
- method AsioSetStreamSampleRate(sampleRate as double) as integer
- method Close as Integer
- method Constructor Private
- method HostError as PortAudioHostErrorInfoMBS
- method Info as PortAudioStreamInfoMBS
- method Read(Buffer as Ptr, frameCount as integer) as integer
- method Start as Integer
- method Stop as Integer
- method WinMMEStreamInputHandle(index as Integer) as Ptr
- method WinMMEStreamInputHandleCount as integer
- method WinMMEStreamOutputHandle(index as Integer) as Ptr
- method WinMMEStreamOutputHandleCount as integer
- method Write(Buffer as Ptr, frameCount as integer) as integer
- 6 constants
Flags
Constant | Value | Description |
---|---|---|
kFlagsClipOff | 1 |
Disable default clipping of out of range samples. |
kFlagsDitherOff | 2 |
Disable default dithering. |
kFlagsNeverDropInput | 4 |
Flag 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. |
kFlagsNoFlag | 0 |
No flags. |
kFlagsPlatformSpecificFlags | &hFFFF0000 |
A mask specifying the platform specific bits. |
kFlagsPrimeOutputBuffersUsingStreamCallback | 8 |
Call 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. |
This class has no sub classes.
Some examples using this class:
- /Audio/PortAudio
- /Audio/PortAudio Record and Play
- /Audio/PortAudio Streaming Receiver
- /Tools/LTC/LTC Test
Blog Entries
- MBS Xojo Plugins, version 20.1pr4
- MBS Xojo Plugins, version 20.0pr8
- MBS Xojo / Real Studio Plugins, version 15.2pr4
Release notes
- Version 20.1
- Added explicit constructors for PortAudioStreamMBS and PortAudioStreamBufferedMBS class.
- Version 20.0
- Changed OpenStream for PortAudioStreamBufferedMBS class to always change format to Float32.
The items on this page are in the following plugins: MBS Audio Plugin.
PortAudioStreamBaseMBS - PortAudioStreamInfoMBS