MBS Plugin Documentation

Search:

Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchie

New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0

The list of the   themes,   classes,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

CoreAudioPlayerMBS.AddAudio(Data as memoryblock, offsetBytes as integer=0, countBytes as integer=0, BitSize as integer=16, ClearBuffers as boolean=false) as boolean
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Adds integer audio.
Notes:
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.

You need to set NumberOfChannels before calling this method.
NumberOfChannels can be 1 or 2. 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 only copies the data to the internal queue. It returns directly.
If ClearBuffers is true the buffer list is cleared before this new data is added.
CoreAudioPlayerMBS.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, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Adds integer audio.
Notes:
This is a special version of PlayAudio 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.

You need to set NumberOfChannels before calling this method.
NumberOfChannels must be 2 for this method.

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

This method only copies the data to the internal queue. It returns directly.
If ClearBuffers is true the buffer list is cleared before this new data is added.
CoreAudioPlayerMBS.AddFloatAudio(FloatData as memoryblock, offsetBytes as integer=0, countBytes as integer=0, ClearBuffers as boolean=false) as boolean
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Adds float audio.
Notes:
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.

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

You need to set NumberOfChannels before calling this method.
NumberOfChannels can be 1 or 2. For 2 channels, sound data must be interleaved.

This method only copies the data to the internal queue. It returns directly.
If ClearBuffers is true the buffer list is cleared before this new data is added.
CoreAudioPlayerMBS.AddFloatAudioStereo(FloatData1 as memoryblock, FloatData2 as memoryblock, offsetBytes as integer=0, countBytes as integer=0, ClearBuffers as boolean=false) as boolean
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Adds float audio.
Notes:
This is a special version of PlayFloatAudio 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.

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

You need to set NumberOfChannels before calling this method.
NumberOfChannels must be 2 for this method.

This method only copies the data to the internal queue. It returns directly.
If ClearBuffers is true the buffer list is cleared before this new data is added.
class CoreAudioPlayerMBS
class, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 4.0, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: A class to play sounds from a memoryblock using CoreAudio.
Notes:
This class uses an internal buffer of around 100000 samples which when played with a samplerate of 8000 will play for 10 seconds.
The music stops playing after this object is destroyed.
Mac OS X is required.
CoreAudioPlayerMBS.Close
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 5.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The destructor.
Notes:
There is no need to call this method except you want to free all resources of this object now without waiting for Realbasic to do it for you.
(e.g. some Realbasic versions crash on Windows if there are plugin objects not closed.)
CoreAudioPlayerMBS.FreeSpace as integer
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns the number of buffer entries available in the queue.
Notes: The size of the buffers is not limited except your available memory.
CoreAudioPlayerMBS.HadUnderflow as Boolean
property, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: A flag set if a data underflow was found while NoUnderflow is true.
Notes:
You may want to set this to false after your application recovered from a data underflow.
(Read and Write property)
CoreAudioPlayerMBS.HardwareNumberOfChannels as integer
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 4.3, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns the actual number of channels in the default device; to set the number of channels being output, use numberOfChannels.
Notes:
This class can only play stereo to 2 channel devices or mono to all channels.
Returns 0 on any error.
CoreAudioPlayerMBS.HardwareSampleRate as single
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 4.3, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The hardware sample rate.
Notes: Today this is normally 44100 Hz. Or 0 on any error.
CoreAudioPlayerMBS.HasFreeSpace as boolean
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 4.0, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Returns true if the internal sound buffer is not full.
Notes:
Returns true if freespace returns a value greater than zero.

This function was named IsQueueEmpty in plugin version 7.4.
CoreAudioPlayerMBS.IsRunning as Boolean
property, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 4.3, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Whether the class is playing something.
Notes:
Returns true while playing.
(Read only property)
CoreAudioPlayerMBS.NoUnderflow as Boolean
property, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.5, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Whether underflows should be prevented.
Notes:
If no audio data is there and NoUnderflow=true, the flag HadUnderflow is set to true and 0 values (Silence) is played.

Switching from sound to no sound and back may add some noise.
(Read and Write property)
CoreAudioPlayerMBS.NumberOfChannels as Integer
property, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 4.3, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The number of output channels.
Notes:
Currently only 1 (default) and 2 are supported.
(Read and Write property)
CoreAudioPlayerMBS.OutputDeviceID as Integer
property, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 5.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The output device to use.
Notes:
0 for the default output device.
If you set this property to a bad value you risk a crash.
(Read and Write property)
CoreAudioPlayerMBS.OutputPosition as Double
property, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 4.3, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The current position in the playing stream.
Notes:
May point between samples.
(Read only property)
CoreAudioPlayerMBS.OutputPositionRelative as Double
property, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The current position in the playing buffer.
Notes:
May point between samples.
Will reset to 0 when a new buffer is used.
(Read only property)
CoreAudioPlayerMBS.PlayAudio(Data as memoryblock, offsetBytes as integer=0, countBytes as integer=0, BitSize as integer=16, ClearBuffers as boolean=false) as boolean
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Adds integer audio and starts playback.
Notes:
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.

You need to set NumberOfChannels before calling this method.
NumberOfChannels can be 1 or 2. 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 only copies the data to the internal queue. It returns directly.
If ClearBuffers is true the buffer list is cleared before this new data is added.
CoreAudioPlayerMBS.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, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Adds integer audio and starts playback.
Notes:
This is a special version of PlayAudio 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.

You need to set NumberOfChannels before calling this method.
NumberOfChannels must be 2 for this method.

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

This method only copies the data to the internal queue. It returns directly.
If ClearBuffers is true the buffer list is cleared before this new data is added.
CoreAudioPlayerMBS.PlayFloatAudio(FloatData as memoryblock, offsetBytes as integer=0, countBytes as integer=0, ClearBuffers as boolean=false) as boolean
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Adds float audio and starts playback.
Notes:
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.

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

You need to set NumberOfChannels before calling this method.
NumberOfChannels can be 1 or 2. For 2 channels, sound data must be interleaved.

This method only copies the data to the internal queue. It returns directly.
If ClearBuffers is true the buffer list is cleared before this new data is added.
CoreAudioPlayerMBS.PlayFloatAudioStereo(FloatData1 as memoryblock, FloatData2 as memoryblock, offsetBytes as integer=0, countBytes as integer=0, ClearBuffers as boolean=false) as boolean
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Adds float audio and starts playback.
Notes:
This is a special version of PlayFloatAudio 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.

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

You need to set NumberOfChannels before calling this method.
NumberOfChannels must be 2 for this method.

This method only copies the data to the internal queue. It returns directly.
If ClearBuffers is true the buffer list is cleared before this new data is added.
CoreAudioPlayerMBS.SampleRate as Single
property, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 4.3, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: The sample rate to use.
Notes:
You can use any value between 4000 and 100000.
Default is 44100 Hz.
(Read and Write property)
CoreAudioPlayerMBS.Start
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 7.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Starts playback.
Notes: use AddAudio, AddAudioStereo, AddFloatAudio and AddFloatAudioStereo first to fill buffers.
CoreAudioPlayerMBS.Stop
method, Audio, MBS MacOSX Plugin (CoreAudio), class CoreAudioPlayerMBS, Plugin version: 5.1, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Stops playback.

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