1
1
mirror of https://github.com/bitgapp/eqMac.git synced 2025-01-06 01:37:24 +03:00
eqMac/native/app/Source/Extensions/UnsafeMutableAudioBufferListPointer.swift
2020-04-04 19:15:38 +01:00

25 lines
591 B
Swift

//
// UnsafeMutableAudioBufferListPointer.swift
// WaveLabs
//
// Created by Vlad Gorlov on 29.06.16.
// Copyright © 2016 WaveLabs. All rights reserved.
//
import AVFoundation
extension UnsafeMutableAudioBufferListPointer {
public var audioBuffers: [AudioBuffer] {
var result: [AudioBuffer] = []
for audioBufferIndex in 0 ..< count {
result.append(self[audioBufferIndex])
}
return result
}
public init(unsafePointer pointer: UnsafePointer<AudioBufferList>) {
self.init(UnsafeMutablePointer<AudioBufferList>(mutating: pointer))
}
}