Mode
The Mode enum inludes the ways that determine when the data is transmitted.
enum Mode
The Mode enum inludes the ways that determine when the data is transmitted.
enum Mode
import SwiftIO
The SwiftIO library allows you to access and control the hardware in an easy way.
final class I2S
I2S (inter-integrated circuit sound) is a serial communication protocol that is designed specifically for digital audio data.
case philips
case rightJustified
case leftJustified
init(_ idName: Id, rate: Int = 16_000, bits: Int = 16, mode: Mode = .philips, timeout: Int = Int(SWIFT_FOREVER))
Initializes an I2S interface with the specified sample rate and sample bits.
let obj: UnsafeMutableRawPointer
let supportedSampleBits: Set
The sample bits for the I2S data transmission, which refers to the number of bits used to represent each sample.
let supportedSampleRate: Set
The sample rate for the audio data, which defines how many times the signal is sampled in one second.
@discardableResult func setSampleProperty(rate: Int, bits: Int) -> Result<(), Errno>
Set audio sample rate and bit.
@discardableResult func write(_ data: [UInt8], count: Int? = nil) -> Result<Int, Errno>
Write an array of data to audio device.
@discardableResult func write<Element>(_ data: [Element], count: Int? = nil) -> Result<Int, Errno> where Element : BinaryInteger
Write an array of binary integers to audio device.
struct ConfigOptions
struct DataFormat
enum Direction
enum State
enum Trigger
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.