Menu

Keeping a DJ set playing when the app crashes
📰

Keeping a DJ set playing when the app crashes

DEV Community: swift·Martin Clasen·6 days ago
#cb2SIFPl
#devtoswift#devto#dev#engine#case
Long article (1669 words) — no AI summary yet.
Reading 0:00
15s threshold

Most apps can crash and come back, and the user loses a few seconds. A DJ app can't. If it crashes in the middle of a set, the room goes silent, everyone turns to look at the booth, and the DJ is restarting software in front of a few hundred people

I build Blendline , an app that analyzes your tracks, lays them out on a timeline as a set that's already mixed, and plays it live while you keep editing it. A lot of code runs in that app: SwiftUI, an AppKit timeline, decoding and analyzing hundreds of audio files in parallel, MIDI, a remote control over WebRTC. Any of it can have a bug. So I asked a simple question: where should the sound live so that most of those bugs can't stop it?

The answer has three layers. Each one covers what the one before can't

Layer 1: the sound lives in its own process

The window you see is a remote control. Playback, MIDI clock and the headphone monitor run in BlendlineEngine , a small executable that sits next to the app's own in Contents/MacOS .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.