iphone 3gs 16gb faulty sound sometimes +

iphone 3gs 16gb faulty sound sometimes works perfect but sometimes the sound will cut off and automatically start again...not sure what is wrong but i have a new iphone coming soon so selling this one... this iphone is on version 4.1 if that helps anyone to understand the problem... any more details please do call thanks