Rename CTexture to CTextureRef to reflect it is only a reference

This commit is contained in:
Flamefire committed 2014-09-13 17:51:55 +02:00
1 parent 3fe8cdf05c
commit 7f8e974fe1
51 files changed
+290 -285

No files matched your search

+10 -15
View File
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using VocaluxeLib.Draw;
using VocaluxeLib.Songs;
@@ -14,7 +13,7 @@ namespace VocaluxeLib.Utils.Player
private CSong _Song;
private bool _VideoEnabled;
private int _Video = -1;
private CTexture _CurrentVideoTexture;
private CTextureRef _CurrentVideoTexture;
private CFading _VideoFading;
public bool VideoEnabled
@@ -41,7 +40,7 @@ namespace VocaluxeLib.Utils.Player
}
public bool SongHasVideo
{
get { return _Song != null && File.Exists(Path.Combine(_Song.Folder,_Song.VideoFileName)); }
get { return _Song != null && File.Exists(Path.Combine(_Song.Folder, _Song.VideoFileName)); }
}
public string ArtistAndTitle
@@ -56,7 +55,7 @@ namespace VocaluxeLib.Utils.Player
}
}
public CTexture Cover
public CTextureRef Cover
{
get { return _Song == null ? CBase.Cover.GetNoCover() : _Song.CoverTextureBig; }
}
@@ -66,11 +65,10 @@ namespace VocaluxeLib.Utils.Player
get { return _StreamID != -1; }
}
public CSongPlayer(bool loop = false) : base(loop) { }
public CSongPlayer(bool loop = false) : base(loop) {}
public CSongPlayer(CSong song, bool loop = false, float position = 0f, bool autoplay = false)
: base(Path.Combine(song.Folder,song.MP3FileName), loop, position, autoplay)
: base(Path.Combine(song.Folder, song.MP3FileName), loop, position, autoplay)
{
_Song = song;
_LoadVideo();
@@ -82,7 +80,7 @@ namespace VocaluxeLib.Utils.Player
_Song = null;
}
public CTexture GetVideoTexture()
public CTextureRef GetVideoTexture()
{
if (_Video == -1 || _Song == null)
return null;
@@ -101,7 +99,7 @@ namespace VocaluxeLib.Utils.Player
return null;
}
public void Load(CSong song, float position = 0f, bool autoplay = false)
public void Load(CSong song, float position = 0f, bool autoplay = false)
{
if (song == null)
return;
@@ -109,7 +107,7 @@ namespace VocaluxeLib.Utils.Player
Stop();
_Song = song;
base.Load(Path.Combine(song.Folder, song.MP3FileName), position, false);
_LoadVideo();
@@ -155,13 +153,10 @@ namespace VocaluxeLib.Utils.Player
CBase.Video.Pause(_Video);
CBase.Video.Skip(_Video, CBase.Sound.GetPosition(_StreamID) + _FadeTime, _Song.VideoGap);
}
else if(_Video != -1)
{
else if (_Video != -1)
CBase.Video.Resume(_Video);
}
base.TogglePause();
}
private void _LoadVideo()
{
@@ -182,4 +177,4 @@ namespace VocaluxeLib.Utils.Player
}
}
}
}
}