void OnAudioFilterRead(float[] data, int channels)
{
//This uses the Unity specific float method we added to get the buffer
if (synthesizer == null ) return;
synthesizer.GetNext (sampleBuffer);
for (int i = 0; i < data.Length; i++) {
data[i] = sampleBuffer[i] * gain;
}
}