See the index~ example in Max SDK: https://github.com/Cycling74/max6-sdk/blob/master/examples/audio/index~/index~.c#L146