Platforms to show: All Mac Windows Linux Cross-Platform
Back to PortAudioStreamBaseMBS class.
PortAudioStreamBaseMBS.Abort as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
PortAudioStreamBaseMBS.AsioSetStreamSampleRate(sampleRate as double) as integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
sampleRate: The new sample rate.
Note that this function may fail if the stream is alredy running and the ASIO driver does not support switching the sample rate of a running stream.
Returns kErrorIncompatibleStreamHostApi if stream is not a paASIO stream.
PortAudioStreamBaseMBS.Close as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
If the audio stream is active it discards any pending buffers as if Abort() had been called.
PortAudioStreamBaseMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 20.1 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
PortAudioStreamBaseMBS.HostError as PortAudioHostErrorInfoMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
This function is provided as a last resort, primarily to enhance debugging by providing clients with access to all available error information.
Returns an object constaining information about the host error. The values in this structure will only be valid if a PortAudio function has previously returned the paUnanticipatedHostError.
PortAudioStreamBaseMBS.Info as PortAudioStreamInfoMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
If the stream parameter invalid, or an error is encountered, the function returns nil.
PortAudioStreamBaseMBS.Read(Buffer as Ptr, frameCount as integer) as integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 20.1 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
The function doesn't return until the entire buffer has been filled - this may involve waiting for the operating system to supply the data.
buffer: A buffer of sample frames. The buffer contains samples in the format specified by the input.sampleFormat field used to open the stream, and the number of channels specified by input.numChannels. If non-interleaved samples were requested, buffer is a pointer to the first element of an array of non-interleaved buffer pointers, one for each channel.
frameCount: The number of frames to be read into buffer. This parameter is not constrained to a specific range, however high performance applications will want to match this parameter to the framesPerBuffer parameter used when opening the stream.
Returns on success PaNoError will be returned, or PaInputOverflowed (-9981) if input data was discarded by PortAudio after the previous call and before this call.
PortAudioStreamBaseMBS.Start as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
Returns an error code.
(0 for success, -1 for no stream)
PortAudioStreamBaseMBS.Stop as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
It waits until all pending audio buffers have been played before it returns.
PortAudioStreamBaseMBS.UseSafeThreading as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Audio | MBS Audio Plugin | 7.4 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
Xojo works normally only on one preemptive thread as the framework is not reentrant and not in general preemptive thread safe.
Still newer Xojo versions get better so you can switch it off and get a better performance.
For most usages you need to turn it off. See the examples. A lot of pragma lines are needed to disable everything which can slow down processing. Also you are limited in a preemptive thread to do only math and no object creating/deleting.
(Read and Write computed property)
PortAudioStreamBaseMBS.WinMMEStreamInputHandle(index as Integer) as Ptr
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
handleIndex: The zero based index of the wave in handle to retrieve. This should be in the range [0, WinMMEStreamInputHandleCount-1].
Returns a valid wave in handle, or nil if an error occurred.
PortAudioStreamBaseMBS.WinMMEStreamInputHandleCount as integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
Returns zero if the stream is output only.
A non-negative value indicating the number of wave in handles or, an error code (which are always negative) if PortAudio is not initialized or an error is encountered.
PortAudioStreamBaseMBS.WinMMEStreamOutputHandle(index as Integer) as Ptr
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
handleIndex: The zero based index of the wave out handle to retrieve.
This should be in the range [0, WinMMEStreamOutputHandleCount - 1].
Returns a valid wave out handle, or nil if an error occurred.
PortAudioStreamBaseMBS.WinMMEStreamOutputHandleCount as integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 20.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
Returns zero if the stream is input only.
A non-negative value indicating the number of wave out handles or, a PaErrorCode (which are always negative) if PortAudio is not initialized or an error is encountered.
PortAudioStreamBaseMBS.Write(Buffer as Ptr, frameCount as integer) as integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Audio | MBS Audio Plugin | 20.1 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
This function doesn't return until the entire buffer has been consumed - this may involve waiting for the operating system to consume the data.
buffer: A buffer of sample frames. The buffer contains samples in the format specified by the outputParameters.sampleFormat field used to open the stream, and the number of channels specified by outputParameters.numChannels. If non-interleaved samples were requested, buffer is a pointer to the first element of an array of non-interleaved buffer pointers, one for each channel.
frameCount: The number of frames to be written from buffer. This parameter is not constrained to a specific range, however high performance applications will want to match this parameter to the framesPerBuffer parameter used when opening the stream.
On success PaNoError (0) will be returned, or paOutputUnderflowed (-9980) if additional output data was inserted after the previous call and before this call.
The items on this page are in the following plugins: MBS Audio Plugin.