There’s a relationship between the capacitor and resistor values and the resulting cutoff frequency. Given any two values, we can compute the third. Already having a ton of 0.1 microfarad capacitors around, I just needed to know the corresponding resistor to achieve the desired 25 KHz cutoff (you could also do it the other way — some resistor you have around, determining a suitable capacitor). Rather than bore you with the math, you can just whip out the Circuit Playground app for iOS (select “Circuit Calculators,” then “RC Cutoff Filter,” or you can Google search for “low pass filter calculator” resources on the web and plug in the two known values you have.
The filtered output is then fed into a 10K potentiometer for volume adjustment (you can leave this part out, but the volume will always be at the maximum) and then through a 10 microfarad capacitor that provides “AC coupling” — so the audio waveform is centered at 0 Volts rather than 1.65V (one half the Trinket’s operating voltage). The output is split to both the right and left channels of a 1/8" phono jack, to which headphones or an amplified speaker can be connected.
It’s very important that a 3.3V Trinket is used; this voltage is directly compatible with the flash memory chip. Adding the level shifting circuitry would defeat the smallness of the Trinket.
Trinket Pin #4 (audio output) MUST BE DISCONNECTED before code can be uploaded to the board! If you solder the circuit permanently in a proto board, it's strongly recommended that the Trinket be socketed, or add a jumper between pin 4 and the RC filter so it can be disconnected when new code is uploaded to the chip.
File→Sketchbook→Libraries→Adafruit_TinyFlash→TrinketPlayer
Select “Adafruit Trinket 8 MHz” from the Tools→Board menu. Disconnect pin 4 (or remove Trinket from the circuit), press the reset button, then click Upload. After uploading, assuming all else is wired properly, your audio should start playing immediately. As the code is currently written, the sound will loop forever. You could change this to stop after the music plays, then use the reset button to restart.
This code only works on the Trinket. It uses special registers and will not compile on the Uno or other Arduino boards.