Anki Sound Problem on OS X

I’ve been using the Anki spaced repetition program for a project I’m not quite ready to talk about. I ran into an issue with audio support on OS X–namely, audio on cards wouldn’t play at all. I tried and failed to find a solution on the internet, so I’m writing it up here.

Anki uses mplayer to play audio. The OS X app bundles a version of mplayer, but it will apparently use the system version of mplayer if one is available. I had a version of mplayer installed via Homebrew; this version wasn’t working because of some kind of dynamic linking issue I don’t want to debug right now.

In order to determine whether this is your problem, just run mplayer (whichever version is in your path) on an mp3 and see if it works.