Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A .wma music file is just an array of values ranging from -x to +x. Above a certain threshold, replace it with 1. Below, replace it with 0.

Now feed the 1s (+5V) and 0s (0V) into the speaker at the same rate as the sampling in the .wma file.

Since the speaker cone has inertia, the result will be an approximation of the original waveform, rather than a square wave.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: