kartik-venugopal/swift-ffmpeg-player — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a simple Swift demo audio player for Apple platforms that uses ffmpeg for decoding and AVAudioEngine for playback. I want it to feel like a small learning project, not a polished product, but it should actually work.

The app should let me open an audio file, read the streams, decode the audio into PCM, and play it through AVAudioEngine. Show basic metadata like artist and album, and display embedded cover art if the file has it. Add normal player controls like play, pause, stop, and a seek bar, and make seeking work even for files that do not expose duration or bit rate by building whatever packet info is needed. It should also handle resampling and convert mono or surround sources down to stereo so different file formats play reliably.

Please keep the code readable and well commented since this is meant as a starter project for someone trying to understand ffmpeg plus AVAudioEngine. If anything is unclear, look up current docs online and make sensible choices.

Want more depth? Deep Reverse