Everyone says their player is "lossless." Far fewer can say it is bit-perfect — that the samples sitting in your FLAC file reach the output device unchanged, with no sneaky resampling in between. Building Kord, that gap is the whole product.
Where the bits go wrong
A FLAC at 44.1kHz played through a system mixer locked to 48kHz gets resampled, whether you asked for it or not. The file is lossless; the playback is not. The only way to know you are bit-perfect is to control the path end to end — decode, then hand the samples to a device session configured to match the source rate.
// match the hardware to the file, not the other way around
let session = AVAudioSession.sharedInstance()
try session.setPreferredSampleRate(track.sampleRate)
try session.setActive(true)On iOS that means being honest about what the hardware can actually do, falling back gracefully when it can’t, and never pretending. Most of the engineering is in the edges: rate changes between tracks, route changes when you plug in a DAC, and metadata that lies about what a file really is.
Boring on purpose
The fun part is the audio engine. The part that makes it an app is everything else — a library that scrolls fast, artwork that loads without jank, and a public feedback tracker so users can tell me when a specific DAC misbehaves. Shipping is mostly the unglamorous middle.