Is this on a desktop or laptop? If on a desktop, you could try a PCI-e sound card. If on a laptop (desktop too) you could use a USB sound card dongle. Does the periodic lagging also occur when there is no music playing? If so, it probably is hardware.