Make SAMPLE_RATE global.