public static void PostRecord(UserInfo ui, string audioRootFolder, string transRootFolder, Trans trans) { string audioPath = Path.Combine(audioRootFolder, ui.UserId, trans.CurrentIndex.ToString("000000") + ".wav"); if (File.Exists(audioPath)) { File.Delete(audioPath); } MciCommands.MciSave(audioPath); MciCommands.MciClose(); string transPath = Path.Combine(transRootFolder, ui.UserId, trans.CurrentIndex.ToString("000000") + ".txt"); if (File.Exists(transPath)) { File.Delete(transPath); } string content = string.Join("\t", OutputTransParts(ui, trans)); File.WriteAllText(transPath, content); }
public static void Record() { MciCommands.MciRecord(); }
public static void PreRecord(AudioInfo ai) { MciCommands.MciOpen(); MciCommands.MciSet(ai.BitsPerSample, ai.Channel, ai.SampleRate, ai.ByteRate, ai.BlockAlign); }