Little Tweaks
This commit is contained in:
1 parent
78870ae26d
commit
d5cb43a09f
11 files changed
+388
-345
No files matched your search
+255
-246
@@ -284,270 +284,279 @@ namespace Vocaluxe.Base
|
|||||||
public static bool SaveConfig()
|
public static bool SaveConfig()
|
||||||
{
|
{
|
||||||
|
|
||||||
XmlWriter writer = XmlWriter.Create(CSettings.sFileConfig, _settings);
|
XmlWriter writer = null;
|
||||||
writer.WriteStartDocument();
|
try
|
||||||
writer.WriteStartElement("root");
|
|
||||||
|
|
||||||
#region Info
|
|
||||||
writer.WriteStartElement("Info");
|
|
||||||
|
|
||||||
writer.WriteElementString("Version", CSettings.GetFullVersionText());
|
|
||||||
writer.WriteElementString("Time", System.DateTime.Now.ToString());
|
|
||||||
writer.WriteElementString("Platform", System.Environment.OSVersion.Platform.ToString());
|
|
||||||
writer.WriteElementString("OSVersion", System.Environment.OSVersion.ToString());
|
|
||||||
writer.WriteElementString("ProcessorCount", System.Environment.ProcessorCount.ToString());
|
|
||||||
|
|
||||||
writer.WriteElementString("Screens", Screen.AllScreens.Length.ToString());
|
|
||||||
writer.WriteElementString("PrimaryScreenResolution", Screen.PrimaryScreen.Bounds.Size.ToString());
|
|
||||||
|
|
||||||
writer.WriteElementString("Directory", System.Environment.CurrentDirectory.ToString());
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
|
||||||
#endregion Info
|
|
||||||
|
|
||||||
#region Debug
|
|
||||||
writer.WriteStartElement("Debug");
|
|
||||||
|
|
||||||
writer.WriteComment("DebugLevel: " + CHelper.ListStrings(Enum.GetNames(typeof(EDebugLevel))));
|
|
||||||
writer.WriteElementString("DebugLevel", Enum.GetName(typeof(EDebugLevel), DebugLevel));
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
|
||||||
#endregion Debug
|
|
||||||
|
|
||||||
#region Graphics
|
|
||||||
writer.WriteStartElement("Graphics");
|
|
||||||
|
|
||||||
writer.WriteComment("Renderer: " + CHelper.ListStrings(Enum.GetNames(typeof(ERenderer))));
|
|
||||||
writer.WriteElementString("Renderer", Enum.GetName(typeof(ERenderer), Renderer));
|
|
||||||
|
|
||||||
writer.WriteComment("TextureQuality: " + CHelper.ListStrings(Enum.GetNames(typeof(ETextureQuality))));
|
|
||||||
writer.WriteElementString("TextureQuality", Enum.GetName(typeof(ETextureQuality), TextureQuality));
|
|
||||||
|
|
||||||
writer.WriteComment("CoverSize (pixels): 32, 64, 128, 256, 512, 1024 (default: 128)");
|
|
||||||
writer.WriteElementString("CoverSize", CoverSize.ToString());
|
|
||||||
|
|
||||||
writer.WriteComment("Screen width and height (pixels)");
|
|
||||||
writer.WriteElementString("ScreenW", ScreenW.ToString());
|
|
||||||
writer.WriteElementString("ScreenH", ScreenH.ToString());
|
|
||||||
|
|
||||||
writer.WriteComment("AAMode: " + CHelper.ListStrings(Enum.GetNames(typeof(EAntiAliasingModes))));
|
|
||||||
writer.WriteElementString("AAMode", Enum.GetName(typeof(EAntiAliasingModes), AAMode));
|
|
||||||
|
|
||||||
writer.WriteComment("Colors: " + CHelper.ListStrings(Enum.GetNames(typeof(EColorDeep))));
|
|
||||||
writer.WriteElementString("Colors", Enum.GetName(typeof(EColorDeep), Colors));
|
|
||||||
|
|
||||||
writer.WriteComment("MaxFPS should be between 1..200");
|
|
||||||
writer.WriteElementString("MaxFPS", MaxFPS.ToString("#"));
|
|
||||||
|
|
||||||
writer.WriteComment("VSync: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
|
||||||
writer.WriteElementString("VSync", Enum.GetName(typeof(EOffOn), VSync));
|
|
||||||
|
|
||||||
writer.WriteComment("FullScreen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
|
||||||
writer.WriteElementString("FullScreen", Enum.GetName(typeof(EOffOn), FullScreen));
|
|
||||||
|
|
||||||
writer.WriteComment("FadeTime should be between 0..3 Seconds");
|
|
||||||
writer.WriteElementString("FadeTime", FadeTime.ToString("#0.00"));
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
|
||||||
#endregion Graphics
|
|
||||||
|
|
||||||
#region Theme
|
|
||||||
writer.WriteStartElement("Theme");
|
|
||||||
|
|
||||||
writer.WriteComment("Theme name");
|
|
||||||
writer.WriteElementString("Name", Theme);
|
|
||||||
|
|
||||||
writer.WriteComment("Skin name");
|
|
||||||
writer.WriteElementString("Skin", Skin);
|
|
||||||
|
|
||||||
writer.WriteComment("Name of cover-theme");
|
|
||||||
writer.WriteElementString("Cover", CoverTheme);
|
|
||||||
|
|
||||||
writer.WriteComment("Draw note-lines:" + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
|
||||||
writer.WriteElementString("DrawNoteLines", Enum.GetName(typeof(EOffOn), DrawNoteLines));
|
|
||||||
|
|
||||||
writer.WriteComment("Draw tone-helper:" + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
|
||||||
writer.WriteElementString("DrawToneHelper", Enum.GetName(typeof(EOffOn), DrawToneHelper));
|
|
||||||
|
|
||||||
writer.WriteComment("Look of timer:" + CHelper.ListStrings(Enum.GetNames(typeof(ETimerLook))));
|
|
||||||
writer.WriteElementString("TimerLook", Enum.GetName(typeof(ETimerLook), TimerLook));
|
|
||||||
|
|
||||||
writer.WriteComment("Information about players on SingScreen:" + CHelper.ListStrings(Enum.GetNames(typeof(EPlayerInfo))));
|
|
||||||
writer.WriteElementString("PlayerInfo", Enum.GetName(typeof(EPlayerInfo), PlayerInfo));
|
|
||||||
|
|
||||||
writer.WriteComment("Fade player-information with lyrics and notebars:" + CHelper.ListStrings(Enum.GetNames(typeof(EFadePlayerInfo))));
|
|
||||||
writer.WriteElementString("FadePlayerInfo", Enum.GetName(typeof(EFadePlayerInfo), FadePlayerInfo));
|
|
||||||
|
|
||||||
writer.WriteComment("Cover Loading:" + CHelper.ListStrings(Enum.GetNames(typeof(ECoverLoading))));
|
|
||||||
writer.WriteElementString("CoverLoading", Enum.GetName(typeof(ECoverLoading), CoverLoading));
|
|
||||||
|
|
||||||
writer.WriteComment("Lyric Style:" + CHelper.ListStrings(Enum.GetNames(typeof(ELyricStyle))));
|
|
||||||
writer.WriteElementString("LyricStyle", Enum.GetName(typeof(ELyricStyle), LyricStyle));
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
|
||||||
#endregion Theme
|
|
||||||
|
|
||||||
#region Sound
|
|
||||||
writer.WriteStartElement("Sound");
|
|
||||||
|
|
||||||
writer.WriteComment("PlayBackLib: " + CHelper.ListStrings(Enum.GetNames(typeof(EPlaybackLib))));
|
|
||||||
writer.WriteElementString("PlayBackLib", Enum.GetName(typeof(EPlaybackLib), PlayBackLib));
|
|
||||||
|
|
||||||
writer.WriteComment("RecordLib: " + CHelper.ListStrings(Enum.GetNames(typeof(ERecordLib))));
|
|
||||||
writer.WriteElementString("RecordLib", Enum.GetName(typeof(ERecordLib), RecordLib));
|
|
||||||
|
|
||||||
writer.WriteComment("AudioBufferSize: " + CHelper.ListStrings(Enum.GetNames(typeof(EBufferSize))));
|
|
||||||
writer.WriteElementString("AudioBufferSize", Enum.GetName(typeof(EBufferSize), AudioBufferSize));
|
|
||||||
|
|
||||||
writer.WriteComment("AudioLatency from -500 to 500 ms");
|
|
||||||
writer.WriteElementString("AudioLatency", AudioLatency.ToString());
|
|
||||||
|
|
||||||
writer.WriteComment("Background Music");
|
|
||||||
writer.WriteElementString("BackgroundMusic", Enum.GetName(typeof(EOffOn), BackgroundMusic));
|
|
||||||
|
|
||||||
writer.WriteComment("Background Music Volume from 0 to 100");
|
|
||||||
writer.WriteElementString("BackgroundMusicVolume", BackgroundMusicVolume.ToString());
|
|
||||||
|
|
||||||
writer.WriteComment("Background Music Source");
|
|
||||||
writer.WriteElementString("BackgroundMusicSource", Enum.GetName(typeof(EBackgroundMusicSource), BackgroundMusicSource));
|
|
||||||
|
|
||||||
writer.WriteComment("Preview Volume from 0 to 100");
|
|
||||||
writer.WriteElementString("PreviewMusicVolume", PreviewMusicVolume.ToString());
|
|
||||||
|
|
||||||
writer.WriteComment("Game Volume from 0 to 100");
|
|
||||||
writer.WriteElementString("GameMusicVolume", GameMusicVolume.ToString());
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
|
||||||
#endregion Sound
|
|
||||||
|
|
||||||
#region Game
|
|
||||||
writer.WriteStartElement("Game");
|
|
||||||
|
|
||||||
writer.WriteComment("Game-Language:");
|
|
||||||
writer.WriteElementString("Language", Language);
|
|
||||||
|
|
||||||
// SongFolder
|
|
||||||
// Check, if program was started with songfolder-parameters
|
|
||||||
if (SongFolderOld.Count > 0)
|
|
||||||
{
|
{
|
||||||
//Write "old" song-folders to config.
|
writer = XmlWriter.Create(CSettings.sFileConfig, _settings);
|
||||||
writer.WriteComment("SongFolder: SongFolder1, SongFolder2, SongFolder3, ...");
|
writer.WriteStartDocument();
|
||||||
for (int i = 0; i < SongFolderOld.Count; i++)
|
writer.WriteStartElement("root");
|
||||||
|
|
||||||
|
#region Info
|
||||||
|
writer.WriteStartElement("Info");
|
||||||
|
|
||||||
|
writer.WriteElementString("Version", CSettings.GetFullVersionText());
|
||||||
|
writer.WriteElementString("Time", System.DateTime.Now.ToString());
|
||||||
|
writer.WriteElementString("Platform", System.Environment.OSVersion.Platform.ToString());
|
||||||
|
writer.WriteElementString("OSVersion", System.Environment.OSVersion.ToString());
|
||||||
|
writer.WriteElementString("ProcessorCount", System.Environment.ProcessorCount.ToString());
|
||||||
|
|
||||||
|
writer.WriteElementString("Screens", Screen.AllScreens.Length.ToString());
|
||||||
|
writer.WriteElementString("PrimaryScreenResolution", Screen.PrimaryScreen.Bounds.Size.ToString());
|
||||||
|
|
||||||
|
writer.WriteElementString("Directory", System.Environment.CurrentDirectory.ToString());
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
#endregion Info
|
||||||
|
|
||||||
|
#region Debug
|
||||||
|
writer.WriteStartElement("Debug");
|
||||||
|
|
||||||
|
writer.WriteComment("DebugLevel: " + CHelper.ListStrings(Enum.GetNames(typeof(EDebugLevel))));
|
||||||
|
writer.WriteElementString("DebugLevel", Enum.GetName(typeof(EDebugLevel), DebugLevel));
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
#endregion Debug
|
||||||
|
|
||||||
|
#region Graphics
|
||||||
|
writer.WriteStartElement("Graphics");
|
||||||
|
|
||||||
|
writer.WriteComment("Renderer: " + CHelper.ListStrings(Enum.GetNames(typeof(ERenderer))));
|
||||||
|
writer.WriteElementString("Renderer", Enum.GetName(typeof(ERenderer), Renderer));
|
||||||
|
|
||||||
|
writer.WriteComment("TextureQuality: " + CHelper.ListStrings(Enum.GetNames(typeof(ETextureQuality))));
|
||||||
|
writer.WriteElementString("TextureQuality", Enum.GetName(typeof(ETextureQuality), TextureQuality));
|
||||||
|
|
||||||
|
writer.WriteComment("CoverSize (pixels): 32, 64, 128, 256, 512, 1024 (default: 128)");
|
||||||
|
writer.WriteElementString("CoverSize", CoverSize.ToString());
|
||||||
|
|
||||||
|
writer.WriteComment("Screen width and height (pixels)");
|
||||||
|
writer.WriteElementString("ScreenW", ScreenW.ToString());
|
||||||
|
writer.WriteElementString("ScreenH", ScreenH.ToString());
|
||||||
|
|
||||||
|
writer.WriteComment("AAMode: " + CHelper.ListStrings(Enum.GetNames(typeof(EAntiAliasingModes))));
|
||||||
|
writer.WriteElementString("AAMode", Enum.GetName(typeof(EAntiAliasingModes), AAMode));
|
||||||
|
|
||||||
|
writer.WriteComment("Colors: " + CHelper.ListStrings(Enum.GetNames(typeof(EColorDeep))));
|
||||||
|
writer.WriteElementString("Colors", Enum.GetName(typeof(EColorDeep), Colors));
|
||||||
|
|
||||||
|
writer.WriteComment("MaxFPS should be between 1..200");
|
||||||
|
writer.WriteElementString("MaxFPS", MaxFPS.ToString("#"));
|
||||||
|
|
||||||
|
writer.WriteComment("VSync: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
|
writer.WriteElementString("VSync", Enum.GetName(typeof(EOffOn), VSync));
|
||||||
|
|
||||||
|
writer.WriteComment("FullScreen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
|
writer.WriteElementString("FullScreen", Enum.GetName(typeof(EOffOn), FullScreen));
|
||||||
|
|
||||||
|
writer.WriteComment("FadeTime should be between 0..3 Seconds");
|
||||||
|
writer.WriteElementString("FadeTime", FadeTime.ToString("#0.00"));
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
#endregion Graphics
|
||||||
|
|
||||||
|
#region Theme
|
||||||
|
writer.WriteStartElement("Theme");
|
||||||
|
|
||||||
|
writer.WriteComment("Theme name");
|
||||||
|
writer.WriteElementString("Name", Theme);
|
||||||
|
|
||||||
|
writer.WriteComment("Skin name");
|
||||||
|
writer.WriteElementString("Skin", Skin);
|
||||||
|
|
||||||
|
writer.WriteComment("Name of cover-theme");
|
||||||
|
writer.WriteElementString("Cover", CoverTheme);
|
||||||
|
|
||||||
|
writer.WriteComment("Draw note-lines:" + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
|
writer.WriteElementString("DrawNoteLines", Enum.GetName(typeof(EOffOn), DrawNoteLines));
|
||||||
|
|
||||||
|
writer.WriteComment("Draw tone-helper:" + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
|
writer.WriteElementString("DrawToneHelper", Enum.GetName(typeof(EOffOn), DrawToneHelper));
|
||||||
|
|
||||||
|
writer.WriteComment("Look of timer:" + CHelper.ListStrings(Enum.GetNames(typeof(ETimerLook))));
|
||||||
|
writer.WriteElementString("TimerLook", Enum.GetName(typeof(ETimerLook), TimerLook));
|
||||||
|
|
||||||
|
writer.WriteComment("Information about players on SingScreen:" + CHelper.ListStrings(Enum.GetNames(typeof(EPlayerInfo))));
|
||||||
|
writer.WriteElementString("PlayerInfo", Enum.GetName(typeof(EPlayerInfo), PlayerInfo));
|
||||||
|
|
||||||
|
writer.WriteComment("Fade player-information with lyrics and notebars:" + CHelper.ListStrings(Enum.GetNames(typeof(EFadePlayerInfo))));
|
||||||
|
writer.WriteElementString("FadePlayerInfo", Enum.GetName(typeof(EFadePlayerInfo), FadePlayerInfo));
|
||||||
|
|
||||||
|
writer.WriteComment("Cover Loading:" + CHelper.ListStrings(Enum.GetNames(typeof(ECoverLoading))));
|
||||||
|
writer.WriteElementString("CoverLoading", Enum.GetName(typeof(ECoverLoading), CoverLoading));
|
||||||
|
|
||||||
|
writer.WriteComment("Lyric Style:" + CHelper.ListStrings(Enum.GetNames(typeof(ELyricStyle))));
|
||||||
|
writer.WriteElementString("LyricStyle", Enum.GetName(typeof(ELyricStyle), LyricStyle));
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
#endregion Theme
|
||||||
|
|
||||||
|
#region Sound
|
||||||
|
writer.WriteStartElement("Sound");
|
||||||
|
|
||||||
|
writer.WriteComment("PlayBackLib: " + CHelper.ListStrings(Enum.GetNames(typeof(EPlaybackLib))));
|
||||||
|
writer.WriteElementString("PlayBackLib", Enum.GetName(typeof(EPlaybackLib), PlayBackLib));
|
||||||
|
|
||||||
|
writer.WriteComment("RecordLib: " + CHelper.ListStrings(Enum.GetNames(typeof(ERecordLib))));
|
||||||
|
writer.WriteElementString("RecordLib", Enum.GetName(typeof(ERecordLib), RecordLib));
|
||||||
|
|
||||||
|
writer.WriteComment("AudioBufferSize: " + CHelper.ListStrings(Enum.GetNames(typeof(EBufferSize))));
|
||||||
|
writer.WriteElementString("AudioBufferSize", Enum.GetName(typeof(EBufferSize), AudioBufferSize));
|
||||||
|
|
||||||
|
writer.WriteComment("AudioLatency from -500 to 500 ms");
|
||||||
|
writer.WriteElementString("AudioLatency", AudioLatency.ToString());
|
||||||
|
|
||||||
|
writer.WriteComment("Background Music");
|
||||||
|
writer.WriteElementString("BackgroundMusic", Enum.GetName(typeof(EOffOn), BackgroundMusic));
|
||||||
|
|
||||||
|
writer.WriteComment("Background Music Volume from 0 to 100");
|
||||||
|
writer.WriteElementString("BackgroundMusicVolume", BackgroundMusicVolume.ToString());
|
||||||
|
|
||||||
|
writer.WriteComment("Background Music Source");
|
||||||
|
writer.WriteElementString("BackgroundMusicSource", Enum.GetName(typeof(EBackgroundMusicSource), BackgroundMusicSource));
|
||||||
|
|
||||||
|
writer.WriteComment("Preview Volume from 0 to 100");
|
||||||
|
writer.WriteElementString("PreviewMusicVolume", PreviewMusicVolume.ToString());
|
||||||
|
|
||||||
|
writer.WriteComment("Game Volume from 0 to 100");
|
||||||
|
writer.WriteElementString("GameMusicVolume", GameMusicVolume.ToString());
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
#endregion Sound
|
||||||
|
|
||||||
|
#region Game
|
||||||
|
writer.WriteStartElement("Game");
|
||||||
|
|
||||||
|
writer.WriteComment("Game-Language:");
|
||||||
|
writer.WriteElementString("Language", Language);
|
||||||
|
|
||||||
|
// SongFolder
|
||||||
|
// Check, if program was started with songfolder-parameters
|
||||||
|
if (SongFolderOld.Count > 0)
|
||||||
{
|
{
|
||||||
writer.WriteElementString("SongFolder" + (i + 1).ToString(), SongFolderOld[i]);
|
//Write "old" song-folders to config.
|
||||||
|
writer.WriteComment("SongFolder: SongFolder1, SongFolder2, SongFolder3, ...");
|
||||||
|
for (int i = 0; i < SongFolderOld.Count; i++)
|
||||||
|
{
|
||||||
|
writer.WriteElementString("SongFolder" + (i + 1).ToString(), SongFolderOld[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
|
||||||
{
|
|
||||||
//Write "normal" song-folders to config.
|
|
||||||
writer.WriteComment("SongFolder: SongFolder1, SongFolder2, SongFolder3, ...");
|
|
||||||
for (int i = 0; i < SongFolder.Count; i++)
|
|
||||||
{
|
{
|
||||||
writer.WriteElementString("SongFolder" + (i + 1).ToString(), SongFolder[i]);
|
//Write "normal" song-folders to config.
|
||||||
|
writer.WriteComment("SongFolder: SongFolder1, SongFolder2, SongFolder3, ...");
|
||||||
|
for (int i = 0; i < SongFolder.Count; i++)
|
||||||
|
{
|
||||||
|
writer.WriteElementString("SongFolder" + (i + 1).ToString(), SongFolder[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
writer.WriteComment("SongMenu: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongMenu))));
|
writer.WriteComment("SongMenu: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongMenu))));
|
||||||
writer.WriteElementString("SongMenu", Enum.GetName(typeof(ESongMenu), SongMenu));
|
writer.WriteElementString("SongMenu", Enum.GetName(typeof(ESongMenu), SongMenu));
|
||||||
|
|
||||||
writer.WriteComment("SongSorting: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongSorting))));
|
writer.WriteComment("SongSorting: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongSorting))));
|
||||||
writer.WriteElementString("SongSorting", Enum.GetName(typeof(ESongSorting), SongSorting));
|
writer.WriteElementString("SongSorting", Enum.GetName(typeof(ESongSorting), SongSorting));
|
||||||
|
|
||||||
writer.WriteComment("Ignore articles on song-sorting: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
writer.WriteComment("Ignore articles on song-sorting: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
writer.WriteElementString("IgnoreArticles", Enum.GetName(typeof(EOffOn), IgnoreArticles));
|
writer.WriteElementString("IgnoreArticles", Enum.GetName(typeof(EOffOn), IgnoreArticles));
|
||||||
|
|
||||||
writer.WriteComment("ScoreAnimationTime: Values >= 1 or 0 for no animation. Time is in seconds.");
|
writer.WriteComment("ScoreAnimationTime: Values >= 1 or 0 for no animation. Time is in seconds.");
|
||||||
writer.WriteElementString("ScoreAnimationTime", ScoreAnimationTime.ToString());
|
writer.WriteElementString("ScoreAnimationTime", ScoreAnimationTime.ToString());
|
||||||
|
|
||||||
writer.WriteComment("TimerMode: " + CHelper.ListStrings(Enum.GetNames(typeof(ETimerMode))));
|
writer.WriteComment("TimerMode: " + CHelper.ListStrings(Enum.GetNames(typeof(ETimerMode))));
|
||||||
writer.WriteElementString("TimerMode", Enum.GetName(typeof(ETimerMode), TimerMode));
|
writer.WriteElementString("TimerMode", Enum.GetName(typeof(ETimerMode), TimerMode));
|
||||||
|
|
||||||
writer.WriteComment("NumPlayer: 1.." + CSettings.MaxNumPlayer.ToString());
|
writer.WriteComment("NumPlayer: 1.." + CSettings.MaxNumPlayer.ToString());
|
||||||
writer.WriteElementString("NumPlayer", NumPlayer.ToString());
|
writer.WriteElementString("NumPlayer", NumPlayer.ToString());
|
||||||
|
|
||||||
writer.WriteComment("Order songs in tabs: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
writer.WriteComment("Order songs in tabs: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
writer.WriteElementString("Tabs", Enum.GetName(typeof(EOffOn), Tabs));
|
writer.WriteElementString("Tabs", Enum.GetName(typeof(EOffOn), Tabs));
|
||||||
|
|
||||||
writer.WriteComment("Lyrics also on Top of screen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
writer.WriteComment("Lyrics also on Top of screen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
writer.WriteElementString("LyricsOnTop", Enum.GetName(typeof(EOffOn), LyricsOnTop));
|
writer.WriteElementString("LyricsOnTop", Enum.GetName(typeof(EOffOn), LyricsOnTop));
|
||||||
|
|
||||||
writer.WriteComment("MinLineBreakTime: Value >= 0 in s. Minimum time the text is shown before it is to be sung");
|
writer.WriteComment("MinLineBreakTime: Value >= 0 in s. Minimum time the text is shown before it is to be sung");
|
||||||
writer.WriteElementString("MinLineBreakTime", MinLineBreakTime.ToString());
|
writer.WriteElementString("MinLineBreakTime", MinLineBreakTime.ToString());
|
||||||
|
|
||||||
writer.WriteComment("Default profile for players 1..." + CSettings.MaxNumPlayer.ToString() + ":");
|
writer.WriteComment("Default profile for players 1..." + CSettings.MaxNumPlayer.ToString() + ":");
|
||||||
writer.WriteStartElement("Players");
|
writer.WriteStartElement("Players");
|
||||||
for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
|
for (int i = 1; i <= CSettings.MaxNumPlayer; i++)
|
||||||
{
|
|
||||||
writer.WriteElementString("Player" + i.ToString(), Path.GetFileName(Players[i - 1]));
|
|
||||||
}
|
|
||||||
writer.WriteEndElement();
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
|
||||||
#endregion Game
|
|
||||||
|
|
||||||
#region Video
|
|
||||||
writer.WriteStartElement("Video");
|
|
||||||
|
|
||||||
writer.WriteComment("VideoDecoder: " + CHelper.ListStrings(Enum.GetNames(typeof(EVideoDecoder))));
|
|
||||||
writer.WriteElementString("VideoDecoder", Enum.GetName(typeof(EVideoDecoder), VideoDecoder));
|
|
||||||
|
|
||||||
writer.WriteComment("VideoBackgrounds: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
|
||||||
writer.WriteElementString("VideoBackgrounds", Enum.GetName(typeof(EOffOn), VideoBackgrounds));
|
|
||||||
|
|
||||||
writer.WriteComment("VideoPreview: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
|
||||||
writer.WriteElementString("VideoPreview", Enum.GetName(typeof(EOffOn), VideoPreview));
|
|
||||||
|
|
||||||
writer.WriteComment("Show Videos while singing: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
|
||||||
writer.WriteElementString("VideosInSongs", Enum.GetName(typeof(EOffOn), VideosInSongs));
|
|
||||||
|
|
||||||
writer.WriteComment("Show backgroundmusic videos as background: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
|
||||||
writer.WriteElementString("VideosToBackground", Enum.GetName(typeof(EOffOn), VideosToBackground));
|
|
||||||
|
|
||||||
writer.WriteComment("WebcamLib: " + CHelper.ListStrings(Enum.GetNames(typeof(EWebcamLib))));
|
|
||||||
writer.WriteElementString("WebcamLib", Enum.GetName(typeof(EWebcamLib), WebcamLib));
|
|
||||||
|
|
||||||
writer.WriteStartElement("WebcamConfig");
|
|
||||||
|
|
||||||
writer.WriteElementString("MonikerString", WebcamConfig.MonikerString);
|
|
||||||
writer.WriteElementString("Framerate", WebcamConfig.Framerate.ToString());
|
|
||||||
writer.WriteElementString("Width", WebcamConfig.Width.ToString());
|
|
||||||
writer.WriteElementString("Height", WebcamConfig.Height.ToString());
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
|
||||||
#endregion Video
|
|
||||||
|
|
||||||
#region Record
|
|
||||||
writer.WriteStartElement("Record");
|
|
||||||
|
|
||||||
for (int p = 1; p <= CSettings.MaxNumPlayer; p++)
|
|
||||||
{
|
|
||||||
if (MicConfig[p - 1].DeviceName != String.Empty && MicConfig[p - 1].InputName != String.Empty && MicConfig[p - 1].Channel > 0)
|
|
||||||
{
|
{
|
||||||
writer.WriteStartElement("MicConfig" + p.ToString());
|
writer.WriteElementString("Player" + i.ToString(), Path.GetFileName(Players[i - 1]));
|
||||||
|
|
||||||
writer.WriteElementString("DeviceName", MicConfig[p - 1].DeviceName);
|
|
||||||
writer.WriteElementString("DeviceDriver", MicConfig[p - 1].DeviceDriver);
|
|
||||||
writer.WriteElementString("InputName", MicConfig[p - 1].InputName);
|
|
||||||
writer.WriteElementString("Channel", MicConfig[p - 1].Channel.ToString());
|
|
||||||
|
|
||||||
writer.WriteEndElement();
|
|
||||||
}
|
}
|
||||||
|
writer.WriteEndElement();
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
#endregion Game
|
||||||
|
|
||||||
|
#region Video
|
||||||
|
writer.WriteStartElement("Video");
|
||||||
|
|
||||||
|
writer.WriteComment("VideoDecoder: " + CHelper.ListStrings(Enum.GetNames(typeof(EVideoDecoder))));
|
||||||
|
writer.WriteElementString("VideoDecoder", Enum.GetName(typeof(EVideoDecoder), VideoDecoder));
|
||||||
|
|
||||||
|
writer.WriteComment("VideoBackgrounds: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
|
writer.WriteElementString("VideoBackgrounds", Enum.GetName(typeof(EOffOn), VideoBackgrounds));
|
||||||
|
|
||||||
|
writer.WriteComment("VideoPreview: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
|
writer.WriteElementString("VideoPreview", Enum.GetName(typeof(EOffOn), VideoPreview));
|
||||||
|
|
||||||
|
writer.WriteComment("Show Videos while singing: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
|
writer.WriteElementString("VideosInSongs", Enum.GetName(typeof(EOffOn), VideosInSongs));
|
||||||
|
|
||||||
|
writer.WriteComment("Show backgroundmusic videos as background: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||||
|
writer.WriteElementString("VideosToBackground", Enum.GetName(typeof(EOffOn), VideosToBackground));
|
||||||
|
|
||||||
|
writer.WriteComment("WebcamLib: " + CHelper.ListStrings(Enum.GetNames(typeof(EWebcamLib))));
|
||||||
|
writer.WriteElementString("WebcamLib", Enum.GetName(typeof(EWebcamLib), WebcamLib));
|
||||||
|
|
||||||
|
writer.WriteStartElement("WebcamConfig");
|
||||||
|
|
||||||
|
writer.WriteElementString("MonikerString", WebcamConfig.MonikerString);
|
||||||
|
writer.WriteElementString("Framerate", WebcamConfig.Framerate.ToString());
|
||||||
|
writer.WriteElementString("Width", WebcamConfig.Width.ToString());
|
||||||
|
writer.WriteElementString("Height", WebcamConfig.Height.ToString());
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
#endregion Video
|
||||||
|
|
||||||
|
#region Record
|
||||||
|
writer.WriteStartElement("Record");
|
||||||
|
|
||||||
|
for (int p = 1; p <= CSettings.MaxNumPlayer; p++)
|
||||||
|
{
|
||||||
|
if (MicConfig[p - 1].DeviceName != String.Empty && MicConfig[p - 1].InputName != String.Empty && MicConfig[p - 1].Channel > 0)
|
||||||
|
{
|
||||||
|
writer.WriteStartElement("MicConfig" + p.ToString());
|
||||||
|
|
||||||
|
writer.WriteElementString("DeviceName", MicConfig[p - 1].DeviceName);
|
||||||
|
writer.WriteElementString("DeviceDriver", MicConfig[p - 1].DeviceDriver);
|
||||||
|
writer.WriteElementString("InputName", MicConfig[p - 1].InputName);
|
||||||
|
writer.WriteElementString("Channel", MicConfig[p - 1].Channel.ToString());
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
writer.WriteComment("Mic delay in ms. 0, 20, 40, 60 ... 500");
|
||||||
|
writer.WriteElementString("MicDelay", MicDelay.ToString());
|
||||||
|
|
||||||
|
writer.WriteEndElement();
|
||||||
|
#endregion Record
|
||||||
|
|
||||||
|
// End of File
|
||||||
|
writer.WriteEndElement(); //end of root
|
||||||
|
writer.WriteEndDocument();
|
||||||
|
writer.Flush();
|
||||||
|
writer.Close();
|
||||||
}
|
}
|
||||||
|
catch (Exception)
|
||||||
writer.WriteComment("Mic delay in ms. 0, 20, 40, 60 ... 500");
|
{
|
||||||
writer.WriteElementString("MicDelay", MicDelay.ToString());
|
writer = null;
|
||||||
|
return false;
|
||||||
writer.WriteEndElement();
|
}
|
||||||
#endregion Record
|
writer = null;
|
||||||
|
|
||||||
// End of File
|
|
||||||
writer.WriteEndElement(); //end of root
|
|
||||||
writer.WriteEndDocument();
|
|
||||||
|
|
||||||
writer.Flush();
|
|
||||||
writer.Close();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+64
-74
@@ -1439,90 +1439,80 @@ namespace Vocaluxe.Base
|
|||||||
if (File.Exists(ImagePath))
|
if (File.Exists(ImagePath))
|
||||||
{
|
{
|
||||||
|
|
||||||
SQLiteConnection connection = new SQLiteConnection();
|
using (SQLiteConnection connection = new SQLiteConnection())
|
||||||
connection.ConnectionString = "Data Source=" + _CreditsRessourcesFilePath;
|
|
||||||
SQLiteCommand command;
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
connection.Open();
|
connection.ConnectionString = "Data Source=" + _CreditsRessourcesFilePath;
|
||||||
}
|
try
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
command = new SQLiteCommand(connection);
|
|
||||||
|
|
||||||
SQLiteDataReader reader = null;
|
|
||||||
|
|
||||||
if (reader != null)
|
|
||||||
reader.Close();
|
|
||||||
|
|
||||||
Bitmap origin;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
origin = new Bitmap(ImagePath);
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
CLog.LogError("Error loading Texture: " + ImagePath);
|
|
||||||
tex = new STexture(-1);
|
|
||||||
|
|
||||||
if (reader != null)
|
|
||||||
{
|
{
|
||||||
reader.Close();
|
connection.Open();
|
||||||
reader.Dispose();
|
|
||||||
}
|
}
|
||||||
command.Dispose();
|
catch (Exception)
|
||||||
connection.Close();
|
{
|
||||||
connection.Dispose();
|
return false;
|
||||||
|
}
|
||||||
|
using (SQLiteCommand command = new SQLiteCommand(connection))
|
||||||
|
{
|
||||||
|
|
||||||
return false;
|
Bitmap origin;
|
||||||
}
|
try
|
||||||
|
{
|
||||||
|
origin = new Bitmap(ImagePath);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
CLog.LogError("Error loading Texture: " + ImagePath);
|
||||||
|
tex = new STexture(-1);
|
||||||
|
|
||||||
int w = origin.Width;
|
connection.Close();
|
||||||
int h = origin.Height;
|
|
||||||
|
|
||||||
Bitmap bmp = new Bitmap(w, h);
|
return false;
|
||||||
Graphics g = Graphics.FromImage(bmp);
|
}
|
||||||
g.DrawImage(origin, new Rectangle(0, 0, w, h));
|
|
||||||
g.Dispose();
|
|
||||||
if (origin != null)
|
|
||||||
origin.Dispose();
|
|
||||||
tex = CDraw.AddTexture(bmp);
|
|
||||||
byte[] data = new byte[w * h * 4];
|
|
||||||
|
|
||||||
BitmapData bmp_data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
int w = origin.Width;
|
||||||
Marshal.Copy(bmp_data.Scan0, data, 0, w * h * 4);
|
int h = origin.Height;
|
||||||
bmp.UnlockBits(bmp_data);
|
|
||||||
bmp.Dispose();
|
|
||||||
|
|
||||||
command.CommandText = "INSERT INTO Images (Path, width, height) " +
|
Bitmap bmp = new Bitmap(w, h);
|
||||||
"VALUES (@path, " + w.ToString() + ", " + h.ToString() + ")";
|
Graphics g = Graphics.FromImage(bmp);
|
||||||
command.Parameters.Add("@path", System.Data.DbType.String, 0).Value = Path.GetFileName(ImagePath);
|
g.DrawImage(origin, new Rectangle(0, 0, w, h));
|
||||||
command.ExecuteNonQuery();
|
g.Dispose();
|
||||||
|
origin.Dispose();
|
||||||
|
tex = CDraw.AddTexture(bmp);
|
||||||
|
byte[] data = new byte[w * h * 4];
|
||||||
|
|
||||||
command.CommandText = "SELECT id FROM Images WHERE [Path] = @path";
|
BitmapData bmp_data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
|
||||||
command.Parameters.Add("@path", System.Data.DbType.String, 0).Value = Path.GetFileName(ImagePath);
|
Marshal.Copy(bmp_data.Scan0, data, 0, w * h * 4);
|
||||||
reader = null;
|
bmp.UnlockBits(bmp_data);
|
||||||
try
|
bmp.Dispose();
|
||||||
{
|
|
||||||
reader = command.ExecuteReader();
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reader != null)
|
command.CommandText = "INSERT INTO Images (Path, width, height) " +
|
||||||
{
|
"VALUES (@path, " + w.ToString() + ", " + h.ToString() + ")";
|
||||||
reader.Read();
|
command.Parameters.Add("@path", System.Data.DbType.String, 0).Value = Path.GetFileName(ImagePath);
|
||||||
int id = reader.GetInt32(0);
|
command.ExecuteNonQuery();
|
||||||
reader.Close();
|
|
||||||
command.CommandText = "INSERT INTO ImageData (ImageID, Data) " +
|
command.CommandText = "SELECT id FROM Images WHERE [Path] = @path";
|
||||||
"VALUES ('" + id.ToString() + "', @data)";
|
command.Parameters.Add("@path", System.Data.DbType.String, 0).Value = Path.GetFileName(ImagePath);
|
||||||
command.Parameters.Add("@data", System.Data.DbType.Binary, 20).Value = data;
|
SQLiteDataReader reader = null;
|
||||||
command.ExecuteReader();
|
try
|
||||||
result = true;
|
{
|
||||||
|
reader = command.ExecuteReader();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reader != null)
|
||||||
|
{
|
||||||
|
reader.Read();
|
||||||
|
int id = reader.GetInt32(0);
|
||||||
|
reader.Close();
|
||||||
|
command.CommandText = "INSERT INTO ImageData (ImageID, Data) " +
|
||||||
|
"VALUES ('" + id.ToString() + "', @data)";
|
||||||
|
command.Parameters.Add("@data", System.Data.DbType.Binary, 20).Value = data;
|
||||||
|
command.ExecuteReader();
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+12
-2
@@ -135,11 +135,11 @@ namespace Vocaluxe.Base
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CFont
|
class CFont:IDisposable
|
||||||
{
|
{
|
||||||
private List<CGlyph> _Glyphs;
|
private List<CGlyph> _Glyphs;
|
||||||
private Hashtable _htGlyphs;
|
private Hashtable _htGlyphs;
|
||||||
private PrivateFontCollection fonts;
|
private PrivateFontCollection fonts = null;
|
||||||
private FontFamily family;
|
private FontFamily family;
|
||||||
private float SIZEh;
|
private float SIZEh;
|
||||||
|
|
||||||
@@ -268,6 +268,16 @@ namespace Vocaluxe.Base
|
|||||||
}
|
}
|
||||||
_Glyphs.Clear();
|
_Glyphs.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (fonts != null)
|
||||||
|
{
|
||||||
|
fonts.Dispose();
|
||||||
|
fonts = null;
|
||||||
|
}
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SFont
|
struct SFont
|
||||||
|
|||||||
+12
-2
@@ -6,11 +6,11 @@ using System.Text;
|
|||||||
|
|
||||||
namespace Vocaluxe.Base
|
namespace Vocaluxe.Base
|
||||||
{
|
{
|
||||||
class Log
|
class Log:IDisposable
|
||||||
{
|
{
|
||||||
private string _LogFileName;
|
private string _LogFileName;
|
||||||
private string _LogName;
|
private string _LogName;
|
||||||
private StreamWriter _LogFile;
|
private StreamWriter _LogFile = null;
|
||||||
|
|
||||||
public Log(string FileName, string LogName)
|
public Log(string FileName, string LogName)
|
||||||
{
|
{
|
||||||
@@ -56,6 +56,16 @@ namespace Vocaluxe.Base
|
|||||||
_LogFile.WriteLine("----------------------------------------");
|
_LogFile.WriteLine("----------------------------------------");
|
||||||
_LogFile.WriteLine();
|
_LogFile.WriteLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (_LogFile != null)
|
||||||
|
{
|
||||||
|
_LogFile.Dispose();
|
||||||
|
_LogFile = null;
|
||||||
|
}
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static class CLog
|
static class CLog
|
||||||
|
|||||||
+1
-13
@@ -605,23 +605,11 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public CSong GetVisibleSong(int VisibleIndex)
|
public CSong GetVisibleSong(int VisibleIndex)
|
||||||
{
|
{
|
||||||
if (VisibleIndex >= CSongs.NumVisibleSongs)
|
return CSongs.GetVisibleSongByIndex(VisibleIndex);
|
||||||
return null;
|
|
||||||
|
|
||||||
CSong song = CSongs.VisibleSongs[VisibleIndex];
|
|
||||||
//Flamefire: Why copy the song-instance??? Cover and stuff will be loaded twice!
|
|
||||||
//And for unknown reason causes no-big-cover bug if covers are not loaded on startup
|
|
||||||
return song;
|
|
||||||
//if (song == null)
|
|
||||||
// return null;
|
|
||||||
|
|
||||||
//return new CSong(song);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public CSong GetSongByID(int SongID)
|
public CSong GetSongByID(int SongID)
|
||||||
{
|
{
|
||||||
//Flamefire: Why copy?
|
|
||||||
//return new CSong(CSongs.GetSong(SongID));
|
|
||||||
return CSongs.GetSong(SongID);
|
return CSongs.GetSong(SongID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -381,6 +381,23 @@ namespace Vocaluxe.Base
|
|||||||
get { return _Categories.ToArray(); }
|
get { return _Categories.ToArray(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static CSong GetVisibleSongByIndex(int index)
|
||||||
|
{
|
||||||
|
if (index < 0)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
foreach (SongPointer sp in _SongsSortList)
|
||||||
|
{
|
||||||
|
if (sp.Visible)
|
||||||
|
{
|
||||||
|
if (index == 0)
|
||||||
|
return _Songs[sp.SongID];
|
||||||
|
index--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private static void _FilterSongs(String SearchFilter, bool ShowDuetSongs)
|
private static void _FilterSongs(String SearchFilter, bool ShowDuetSongs)
|
||||||
{
|
{
|
||||||
if (_Init && _SearchFilter == SearchFilter && _ShowDuetSongs == ShowDuetSongs)
|
if (_Init && _SearchFilter == SearchFilter && _ShowDuetSongs == ShowDuetSongs)
|
||||||
|
|||||||
+12
-2
@@ -300,7 +300,7 @@ namespace Vocaluxe.Base
|
|||||||
#endregion Record
|
#endregion Record
|
||||||
}
|
}
|
||||||
|
|
||||||
class CBuffer
|
class CBuffer : IDisposable
|
||||||
{
|
{
|
||||||
private const double _BaseToneFreq = 65.4064;
|
private const double _BaseToneFreq = 65.4064;
|
||||||
private const int _NumHalfTones = 47;
|
private const int _NumHalfTones = 47;
|
||||||
@@ -315,7 +315,7 @@ namespace Vocaluxe.Base
|
|||||||
private double _MaxVolume = 0.0;
|
private double _MaxVolume = 0.0;
|
||||||
private bool _NewSamples;
|
private bool _NewSamples;
|
||||||
|
|
||||||
private MemoryStream _Stream; // full buffer
|
private MemoryStream _Stream = null; // full buffer
|
||||||
|
|
||||||
public CBuffer()
|
public CBuffer()
|
||||||
{
|
{
|
||||||
@@ -554,6 +554,16 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
return 1 - AccumDist / _AnalysisBuffer.Length;
|
return 1 - AccumDist / _AnalysisBuffer.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (_Stream != null)
|
||||||
|
{
|
||||||
|
_Stream.Dispose();
|
||||||
|
_Stream = null;
|
||||||
|
}
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CSyncTimer
|
class CSyncTimer
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
using Vocaluxe.Menu;
|
using Vocaluxe.Menu;
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ using Vocaluxe.Menu;
|
|||||||
|
|
||||||
namespace Vocaluxe.Lib.Input.WiiMote
|
namespace Vocaluxe.Lib.Input.WiiMote
|
||||||
{
|
{
|
||||||
class CWiiMote : IInput
|
class CWiiMote : IInput, IDisposable
|
||||||
{
|
{
|
||||||
WiiMoteLib _WiiMote;
|
WiiMoteLib _WiiMote = null;
|
||||||
|
|
||||||
private List<KeyEvent> _KeysPool;
|
private List<KeyEvent> _KeysPool;
|
||||||
private List<KeyEvent> _CurrentKeysPool;
|
private List<KeyEvent> _CurrentKeysPool;
|
||||||
@@ -324,5 +324,15 @@ namespace Vocaluxe.Lib.Input.WiiMote
|
|||||||
_MousePool.Clear();
|
_MousePool.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
if (_WiiMote != null)
|
||||||
|
{
|
||||||
|
_WiiMote.Dispose();
|
||||||
|
_WiiMote = null;
|
||||||
|
}
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
|
|||||||
public struct TAc_decoder
|
public struct TAc_decoder
|
||||||
{
|
{
|
||||||
//Pointer on the Acinerella instance
|
//Pointer on the Acinerella instance
|
||||||
public IntPtr pAcInstance;
|
private IntPtr pAcInstance;
|
||||||
//Contains the type of the decoder.
|
//Contains the type of the decoder.
|
||||||
public TAc_decoder_type dec_type;
|
public TAc_decoder_type dec_type;
|
||||||
|
|
||||||
|
|||||||
@@ -229,6 +229,7 @@
|
|||||||
<Compile Include="Program.cs">
|
<Compile Include="Program.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Screens\CPopupScreenPlayerControl.cs" />
|
<Compile Include="Screens\CPopupScreenPlayerControl.cs" />
|
||||||
<Compile Include="Screens\CPopupScreenVolumeControl.cs" />
|
<Compile Include="Screens\CPopupScreenVolumeControl.cs" />
|
||||||
<Compile Include="Screens\CScreenCredits.cs" />
|
<Compile Include="Screens\CScreenCredits.cs" />
|
||||||
|
|||||||
Reference in new issue
Block a user