As a software developer focused predominantly on backend web applications, I’ve occasionally delved into front-end development. Yet, my recent endeavor to create a macOS app led me down an unexpected path filled with both frustration and discovery. Initially, I was dubious about the role of large language models (LLMs) in replacing developers. It seemed too far-fetched. However, when I faced a unique challenge, I realized that leveraging ChatGPT could prove invaluable.
The Problem

My dilemma was straightforward yet specific: I wanted to stream my vinyl records directly to my Mac. The catch? Apple had discreetly eliminated line-in ports from their newer models, complicating my efforts. While I could use a dongle, I soon found that there was no sound coming through. To make matters worse, the available applications were either overly complex or simply did not cater to my basic requirements.
Faced with this challenge, I quickly recognized that navigating macOS development was beyond my usual realm. I needed to make system calls to interact with the operating system effectively, and that’s when I realized I was entering uncharted waters. Apple’s documentation provided little guidance, leading me to feel a sense of urgency for a more accessible solution.
The Help: ChatGPT
Enter ChatGPT. To my surprise, I found SwiftUI components manageable and relatively straightforward to use. I began crafting a basic app that could accept inputs from external sources and relay them through my Studio Display speakers. The beauty of using ChatGPT lay in its topic-based conversation threads, allowing me to resume discussions from previous days without losing momentum.
This powerful tool provided me with essential code snippets to solve specific challenges, such as detecting audio channels suitable for input and building a functional volume bar. While I found its assistance invaluable, I soon realized that the process required more due diligence than I initially expected.
Below is the code that utilized Core Audio, a low-level framework to interact with the audio hardware of an Apple device. It scans all audio input devices and only selects devices that have input channels (like a microphone or a line-in cable):
inputDevices = devices.prefix(Int(deviceCount)).compactMap { deviceID in
// Step 1: Check if device has input channels
var streamFormatListSize: UInt32 = 0
var streamConfigAddress = AudioObjectPropertyAddress(
mSelector: kAudioDevicePropertyStreamConfiguration,
mScope: kAudioDevicePropertyScopeInput,
mElement: kAudioObjectPropertyElementMain
)
if AudioObjectGetPropertyDataSize(deviceID, &streamConfigAddress, 0, nil, &streamFormatListSize) != noErr {
return nil
}
let bufferList = UnsafeMutablePointer<AudioBufferList>.allocate(capacity: Int(streamFormatListSize))
defer { bufferList.deallocate() }
if AudioObjectGetPropertyData(deviceID, &streamConfigAddress, 0, nil, &streamFormatListSize, bufferList) != noErr {
return nil
}
// Count the total number of input channels
var inputChannelCount = 0
let buffers = UnsafeMutableAudioBufferListPointer(bufferList)
for buffer in buffers {
inputChannelCount += Int(buffer.mNumberChannels)
}
guard inputChannelCount > 0 else {
return nil // Not an input-capable device
}
// Step 2: Get the device name
var name: CFString = "" as CFString
var nameSize = UInt32(MemoryLayout<CFString>.size)
var nameAddress = AudioObjectPropertyAddress(
mSelector: kAudioObjectPropertyName,
mScope: kAudioObjectPropertyScopeGlobal,
mElement: kAudioObjectPropertyElementMain
)
if AudioObjectGetPropertyData(deviceID, &nameAddress, 0, nil, &nameSize, &name) != noErr {
return nil
}
return AudioDevice(id: deviceID, name: name as String)
}
This code is great because it works, and most importantly, this code is not very well documented in Apple’s documentation. Keywords like AudioObjectPropertyAddress are hardly documented, and if you have no idea about systems programming in macOS and others, it will look like Greek to most of us.

Some Caveats
The code generated by ChatGPT was often a mixed bag; it demanded revision and rigorous testing to ensure it performed as intended. I learned that merely accepting code suggestions without thorough examination—an instinct borne from my days on Stack Overflow—was ill-advised.
For instance, when I asked for a list of audio channels capable of passthrough, I quickly discovered I needed to specify that I was interested in channels accepting input to avoid receiving irrelevant information about speaker outputs. Additionally, some recommended system calls were outdated, a minor issue that nonetheless required my careful attention.
It became apparent that while ChatGPT served as a tremendous tool, a solid understanding of my objectives was crucial. Using ChatGPT was akin to wielding a calculator in mathematics; it doesn’t substitute for critical thinking and problem-solving.
Conclusion
Harnessing the power of AI can dramatically accelerate development timelines, especially when you have a clear goal but wish to avoid navigating convoluted documentation. As John Carmack, the visionary behind iconic games like Doom and Quake, wisely noted, AI represents a leap forward—much like the transition from graph paper to sophisticated game engines.
AI is indeed a force multiplier; a developer who typically operates at a 1x productivity rate can become a 5x or even 6x performer with the right tools. Yet, it’s crucial to recognize that someone starting at a 0.1x will not inevitably become a 0.5x simply by using these aids—they must focus on building their skills first.
Ultimately, this journey underscored a misconception that I believe many hold: that tools like AI diminish the necessity for expertise. My experiences reminded me that while having assistance can propel you forward, foundational knowledge and skill will always remain irreplaceable.
External Link
- Explore the final product: Audio Passthrough.
- USB-C to Audio Jack adapter, which includes a 3.5mm audio input jack - Amazon Affiliate Link
- USB-C to RCA adapter, which allows you to connect your vinyl to your Mac - Amazon Affiliate Link
The insights shared here are solely my own, and I am not affiliated with OpenAI in any capacity.
For help with my writing, I asked Grammarly to respond to these AI prompts:
Prompts I wrote
- “Build an article telling my story of the journey based on the points given.”
I’ve also made some additions on top of writing this article.
Plug
Support this free website by visiting my Amazon affiliate links. Any purchase you make will give me a cut without any extra cost to you
Base | Pro | |
---|---|---|
iPhones | iPhone 16 / iPhone 16 Plus - (Amazon) | iPhone 16 Pro / iPhone 16 Pro Max - (Amazon) |
Watch | Apple Watch SE (Amazon) / Apple Watch Series 10 | Apple Watch Ultra 2 (Amazon) |
AirPods | AirPods 4 (Amazon) | AirPods Pro 2 (Amazon) / AirPods Max (Amazon) |
iPad | iPad 10 (Amazon) / iPad Mini (Amazon) | iPad Air M2 (Amazon) / iPad Pro M4 (Amazon) |
Laptops | MacBook Air M3 (Amazon) | MacBook Pro M3 (Amazon) / MacBook Pro M3 Pro/Max (Amazon) |
Desktop | Mac Mini (Amazon) / iMac (Amazon) | Mac Studio / Mac Pro |
Displays | Studio Display (Amazon) | Pro Display XDR (Amazon) |
Other Ecosystem Items