Codestyle fixes (Codeanalysis)
This commit is contained in:
1 parent
8b70a42e09
commit
c3cac56e1a
28 files changed
+385
-289
No files matched your search
@@ -77,6 +77,7 @@
|
||||
<OutDir>..\Output\x64\gstreamer\</OutDir>
|
||||
<IncludePath>$(MSBuildProjectDirectory)\x64\lib\glib-2.0\include;$(MSBuildProjectDirectory)\x64\include\gstreamer-1.0;$(MSBuildProjectDirectory)\x64\include\glib-2.0;$(MSBuildProjectDirectory)\x64\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(MSBuildProjectDirectory)\x64\lib;$(LibraryPath)</LibraryPath>
|
||||
<CodeAnalysisRuleSet>..\CheckingRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWin|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
|
||||
Binary file not shown.
@@ -4,6 +4,7 @@ using System.Text;
|
||||
|
||||
using Vocaluxe.Menu;
|
||||
|
||||
[assembly: System.Runtime.InteropServices.ComVisible(false)]
|
||||
namespace Vocaluxe.PartyModes
|
||||
{
|
||||
#region Communication
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -110,6 +111,7 @@
|
||||
<Compile Include="ChallengeRounds.cs">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
<Compile Include="PartyModeChallenge.cs">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
|
||||
Binary file not shown.
@@ -5,6 +5,7 @@ using System.Text;
|
||||
using Vocaluxe.Menu;
|
||||
using Vocaluxe.Menu.SongMenu;
|
||||
|
||||
[assembly: System.Runtime.InteropServices.ComVisible(false)]
|
||||
namespace Vocaluxe.PartyModes
|
||||
{
|
||||
#region Communication
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -110,6 +111,7 @@
|
||||
<Compile Include="ChallengeRounds.cs">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
<Compile Include="PartyModeChallenge.cs">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
|
||||
Binary file not shown.
@@ -4,6 +4,7 @@ using System.Text;
|
||||
|
||||
using Vocaluxe.Menu;
|
||||
|
||||
[assembly: System.Runtime.InteropServices.ComVisible(false)]
|
||||
namespace Vocaluxe.PartyModes
|
||||
{
|
||||
public enum ESongSource
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<CodeAnalysisRuleSet>..\..\CheckingRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ReleaseWin|x64'">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -107,6 +108,7 @@
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
<Compile Include="PartyModeTicTacToe.cs">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Compile>
|
||||
|
||||
+265
-266
@@ -279,276 +279,275 @@ namespace Vocaluxe.Base
|
||||
XmlWriter writer = null;
|
||||
try
|
||||
{
|
||||
using (writer = XmlWriter.Create(CSettings.sFileConfig, _settings))
|
||||
writer = XmlWriter.Create(CSettings.sFileConfig, _settings);
|
||||
writer.WriteStartDocument();
|
||||
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("Background Music use start-tag of songs");
|
||||
writer.WriteElementString("BackgroundMusicUseStart", Enum.GetName(typeof(EOffOn), BackgroundMusicUseStart));
|
||||
|
||||
writer.WriteComment("Preview Volume from 0 to 100");
|
||||
writer.WriteElementString("PreviewMusicVolume", PreviewMusicVolume.ToString());
|
||||
|
||||
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.WriteStartDocument();
|
||||
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("Background Music use start-tag of songs");
|
||||
writer.WriteElementString("BackgroundMusicUseStart", Enum.GetName(typeof(EOffOn), BackgroundMusicUseStart));
|
||||
|
||||
writer.WriteComment("Preview Volume from 0 to 100");
|
||||
writer.WriteElementString("PreviewMusicVolume", PreviewMusicVolume.ToString());
|
||||
|
||||
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.WriteComment("SongFolder: SongFolder1, SongFolder2, SongFolder3, ...");
|
||||
for (int i = 0; i < SongFolderOld.Count; 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]);
|
||||
}
|
||||
writer.WriteElementString("SongFolder" + (i + 1).ToString(), SongFolderOld[i]);
|
||||
}
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
writer.WriteComment("SongMenu: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongMenu))));
|
||||
writer.WriteElementString("SongMenu", Enum.GetName(typeof(ESongMenu), SongMenu));
|
||||
|
||||
writer.WriteComment("SongSorting: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongSorting))));
|
||||
writer.WriteElementString("SongSorting", Enum.GetName(typeof(ESongSorting), SongSorting));
|
||||
|
||||
writer.WriteComment("Ignore articles on song-sorting: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||
writer.WriteElementString("IgnoreArticles", Enum.GetName(typeof(EOffOn), IgnoreArticles));
|
||||
|
||||
writer.WriteComment("ScoreAnimationTime: Values >= 1 or 0 for no animation. Time is in seconds.");
|
||||
writer.WriteElementString("ScoreAnimationTime", ScoreAnimationTime.ToString());
|
||||
|
||||
writer.WriteComment("TimerMode: " + CHelper.ListStrings(Enum.GetNames(typeof(ETimerMode))));
|
||||
writer.WriteElementString("TimerMode", Enum.GetName(typeof(ETimerMode), TimerMode));
|
||||
|
||||
writer.WriteComment("NumPlayer: 1.." + CSettings.MaxNumPlayer.ToString());
|
||||
writer.WriteElementString("NumPlayer", NumPlayer.ToString());
|
||||
|
||||
writer.WriteComment("Order songs in tabs: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||
writer.WriteElementString("Tabs", Enum.GetName(typeof(EOffOn), Tabs));
|
||||
|
||||
writer.WriteComment("Lyrics also on Top of screen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||
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.WriteElementString("MinLineBreakTime", MinLineBreakTime.ToString());
|
||||
|
||||
writer.WriteComment("Default profile for players 1..." + CSettings.MaxNumPlayer.ToString() + ":");
|
||||
writer.WriteStartElement("Players");
|
||||
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.Length > 0 && MicConfig[p - 1].InputName.Length > 0 && 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();
|
||||
}
|
||||
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]);
|
||||
}
|
||||
}
|
||||
|
||||
writer.WriteComment("SongMenu: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongMenu))));
|
||||
writer.WriteElementString("SongMenu", Enum.GetName(typeof(ESongMenu), SongMenu));
|
||||
|
||||
writer.WriteComment("SongSorting: " + CHelper.ListStrings(Enum.GetNames(typeof(ESongSorting))));
|
||||
writer.WriteElementString("SongSorting", Enum.GetName(typeof(ESongSorting), SongSorting));
|
||||
|
||||
writer.WriteComment("Ignore articles on song-sorting: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||
writer.WriteElementString("IgnoreArticles", Enum.GetName(typeof(EOffOn), IgnoreArticles));
|
||||
|
||||
writer.WriteComment("ScoreAnimationTime: Values >= 1 or 0 for no animation. Time is in seconds.");
|
||||
writer.WriteElementString("ScoreAnimationTime", ScoreAnimationTime.ToString());
|
||||
|
||||
writer.WriteComment("TimerMode: " + CHelper.ListStrings(Enum.GetNames(typeof(ETimerMode))));
|
||||
writer.WriteElementString("TimerMode", Enum.GetName(typeof(ETimerMode), TimerMode));
|
||||
|
||||
writer.WriteComment("NumPlayer: 1.." + CSettings.MaxNumPlayer.ToString());
|
||||
writer.WriteElementString("NumPlayer", NumPlayer.ToString());
|
||||
|
||||
writer.WriteComment("Order songs in tabs: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||
writer.WriteElementString("Tabs", Enum.GetName(typeof(EOffOn), Tabs));
|
||||
|
||||
writer.WriteComment("Lyrics also on Top of screen: " + CHelper.ListStrings(Enum.GetNames(typeof(EOffOn))));
|
||||
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.WriteElementString("MinLineBreakTime", MinLineBreakTime.ToString());
|
||||
|
||||
writer.WriteComment("Default profile for players 1..." + CSettings.MaxNumPlayer.ToString() + ":");
|
||||
writer.WriteStartElement("Players");
|
||||
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.Length > 0 && MicConfig[p - 1].InputName.Length > 0 && 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();
|
||||
writer = null;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,6 @@ namespace Vocaluxe.Base
|
||||
private static bool _CoverLoaded = false;
|
||||
private static int _CoverLoadIndex = 0;
|
||||
private static int _CatIndex = -1;
|
||||
private static bool _Init = false;
|
||||
private static List<CCategory> _CategoriesForRandom = new List<CCategory>();
|
||||
|
||||
private static Stopwatch _CoverLoadTimer = new Stopwatch();
|
||||
|
||||
@@ -15,3 +15,16 @@
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Objekte verwerfen, bevor Bereich verloren geht", Scope = "member", Target = "Vocaluxe.Lib.Draw.CDirect3D.#AddTexture(System.Drawing.Bitmap,System.String)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Objekte verwerfen, bevor Bereich verloren geht", Scope = "member", Target = "Vocaluxe.Lib.Draw.CDirect3D.#AddTexture(System.Int32,System.Int32,System.Byte[]&)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Objekte verwerfen, bevor Bereich verloren geht", Scope = "member", Target = "Vocaluxe.Lib.Draw.CDirect3D.#CopyScreen()")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope = "type", Target = "Vocaluxe.Lib.Input.WiiMote.InputReport")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope = "type", Target = "PortAudioSharp.PortAudio+PaDeviceIndex")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope = "type", Target = "PortAudioSharp.PortAudio+PaSampleFormat")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope = "type", Target = "PortAudioSharp.PortAudio+PaStreamCallbackFlags")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Scope = "member", Target = "Vocaluxe.Lib.Video.Gstreamer.CGstreamerVideoWrapper.#GetFrame(System.Int32,System.Single)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Scope = "member", Target = "Vocaluxe.Lib.Input.CHIDAPI.#ReadTimeout(System.IntPtr,System.Byte[]&,System.Int32,System.Int32)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Scope = "member", Target = "Vocaluxe.Lib.Input.CHIDAPI.#Read(System.IntPtr,System.Byte[]&,System.Int32)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Scope = "member", Target = "PortAudioSharp.PortAudio.#Pa_GetVersionText()")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Scope = "member", Target = "PortAudioSharp.PortAudio.#Pa_GetErrorText(PortAudioSharp.PortAudio+PaError)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Scope = "member", Target = "PortAudioSharp.PortAudio.#Pa_GetHostApiInfo(System.Int32)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Scope = "member", Target = "PortAudioSharp.PortAudio.#Pa_GetLastHostErrorInfo()")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Scope = "member", Target = "PortAudioSharp.PortAudio.#Pa_GetDeviceInfo(System.Int32)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands", Scope = "member", Target = "PortAudioSharp.PortAudio.#Pa_GetStreamInfo(System.IntPtr)")]
|
||||
@@ -22,7 +22,7 @@ namespace Vocaluxe.Lib.Input
|
||||
public ushort UsagePage;
|
||||
public ushort Usage;
|
||||
public int InterfaceNumber;
|
||||
public IntPtr Next;
|
||||
internal IntPtr Next;
|
||||
}
|
||||
public static class CHIDAPI
|
||||
{
|
||||
|
||||
@@ -23,7 +23,8 @@ namespace Vocaluxe.Lib.Sound
|
||||
{
|
||||
Init();
|
||||
Log = new CGstreamerAudioWrapper.LogCallback(LogHandler);
|
||||
GC.SuppressFinalize(Log);
|
||||
//Is this really needed? CodaAnalyzer complains about it...
|
||||
//GC.SuppressFinalize(Log);
|
||||
CGstreamerAudioWrapper.SetLogCallback(Log);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ using Vocaluxe.Lib.Sound.Decoder;
|
||||
|
||||
namespace Vocaluxe.Lib.Sound
|
||||
{
|
||||
class COpenALPlay : IPlayback
|
||||
class COpenALPlay : IPlayback, IDisposable
|
||||
{
|
||||
private bool _Initialized = false;
|
||||
private List<OpenAlStream> _Decoder = new List<OpenAlStream>();
|
||||
@@ -397,9 +397,15 @@ namespace Vocaluxe.Lib.Sound
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
AC.Dispose();
|
||||
AC = null;
|
||||
}
|
||||
}
|
||||
|
||||
class OpenAlStream
|
||||
class OpenAlStream: IDisposable
|
||||
{
|
||||
const int buffer_size = 2048;
|
||||
const int buffer_count = 5;
|
||||
@@ -913,6 +919,12 @@ namespace Vocaluxe.Lib.Sound
|
||||
_Timer.Reset();
|
||||
_Timer.Start();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
EventDecode.Close();
|
||||
EventDecode = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ namespace Vocaluxe.Lib.Sound
|
||||
}
|
||||
}
|
||||
|
||||
class PortAudioStream
|
||||
class PortAudioStream: IDisposable
|
||||
{
|
||||
const long BUFSIZE = 1000000L;
|
||||
const long BEGINREFILL = 800000L;
|
||||
@@ -452,6 +452,11 @@ namespace Vocaluxe.Lib.Sound
|
||||
_DecoderThread = new Thread(Execute);
|
||||
}
|
||||
|
||||
~PortAudioStream()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
public void Free(CLOSEPROC close_proc, int StreamID)
|
||||
{
|
||||
_Closeproc = close_proc;
|
||||
@@ -981,5 +986,15 @@ namespace Vocaluxe.Lib.Sound
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (EventDecode != null)
|
||||
{
|
||||
EventDecode.Close();
|
||||
EventDecode = null;
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ using Vocaluxe.Lib.Video.Acinerella;
|
||||
|
||||
namespace Vocaluxe.Lib.Sound.Decoder
|
||||
{
|
||||
class CAudioDecoderFFmpeg: CAudioDecoder
|
||||
class CAudioDecoderFFmpeg: CAudioDecoder, IDisposable
|
||||
{
|
||||
private TAc_read_callback _rc;
|
||||
private TAc_seek_callback _sc;
|
||||
@@ -219,5 +219,11 @@ namespace Vocaluxe.Lib.Sound.Decoder
|
||||
return (Int64)_fs.Seek((long)pos, (SeekOrigin)whence);
|
||||
}
|
||||
#endregion Callbacks
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_fs.Dispose();
|
||||
_fs = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ namespace Vocaluxe.Lib.Sound.Gstreamer
|
||||
public static extern void SetLogCallback(LogCallback c);
|
||||
|
||||
[DllImport(Dll)]
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static extern bool Init();
|
||||
|
||||
[DllImport(Dll)]
|
||||
@@ -41,7 +42,8 @@ namespace Vocaluxe.Lib.Sound.Gstreamer
|
||||
public static extern int Load(string Media);
|
||||
|
||||
[DllImport(Dll, EntryPoint="LoadPrescan")]
|
||||
public static extern int Load(string Media, bool Prescan);
|
||||
public static extern int Load(string Media,
|
||||
[MarshalAs(UnmanagedType.U1)] bool Prescan);
|
||||
|
||||
[DllImport(Dll)]
|
||||
public static extern void Close(int Stream);
|
||||
@@ -50,7 +52,8 @@ namespace Vocaluxe.Lib.Sound.Gstreamer
|
||||
public static extern void Play(int Stream);
|
||||
|
||||
[DllImport(Dll, EntryPoint="PlayLoop")]
|
||||
public static extern void Play(int Stream, bool Loop);
|
||||
public static extern void Play(int Stream,
|
||||
[MarshalAs(UnmanagedType.U1)] bool Loop);
|
||||
|
||||
[DllImport(Dll)]
|
||||
public static extern void Pause(int Stream);
|
||||
@@ -80,12 +83,15 @@ namespace Vocaluxe.Lib.Sound.Gstreamer
|
||||
public static extern float GetPosition(int Stream);
|
||||
|
||||
[DllImport(Dll)]
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static extern bool IsPlaying(int Stream);
|
||||
|
||||
[DllImport(Dll)]
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static extern bool IsPaused(int Stream);
|
||||
|
||||
[DllImport(Dll)]
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static extern bool IsFinished(int Stream);
|
||||
|
||||
[DllImport(Dll)]
|
||||
|
||||
@@ -159,7 +159,7 @@ namespace PortAudioSharp {
|
||||
public int channelCount;
|
||||
public PaSampleFormat sampleFormat;
|
||||
public double suggestedLatency;
|
||||
public IntPtr hostApiSpecificStreamInfo;
|
||||
internal IntPtr hostApiSpecificStreamInfo;
|
||||
|
||||
public override string ToString() {
|
||||
return "[" + this.GetType().Name + "]" + "\n"
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
|
||||
public Int32 stream_index;
|
||||
|
||||
//Pointer to the buffer which contains the data.
|
||||
public IntPtr buffer;
|
||||
internal IntPtr buffer;
|
||||
//Size of the data in the buffer.
|
||||
public Int32 buffer_size;
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ namespace Vocaluxe.Lib.Video
|
||||
public bool displayed;
|
||||
}
|
||||
|
||||
class Decoder
|
||||
class Decoder: IDisposable
|
||||
{
|
||||
private IntPtr _instance = IntPtr.Zero; // acinerella instance
|
||||
private IntPtr _videodecoder = IntPtr.Zero; // acinerella video decoder instance
|
||||
@@ -804,5 +804,11 @@ namespace Vocaluxe.Lib.Video
|
||||
return (Int64)_fs.Seek((long)pos, (SeekOrigin)whence);
|
||||
}
|
||||
#endregion Callbacks
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_fs.Dispose();
|
||||
_fs = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,8 @@ namespace Vocaluxe.Lib.Video
|
||||
{
|
||||
bool retval = CGstreamerVideoWrapper.InitVideo();
|
||||
Log = new CGstreamerVideoWrapper.LogCallback(LogHandler);
|
||||
GC.SuppressFinalize(Log);
|
||||
//Really needed? CodeAnalysis complains
|
||||
//GC.SuppressFinalize(Log);
|
||||
CGstreamerVideoWrapper.SetVideoLogCallback(Log);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Text;
|
||||
namespace Vocaluxe.Lib.Video.Gstreamer
|
||||
{
|
||||
public struct NativeFrame {
|
||||
public IntPtr buffer;
|
||||
internal IntPtr buffer;
|
||||
public int Size;
|
||||
public int Width;
|
||||
public int Height;
|
||||
@@ -43,6 +43,7 @@ namespace Vocaluxe.Lib.Video.Gstreamer
|
||||
public static extern void SetVideoLogCallback(LogCallback c);
|
||||
|
||||
[DllImport(Dll)]
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static extern bool InitVideo();
|
||||
|
||||
[DllImport(Dll)]
|
||||
@@ -52,6 +53,7 @@ namespace Vocaluxe.Lib.Video.Gstreamer
|
||||
public static extern int LoadVideo(string VideoFileName);
|
||||
|
||||
[DllImport(Dll)]
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static extern bool CloseVideo(int StreamID);
|
||||
|
||||
[DllImport(Dll)]
|
||||
@@ -86,10 +88,12 @@ namespace Vocaluxe.Lib.Video.Gstreamer
|
||||
}
|
||||
|
||||
[DllImport(Dll)]
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static extern bool Skip(int StreamID, float Start, float Gap);
|
||||
|
||||
[DllImport(Dll)]
|
||||
public static extern void SetVideoLoop(int StreamID, bool Loop);
|
||||
public static extern void SetVideoLoop(int StreamID,
|
||||
[MarshalAs(UnmanagedType.U1)] bool Loop);
|
||||
|
||||
[DllImport(Dll)]
|
||||
public static extern void PauseVideo(int StreamID);
|
||||
@@ -98,9 +102,11 @@ namespace Vocaluxe.Lib.Video.Gstreamer
|
||||
public static extern void ResumeVideo(int StreamID);
|
||||
|
||||
[DllImport(Dll)]
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static extern bool Finished(int StreamID);
|
||||
|
||||
[DllImport(Dll)]
|
||||
[return: MarshalAs(UnmanagedType.U1)]
|
||||
public static extern bool UpdateVideo();
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace Vocaluxe.Lib.Webcam
|
||||
private VideoCaptureDevice _Webcam;
|
||||
private FilterInfoCollection _WebcamDevices;
|
||||
private SWebcamConfig _Config;
|
||||
byte[] data = new byte[1];
|
||||
private byte[] data = new byte[1];
|
||||
private static object _mutexData = new object();
|
||||
int _Width, _Height;
|
||||
|
||||
public void Close()
|
||||
@@ -39,7 +40,7 @@ namespace Vocaluxe.Lib.Webcam
|
||||
{
|
||||
if (_Webcam != null && _Width > 0 && _Height > 0 && data.Length == _Width * _Height * 4)
|
||||
{
|
||||
lock (data)
|
||||
lock (_mutexData)
|
||||
{
|
||||
if (Frame.index == -1 || _Width != Frame.width || _Height != Frame.height)
|
||||
{
|
||||
@@ -59,7 +60,7 @@ namespace Vocaluxe.Lib.Webcam
|
||||
{
|
||||
if (_Webcam != null && _Width > 0 && _Height > 0 && data.Length == _Height * _Width * 4)
|
||||
{
|
||||
lock (data)
|
||||
lock (_mutexData)
|
||||
{
|
||||
Bitmap bmp = new Bitmap(_Width, _Height);
|
||||
BitmapData bitmapdata = bmp.LockBits(new Rectangle(0, 0, _Width, _Height), ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
@@ -106,7 +107,7 @@ namespace Vocaluxe.Lib.Webcam
|
||||
{
|
||||
if (!_Paused)
|
||||
{
|
||||
lock (data)
|
||||
lock (_mutexData)
|
||||
{
|
||||
if (_Width != e.Frame.Width || _Height != e.Frame.Height || data.Length != e.Frame.Width * e.Frame.Height * 4)
|
||||
data = new byte[4 * e.Frame.Width * e.Frame.Height];
|
||||
|
||||
@@ -10,3 +10,24 @@
|
||||
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "Vocaluxe.Menu.CHelper.TryParse(System.String,System.Single@)", Scope = "member", Target = "Vocaluxe.Menu.SongMenu.CSong.#ReadHeader(System.String)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "System.Int32.TryParse(System.String,System.Int32@)", Scope = "member", Target = "Vocaluxe.Menu.SongMenu.CSong.#ReadNotes(System.String,System.Boolean)")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Config")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Settings")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Theme")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Helper")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Log")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#BackgroundMusic")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Drawing")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Graphics")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Fonts")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Language")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Game")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Profiles")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Record")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Songs")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Video")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Sound")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Cover")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#DataBase")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Input")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2211:NonConstantFieldsShouldNotBeVisible", Scope = "member", Target = "Vocaluxe.Menu.CBase.#Playlist")]
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Scope = "type", Target = "Vocaluxe.Menu.EColorDeep")]
|
||||
@@ -21,15 +21,15 @@ namespace Vocaluxe.Menu
|
||||
get { return _Navigator; }
|
||||
}
|
||||
|
||||
public static CXMLReader OpenFile(string sUri)
|
||||
public static CXMLReader OpenFile(string sFile)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new CXMLReader(sUri);
|
||||
return new CXMLReader(sFile);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
CBase.Log.LogError("Can't open XML file: " + sUri + ": " + e.Message);
|
||||
CBase.Log.LogError("Can't open XML file: " + sFile + ": " + e.Message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Text;
|
||||
|
||||
namespace Vocaluxe.Menu.SingNotes
|
||||
{
|
||||
interface ISingNotes
|
||||
public interface ISingNotes
|
||||
{
|
||||
void Reset();
|
||||
int AddPlayer(SRectF Rect, SColorF Color, int PlayerNr);
|
||||
|
||||
Reference in new issue
Block a user