Use audio_format_frame_size() instead of channels*audio_format_sample_size().
Attach a file by drag & drop or click to upload