changed sampleRate to unsigned int