Check if sound is playing

How do I check if my music is playing or not? I need this so I can let my loop loop forever.