bool MonoRecorder::Save(const std::string& fn, bool norm, float norm_max) { WaveFile w; const RecorderTrack& to_save = *(save_processed ? processed_tracks[0] : tracks[0]); w.FromFloat(&to_save[0],to_save.getLength(),norm,norm_max); w.Save(fn.c_str()); return true; }
bool StereoRecorder::Save(const std::string& fn, bool norm, float norm_max) { WaveFile w; const RecorderTrack& left = *(save_processed ? processed_tracks[0] : tracks[0]); const RecorderTrack& right = *(save_processed ? processed_tracks[1] : tracks[1]); w.FromFloat(&left[0],&right[0],left.getLength(),right.getLength(),norm); w.Save(fn.c_str()); return true; }