Platforms to show: All Mac Windows Linux Cross-Platform
PortAudioMBS class
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| class | Audio | MBS Audio Plugin | 6.0 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | All |
Constants for error codes:
| Name | Value |
|---|---|
| paNoError | 0 |
| Plugin parameter error | -1 |
| paNotInitialized | -10000, |
| paUnanticipatedHostError | -9999 |
| paInvalidChannelCount | -9998 |
| paInvalidSampleRate | -9997 |
| paInvalidDevice | -9996 |
| paInvalidFlag | -9995 |
| paSampleFormatNotSupported | -9994 |
| paBadIODeviceCombination | -9993 |
| paInsufficientMemory | -9992 |
| paBufferTooBig | -9991 |
| paBufferTooSmall | -9990 |
| paNullCallback | -9989 |
| paBadStreamPtr | -9988 |
| paTimedOut | -9987 |
| paInternalError | -9986 |
| paDeviceUnavailable | -9985 |
| paIncompatibleHostApiSpecificStreamInfo | -9984 |
| paStreamIsStopped | -9983 |
| paStreamIsNotStopped | -9982 |
| paInputOverflowed | -9981 |
| paOutputUnderflowed | -9980 |
| paHostApiNotFound | -9979 |
| paInvalidHostApi | -9978 |
| paCanNotReadFromACallbackStream | -9977 |
| paCanNotWriteToACallbackStream | -9976 |
| paCanNotReadFromAnOutputOnlyStream | -9975 |
| paCanNotWriteToAnInputOnlyStream | -9974 |
| paIncompatibleStreamHostApi | -9973 |
| paBadBufferPtr | -9972 |
Initialization and Termination of the PortAudio library are done in background automatically.
Requires libasound.so.2 on Linux to be installed.
- 15 methods
- method CountDevices as Integer
- method DefaultHostApiIndexd as Integer
- method DefaultInputDeviceID as Integer
- method DefaultOutputDeviceID as Integer
- method DeviceInfo(DeviceIndex as Integer) as PortAudioDeviceInfoMBS
- method ErrorText(ErrorNumber as Integer) as string
- method GetSampleSize(Format as Integer) as Integer
- method HostApiCount as Integer
- method HostApiDeviceIndexToDeviceIndex(hostApiIndex as Integer, hostApiDeviceIndex as Integer) as Integer
- method HostApiInfo(hostApiIndex as Integer) as PortAudioHostApiInfoMBS
- method HostApiTypeIdToHostApiIndex(type as Integer) as Integer
- method HostError as PortAudioHostErrorInfoMBS
- method IsFormatSupported(input as PortAudioStreamParametersMBS, output as PortAudioStreamParametersMBS, sampleRate as Double) as Integer
- method SampleSize(theFormat as Integer) as Integer
- method Sleep(msec as Integer)
- 14 shared methods
- shared method ASIOGetAvailableBufferSizes(DeviceIndex as Integer, byref minBufferSizeFrames as Integer, byref maxBufferSizeFrames as Integer, byref preferredBufferSizeFrames as Integer, byref granularity as Integer) as Integer
- shared method ASIOGetInputChannelName(DeviceIndex as Integer, ChannelIndex as Integer) as String
- shared method ASIOGetOutputChannelName(DeviceIndex as Integer, ChannelIndex as Integer) as String
- shared method ASIOGetSampleRate(byref rate as double) as Integer
- shared method ASIOShowControlPanel(device as integer, parentWindow as DesktopWindow) as Integer
- shared method ASIOShowControlPanel(device as integer, parentWindow as window = nil) as Integer
- shared method DisableHostAPI(API as string) as boolean
- shared method MacCoreAudioChannelName(DeviceIndex as Integer, ChannelIndex as Integer, Input as Boolean) as String
- shared method MacCoreAudioGetBufferSizeRange(DeviceIndex as Integer, byref minBufferSizeFrames as Integer, byref maxBufferSizeFrames as Integer) as Integer
- shared method SetDebugLogFile(File as FolderItem) as boolean
- shared method Version as Integer
- shared method VersionControlRevision as String
- shared method VersionText as String
- shared method WinDefaultChannelMask(numChannels as Integer) as Integer
- 45 constants
Constants
| Constant | Value | Description |
|---|---|---|
| kNoDevice | -1 | The constant for no device. |
Errors
| Constant | Value | Description |
|---|---|---|
| kErrorBadBufferPtr | -9972 |
Bad buffer pointer. |
| kErrorBadIODeviceCombination | -9993 |
Bad IO Device combination |
| kErrorBadStreamPtr | -9988 |
Bad stream pointer |
| kErrorBufferTooBig | -9991 |
Buffer too big |
| kErrorBufferTooSmall | -9990 |
Buffer too small |
| kErrorCanNotReadFromACallbackStream | -9977 |
Can not read from a callback stream. |
| kErrorCanNotReadFromAnOutputOnlyStream | -9975 |
Can not read from an output only stream. |
| kErrorCanNotWriteToACallbackStream | -9976 |
Can not write to a callback stream. |
| kErrorCanNotWriteToAnInputOnlyStream | -9974 |
Can not write to an input only stream. |
| kErrorDeviceUnavailable | -9985 |
Device unavailable. |
| kErrorHostApiNotFound | -9979 |
Host API not found. |
| kErrorIncompatibleHostApiSpecificStreamInfo | -9984 |
Incompatible host api for specific stream info. |
| kErrorIncompatibleStreamHostApi | -9973 |
Incompatible stream for host api. |
| kErrorInputOverflowed | -9981 |
Input overflowed. |
| kErrorInsufficientMemory | -9992 |
Insufficient memory |
| kErrorInternalError | -9986 |
Internal error |
| kErrorInvalidChannelCount | -9998 |
Invalid Channel Count |
| kErrorInvalidDevice | -9996 |
Invalid Device |
| kErrorInvalidFlag | -9995 |
Invalid flag |
| kErrorInvalidHostApi | -9978 |
Invalid host API |
| kErrorInvalidSampleRate | -9997 |
Invalid sample rate |
| kErrorNoError | 0 |
No error |
| kErrorNotInitialized | -10000 |
Not initialized. |
| kErrorNullCallback | -9989 |
Null callback. |
| kErrorOutputUnderflowed | -9980 |
Output underflowed. |
| kErrorSampleFormatNotSupported | -9994 |
Sampleformat not supported. |
| kErrorStreamIsNotStopped | -9982 |
Stream is not stopped. |
| kErrorStreamIsStopped | -9983 |
Stream is stopped. |
| kErrorTimedOut | -9987 |
Timed out |
| kErrorUnanticipatedHostError | -9999 |
Unanticipated Host Error. See HostError function. |
Host APIs
| Constant | Value | Description |
|---|---|---|
| kHostApiAL | 9 |
AL |
| kHostApiALSA | 8 |
Linux ALSA |
| kHostApiASIO | 3 |
ASIO |
| kHostApiAudioScienceHPI | 14 |
AudioScienceHPI |
| kHostApiBeOS | 10 |
BeOS, not used in MBS Plugin. |
| kHostApiCoreAudio | 5 |
CoreAudio-specific PortAudio API extension |
| kHostApiDirectSound | 1 |
Windows DirectSound-specific PortAudio API extension |
| kHostApiInDevelopment | 0 |
Internally only. |
| kHostApiJACK | 12 |
Linux Jack |
| kHostApiMME | 2 |
Windos Multimedia Extension. |
| kHostApiOSS | 7 |
OSS |
| kHostApiSoundManager | 4 |
SoundManager (old MacOS Classic) |
| kHostApiWASAPI | 13 |
WASAPI-specific PortAudio API extension |
| kHostApiWDMKS | 11 |
WDM Kernel Streaming-specific PortAudio API extension |
This class has no sub classes.
Blog Entries
- New in the MBS Xojo Plugins 20.0
- MBS Xojo Plugins, version 19.2pr1
- MBS Real Studio Plugins, version 12.1pr2
Release notes
- Version 19.2
- Added ASIOGetSampleRate function for PortAudioMBS class.
Some examples using this class:
- /Audio/PortAudio
- /Audio/PortAudio Record and Play
- /Audio/PortAudio Streaming Receiver
- /Tools/LTC/Listen for TimeCode
- /Tools/LTC/LTC Test
Some related classes:
- class PortAudioDeviceInfoMBS
- class PortAudioHostApiInfoMBS
- class PortAudioHostErrorInfoMBS
- class PortAudioStreamParametersMBS
The items on this page are in the following plugins: MBS Audio Plugin.
PortAudioHostErrorInfoMBS - PortAudioStreamBaseMBS