Platforms to show: All Mac Windows Linux Cross-Platform
Back to AVAudioPlayerNodeMBS class.
AVAudioPlayerNodeMBS.Constructor
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
AVAudioPlayerNodeMBS.nodeTimeForPlayerTime(playerTime as AVAudioTimeMBS) as AVAudioTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
playerTime: A time relative to the player’s start time.
Returns a node time.
This method and its inverse playerTimeForNodeTime are discussed in The Player Timeline. If the player is not playing when this method is called, nil is returned.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The player's sample time does not advance while the node is paused.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This is equivalent to playAtTime with a value of nil.
AVAudioPlayerNodeMBS.playAtTime(time as AVAudioTimeMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
when: The node time at which to start or resume playback. Passing nil starts playback immediately.
This node is initially paused. Requests to play buffers or file segments are enqueued, and any necessary decoding begins immediately. Playback does not begin, however, until the player has started playing, via this method.
AVAudioPlayerNodeMBS.playerTimeForNodeTime(nodeTime as AVAudioTimeMBS) as AVAudioTimeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
nodeTime: The node time.
Returns a time relative to the player’s start time.
This method and its inverse nodeTimeForPlayerTime are discussed in The Player Timeline. If the player is not playing when this method is called, nil is returned.
Some examples using this method:
AVAudioPlayerNodeMBS.prepareWithFrameCount(frameCount as UInt32)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
frameCount: The number of sample frames of data to be prepared before returning.
AVAudioPlayerNodeMBS.scheduleBuffer(buffer as AVAudioPCMBufferMBS, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
buffer: The buffer to play.
Calls scheduleBufferCompleted event later when playback is done.
time will be nil and options be zero in that case.
Schedules the buffer to be played following any previously scheduled commands.
See also:
- scheduleBuffer(buffer as AVAudioPCMBufferMBS, time as AVAudioTimeMBS, options as Integer, tag as Variant = nil)
- scheduleBuffer(callbackType as Integer, buffer as AVAudioPCMBufferMBS, tag as Variant = nil)
- scheduleBuffer(callbackType as Integer, buffer as AVAudioPCMBufferMBS, time as AVAudioTimeMBS, options as Integer, tag as Variant = nil)
AVAudioPlayerNodeMBS.scheduleBuffer(buffer as AVAudioPCMBufferMBS, time as AVAudioTimeMBS, options as Integer, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
buffer: The buffer to play.
when: The time at which to play the buffer.
options: Playback options.
Calls later scheduleBufferCompleted event after the buffer has completely played or the player is stopped.
See also:
AVAudioPlayerNodeMBS.scheduleBuffer(callbackType as Integer, buffer as AVAudioPCMBufferMBS, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
buffer: the buffer to play
callbackType: option to specify when the completion handler must be called
The scheduleBufferCompleted event is called after the buffer has been consumed by the player or has finished playing back or the player is stopped.
Schedules the buffer to be played following any previously scheduled commands.
Available in MacOS 10.13 or newer.
See also:
- scheduleBuffer(buffer as AVAudioPCMBufferMBS, tag as Variant = nil)
- scheduleBuffer(buffer as AVAudioPCMBufferMBS, time as AVAudioTimeMBS, options as Integer, tag as Variant = nil)
- scheduleBuffer(callbackType as Integer, buffer as AVAudioPCMBufferMBS, time as AVAudioTimeMBS, options as Integer, tag as Variant = nil)
AVAudioPlayerNodeMBS.scheduleBuffer(callbackType as Integer, buffer as AVAudioPCMBufferMBS, time as AVAudioTimeMBS, options as Integer, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
buffer: the buffer to play
time: the time at which to play the buffer. see the discussion of timestamps, above.
options: options for looping, interrupting other buffers, etc.
callbackType: option to specify when the completion handler must be called.
The scheduleBufferCompleted event is called after the buffer has been consumed by the player or has finished playing back or the player is stopped.
Available in MacOS 10.13 or newer.
See also:
AVAudioPlayerNodeMBS.scheduleFile(callbackType as Integer, file as AVAudioFileMBS, time as AVAudioTimeMBS, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
file: the file to play
time: the time at which to play the file. see the discussion of timestamps, above.
callbackType: option to specify when the completion handler must be called
The scheduleFileCompleted event is called after the file has been consumed by the player or has finished playing back or the player is stopped.
Available in MacOS 10.13 or newer.
See also:
Some examples using this method:
AVAudioPlayerNodeMBS.scheduleFile(file as AVAudioFileMBS, time as AVAudioTimeMBS, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
file: The file to play.
when: The time at which to play the buffer.
Calls later scheduleFileCompleted event when playback is done.
See also:
AVAudioPlayerNodeMBS.scheduleSegment(callbackType as Integer, file as AVAudioFileMBS, time as AVAudioTimeMBS, startFrame as Int64, frameCount as Int64, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
file: the file to play
startFrame: the starting frame position in the stream
frameCount: the number of frames to play
time: the time at which to play the region. see the discussion of timestamps, above.
callbackType: option to specify when the completion handler must be called
The scheduleSegmentCompleted event is called after the segment has been consumed by the player or has finished playing back or the player is stopped.
Available in MacOS 10.13 or newer.
See also:
Some examples using this method:
AVAudioPlayerNodeMBS.scheduleSegment(file as AVAudioFileMBS, time as AVAudioTimeMBS, startFrame as Int64, frameCount as Int64, tag as Variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
file: The audio file of the file to play.
startFrame: The starting frame position in the stream.
frameCount: The number of frames to play.
when: The time at which to play the buffer.
Calls later scheduleSegmentCompleted event.
See also:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | AVFoundationNode | MBS AVFoundation Plugin | 15.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
All of the node’s previously scheduled events are cleared, including any that are in the middle of playing. The node’s sample time (and therefore the times to which new events are to be scheduled) is reset to 0, and will not proceed until the node is started again by sending a play or playAtTime message.
The items on this page are in the following plugins: MBS AVFoundation Plugin.