---
title: "installAudioTap(onBus:bufferSize:format:tapProvider:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudionode/installaudiotap(onbus:buffersize:format:tapprovider:)"
---

# installAudioTap(onBus:bufferSize:format:tapProvider:)

Install a tap on a bus using a sendable block

## Declaration

```swift
func installAudioTap(onBus bus: AVAudioNodeBus, bufferSize: AVAudioFrameCount, format: AVAudioFormat?, tapProvider: @escaping @Sendable (AVReadOnlyAudioPCMBuffer, AVAudioTime) -> Void) throws
```

## Parameters

- `bus`: The node output bus to which to attach the tap
- `bufferSize`: The requested size of incoming buffers in sample frames. Supported range is [100, 400] ms.
- `format`: If non-nil, attempts to apply this as the format of the specified output bus
- `tapProvider`: A sendable closure to be called with read-only audio buffers

## Discussion

Discussion This method installs a tap that receives read-only buffers safe for concurrent use. The tap block is sendable and can be safely called from any isolation domain. Only one tap may be installed on any bus. Taps may be safely installed and removed while the engine is running.

## See Also

### Installing and Removing an Audio Tap

- [installTap(onBus:bufferSize:format:block:)](avfaudio/avaudionode/installtap(onbus:buffersize:format:block:).md)
- [removeTap(onBus:)](avfaudio/avaudionode/removetap(onbus:).md)
- [AVAudioNodeTapBlock](avfaudio/avaudionodetapblock.md)
