Music App changes track after 40 seconds on rooted phone
Col, without some additional information, I can only give one real suggestion.

Did you install CyanogenMod correctly? Whenever installing a custom ROM on a phone when coming from a stock or older / different custom ROM, you need to wipe:
-Cache
-Data
-Dalvik Cache

If you go to the CyanogenMod Forums, you'll see this is question/step 1 in remedying any bug/glitch caused by CM.

The best way to do this is to go into your phone's Settings menu, go to Privacy (or wherever HTC puts it - maybe Storage), and do a full factory reset. If you moved from stock, CM6, or another ROM to CM7 without conducting a FULL wipe, there is no point in attempting to troubleshoot this problem until you have. Make a Nandroid backup in ClockworkMod, and perform a full factory reset (whether in the Settings menu or in the Clockwork Recovery UI), please. Please note that I am not saying return to the stock ROM, just wipe everything. If this doesn't work (which I'll be surprised if it doesn't), then there may be other issues.