/// <summary> /// Constructor for the OggPlaylistFile object (non-cached) /// </summary> /// <param name="Path"> /// A <see cref="System.String"/> containing the path to the file /// </param> /// <param name="Order"> /// A <see cref="System.Int32"/> containg a value indicating it's order /// </param> OggPlaylistFile(string Path, int Order) { m_File = null; m_OrderNum = Order; m_Played = false; m_Cached = false; m_FileString = Path; }
/// <summary> /// Constructor for the OggPlaylistFile object (cached) /// </summary> /// <param name="f"> /// An <see cref="OggFile"/> containing the file associated with this OggPlaylistFile /// </param> /// <param name="Order"> /// A <see cref="System.Int32"/> containing a value indicating it's order /// </param> OggPlaylistFile(OggFile f, int Order) { m_File = f; m_OrderNum = Order; m_Played = false; m_Cached = true; m_FileString = m_File.GetQuickTag(OggTags.Filename); }
public override bool SetCurrentFile(OggFile File) { if (!((m_PlayerState == OggPlayerStatus.Stopped) || (m_PlayerState == OggPlayerStatus.Waiting))) { return(false); } m_CurrentFile = File; ResetPlayerCondition(); StateChange(OggPlayerStatus.Stopped, OggPlayerStateChanger.UserRequest); return(true); }
public override bool SetCurrentFile(OggFile NewFile) { // Check current state if (!((m_PlayerState == OggPlayerStatus.Stopped) || (m_PlayerState == OggPlayerStatus.Waiting))) { return(false); } m_CurrentFile = NewFile; StateChange(OggPlayerStatus.Stopped, OggPlayerStateChanger.UserRequest); return(true); }
/// <summary> /// Uncache the file. Use this instead of OggPlaylistFile.File = null as it sets some internal flags /// </summary> /// <returns> /// A <see cref="System.Boolean"/> indicating whether the operation succeeded. /// </returns> public bool UnCacheFile() { if (!(m_Cached)) { return(true); } try { m_File = null; m_Cached = false; } catch (Exception ex) { #if (DEBUG) Console.WriteLine(DateTime.Now.ToString() + ": OggPlaylistFile.UnCacheFile: " + ex.Message); #endif return(false); } return(true); }
/// <summary> /// Cache the file. This creates an OggFile object for the file specified by OggPlaylistFile.FileString /// This will return false if the filepath is invalid or if any other error occurs during creation. /// </summary> /// <returns> /// A <see cref="System.Boolean"/> indicating whether the operation succeeded. /// </returns> public bool CacheFile() { if (!(System.IO.File.Exists(m_FileString))) { return(false); } if (m_Cached) { UnCacheFile(); } try { m_File = new OggFile(m_FileString); m_Cached = true; } catch (Exception ex) { #if (DEBUG) Console.WriteLine(DateTime.Now.ToString() + ": OggPlaylistFile.CacheFile: " + ex.Message); #endif return(false); } return(true); }
/// <summary> /// Set the current file. Only valid when the player is stopped or no file has been set /// </summary> /// <param name="NewFilename"> /// A <see cref="System.String"/> containing the path to the file to set /// </param> public abstract bool SetCurrentFile(OggFile File);
public override bool SetCurrentFile(OggFile NewFile) { // Check current state if (!((m_PlayerState==OggPlayerStatus.Stopped)||(m_PlayerState==OggPlayerStatus.Waiting))) { return false; } m_CurrentFile = NewFile; StateChange(OggPlayerStatus.Stopped, OggPlayerStateChanger.UserRequest); return true; }
/// <summary> /// Uncache the file. Use this instead of OggPlaylistFile.File = null as it sets some internal flags /// </summary> /// <returns> /// A <see cref="System.Boolean"/> indicating whether the operation succeeded. /// </returns> public bool UnCacheFile() { if (!(m_Cached)) { return true; } try { m_File = null; m_Cached = false; } catch (Exception ex) { #if (DEBUG) Console.WriteLine(DateTime.Now.ToString() + ": OggPlaylistFile.UnCacheFile: " + ex.Message); #endif return false; } return true; }
/// <summary> /// Cache the file. This creates an OggFile object for the file specified by OggPlaylistFile.FileString /// This will return false if the filepath is invalid or if any other error occurs during creation. /// </summary> /// <returns> /// A <see cref="System.Boolean"/> indicating whether the operation succeeded. /// </returns> public bool CacheFile() { if (!(System.IO.File.Exists(m_FileString))) { return false; } if (m_Cached) { UnCacheFile(); } try { m_File = new OggFile(m_FileString); m_Cached = true; } catch (Exception ex) { #if (DEBUG) Console.WriteLine(DateTime.Now.ToString() + ": OggPlaylistFile.CacheFile: " + ex.Message); #endif return false; } return true; }
private bool m_Played; // Whether the file has been played #endregion Fields #region Constructors /// <summary> /// Constructor for the OggPlaylistFile object (cached) /// </summary> /// <param name="f"> /// An <see cref="OggFile"/> containing the file associated with this OggPlaylistFile /// </param> /// <param name="Order"> /// A <see cref="System.Int32"/> containing a value indicating it's order /// </param> OggPlaylistFile(OggFile f, int Order) { m_File = f; m_OrderNum = Order; m_Played = false; m_Cached = true; m_FileString = m_File.GetQuickTag(OggTags.Filename); }
public override bool SetCurrentFile(OggFile File) { if (!((m_PlayerState==OggPlayerStatus.Stopped)||(m_PlayerState==OggPlayerStatus.Waiting))) { return false; } m_CurrentFile = File; ResetPlayerCondition(); StateChange(OggPlayerStatus.Stopped, OggPlayerStateChanger.UserRequest); return true; }