public void Open() { string openString = $"open \"{AudioPath}\" alias {ALIAS}"; Mci.Run(openString); OpenedFlag = true; }
public void Pause() { if (OpenedFlag) { string pauseString = $"pause {ALIAS}"; Mci.Run(pauseString); } }
public void PlayFrom(int miliseconds) { if (!OpenedFlag) { Open(); } string playFromString = $"play {ALIAS} from {miliseconds}"; Mci.Run(playFromString); }
public string Position() { if (!OpenedFlag) { return("0"); } string statusString = $"status {ALIAS} position notify"; StringBuilder sb = new StringBuilder(); Mci.Run(statusString, sb, 128); return(sb.ToString()); }