63 Commits
Author SHA1 Message Date
Stefan 81c323363a Release 0.4.1
Release 0.4.1
2020-03-10 07:52:34 +01:00
Stefan 1356b61383 Merge pull request #507 from lukeIam/release-0.4.1
Fix: replace invalid github tokens in 0.4.1 branch
2020-03-09 19:17:58 +01:00
Stefan 3806c77d98 Merge branch 'release-0.4.1' into release-0.4.1 2020-03-09 19:02:37 +01:00
lukeIam a6c5766138 Fix: replace invalid github tokens in 0.4.1 branch 2020-03-09 18:24:20 +01:00
Stefan 3bbcb2d56a Merge pull request #328 from Vocaluxe/release-0.4.1
Bugfix release 0.4.1
2020-03-08 17:24:28 +01:00
daggeg 25fd140b3e Merge pull request #497 from Vocaluxe/Readme-patch-1
Update Readme.txt
2020-02-11 13:01:00 +01:00
Stefan 5e481878f5 Update Readme.txt 2020-02-11 06:32:26 +01:00
Stefan c05f2ab548 Merge pull request #495 from Vocaluxe/FixSubLineAlphaCalculation_release-0.4.1
Fix alpha calculation for last sub line (release-0.4.1)
2020-02-09 20:23:54 +01:00
Stefan 919ab803d1 Fix alpha calculation for last sub line (release-0.4.1)
Sub line was displayed wrong, if the last lyric line has a bigger distance to the second last line. Alpha calculation for sub lines stopped one line to early and might be visible even if it shouldn't be.
2020-02-09 20:02:59 +01:00
daggeg dd7be5c575 Merge pull request #489 from Vocaluxe/FixPlaylistScrollOffset_release-0.4.1
Scroll offset was ignored while singing a single playlist song (fix #487 for release-0.4.1)
2020-02-08 11:19:50 +01:00
Stefan 546ccf4748 Scroll offset was ignored while singing a single playlist song (fix #487 for release-0.4.1) 2020-02-07 21:17:36 +01:00
Stefan d457c6c66f Merge pull request #481 from Vocaluxe/RelativeSongPathFix-0.4.1
Relative song paths will now be converted to absolute song paths (release-0.4.1)
2020-02-04 14:10:09 +01:00
Stefan cfc6bfa738 Relative song paths will now be converted to absolute song paths
Same fix from GaryCXJk for release-0.4.1
2020-02-04 08:46:48 +01:00
daggeg de80eeb823 Merge pull request #448 from Vocaluxe/VideoPreviewFix-release0.4.1
Fix release-0.4.1: Config.Video.VideoPreview is ignored (fixes #391)
2020-01-17 17:32:28 +01:00
Stefan 2bb2819b33 Merge branch 'release-0.4.1' into VideoPreviewFix-release0.4.1 2020-01-16 22:01:16 +01:00
daggeg c0e2281b74 Merge pull request #451 from Vocaluxe/JumpTo_FolderSort-fix0.4.1
Fix release-0.4.1: JumpTo not working correctly on folder sort (fix #449)
2020-01-16 08:28:43 +01:00
Stefan 9e8952157a Fix release-0.4.1: JumpTo not working correctly on folder sort (fix #449) 2020-01-16 07:15:23 +01:00
Stefan e2dcbc2ecf Fix release-0.4.1: Config.Video.VideoPreview is ignored (fixes #391) 2020-01-15 23:46:01 +01:00
Stefan 4c76c88074 Fix release-0.4.1: Config.Video.VideoPreview is ignored (fixes #391) 2020-01-15 23:44:49 +01:00
lukeIam 890e6d84fb Merge pull request #380 from lukeIam/release-0.4.1
Use TLS 1.2 for downloading GStreamer
2018-03-01 17:21:29 +01:00
lukeIam cd5ab37afd Use TLS 1.2 for downloading GStreamer
(cherry picked from commit 617cf70bf8)
2018-03-01 11:24:50 +01:00
Florian Küpper 5adde7b9c4 Merge pull request #373 from lukeIam/release-0.4.1
New PortAudio
2018-02-04 16:24:11 +01:00
lukeIam 61dcfc3aeb Upgrade PortAudio to version pa_stable_v190600_20161030
(cherry picked from commit 16f9ef2c88)
2018-02-04 16:04:16 +01:00
lukeIam 342123dc4e Removed useless metapackage vocaluxe.dependencies
(cherry picked from commit 20d13d9f06)

# Conflicts:
#	Vocaluxe/packages.config
2018-02-04 16:04:14 +01:00
Florian Küpper c55f779dba Merge pull request #358 from flokuep/release-0.4.1
Release 0.4.1
2017-12-26 16:33:49 +01:00
Florian Küpper 675edce193 Fix: winner calc in tic-tac-toe mode (closes #349) 2017-12-26 15:46:21 +01:00
Florian Küpper f9e71693ea Fix: Winner in challenge mode wasn't calculated properly 2017-12-26 12:51:16 +01:00
Florian Küpper e99f1adfae Fixed exception on task dispose (fix #357) 2017-12-26 11:37:00 +01:00
Florian Küpper 330f755c44 Merge pull request #352 from lukeIam/CouldNotQueryPos
Meaningless "Could not query position" messages in the log
2017-12-22 16:31:27 +01:00
lukeIam 4ceac098ab Merge branch 'release-0.4.1' of https://github.com/Vocaluxe/Vocaluxe into CouldNotQueryPos 2017-12-21 15:13:51 +01:00
lukeIam 9599c1a616 Fix: meaningless "Could not query position" messages in the log 2017-12-21 15:08:12 +01:00
Florian Küpper 5ec3f9a8a7 Merge pull request #347 from lukeIam/release-0.4.1
_PreviewStartHelperTask null check from @Pr3di
2017-12-19 11:12:47 +01:00
Pr3di 60a6f8d347 NullPointerException abgefangen
(cherry picked from commit 6782f5104a)
2017-12-19 10:43:35 +01:00
Florian Küpper 533a7e64d2 Merge pull request #345 from flokuep/release-0.4.1
Minor fixes.
2017-12-05 17:11:51 +01:00
Florian Küpper 2d13c3a834 Merge branch 'release-0.4.1' into release-0.4.1 2017-12-05 16:54:04 +01:00
Florian Küpper 064b5412a6 Fix: Increase team number in PartyNameSelction 2017-12-03 12:38:50 +01:00
Florian Küpper 2f4067c374 Merge pull request #346 from Jiiniasu/0.4.1-Button-Fix
Fix: Button SelColor
2017-12-02 22:22:39 +01:00
Jiiniasu 7f3d9c5f41 Fix: Button SelColor
Correctly set Selcolor when creating one based on an existing button.
2017-12-02 22:12:58 +01:00
Florian Küpper e9abec565d Removed unused tables after converting Ultrastar.db 2017-12-02 21:57:22 +01:00
Florian Küpper 5296627f8d Fixed converting Ultrastar.db 2017-12-02 16:45:41 +01:00
Florian Küpper 7fdbd8780b Fixed updating team-slide in PartyNameSelection 2017-12-01 17:14:28 +01:00
Florian Küpper feb5c1eaed Fix: PartyNameSelection visibility of team increase/decrease button 2017-12-01 16:41:21 +01:00
Florian Küpper 1baed149af Updated AdvancedInstaller version 2017-11-23 16:54:30 +01:00
Florian Küpper d7e924b72b Fixed installer file names 2017-11-23 16:50:07 +01:00
Florian Küpper b8fb0d7549 Make reading HighscoreDB more robust if song entries are incomplete 2017-11-22 20:14:31 +01:00
Florian Küpper 7dbd2363db Fix: Points were assigned to not sung songs 2017-11-21 09:49:45 +01:00
Florian Küpper 081ca63d85 Merge branch 'release-0.4.1' of github.com:Vocaluxe/Vocaluxe into release-0.4.1 2017-11-16 12:27:31 +01:00
Florian Küpper 06d6be528a Fixed wrong song folder path that leads to not working folder-sorting 2017-11-16 12:26:38 +01:00
lukeIam ce4529325b Fix: exception when intro video is missing 2017-11-06 10:08:06 +01:00
lukeIam 52f1b8f546 Fix: Vocaluxe crashes when _CopyDecodedFrameToBuffer() fails 2017-11-04 20:13:19 +01:00
lukeIam 79bbcbdccb Try to close the other modules correctly if a single one fails to close ( on program shutdown) 2017-11-04 19:47:47 +01:00
lukeIam a92353c9a2 Try to fix exceptions while closing Vocaluxe (during closing bg video) (may fixes #320) 2017-11-04 19:34:55 +01:00
lukeIam 3e0eec8294 Synchronize access to _PreviewStartHelperTask object (may fixes #330) 2017-11-04 14:58:48 +01:00
Florian Küpper ceaa77ffe7 Merge pull request #326 from flokuep/0.4.0-fixes
Small fixes
2017-10-30 18:29:06 +01:00
Florian Küpper c87016c4f8 Merge pull request #325 from lukeIam/PACloaseStreamHandling
PortAudio close-stream-handling
2017-10-30 18:28:43 +01:00
Florian Küpper 4d754c0876 Forget to remove a function... 2017-10-08 12:59:46 +02:00
Florian Küpper 8244fd638b Log missing avatar as error instead of throwing exceptions 2017-10-08 12:56:37 +02:00
Florian Küpper 85ad6050f8 Fixed lyrics visibility (closes #322) 2017-10-08 12:56:16 +02:00
Florian Küpper df34766f35 Fixed aspect of avatars 2017-10-08 12:40:59 +02:00
lukeIam ad5ffd7578 Catch potential errors from PortAudio Close() and Dispose() 2017-10-04 14:20:31 +02:00
lukeIam 4784e57370 Refactored mutex use while closing streams in CPortAudioHandle (should fix #320) 2017-10-04 13:12:14 +02:00
Florian Küpper 41cf7a5ac2 push to trigger appveyor 2017-09-28 17:31:16 +02:00
Florian Küpper d94868f466 Fixed drawing non-latin character not correctly, closes #310 2017-09-07 16:56:31 +02:00
33 changed files with 521 additions and 143 deletions

No files matched your search

+8 -8
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DOCUMENT Type="Advanced Installer" CreateVersion="14.2.1" version="14.2.1" Modules="professional" RootPath="." Language="en" Id="{0664D363-F696-4E25-87C5-DE348E591191}"> <DOCUMENT Type="Advanced Installer" CreateVersion="14.2.1" version="14.4.2" Modules="professional" RootPath="." Language="en" Id="{0664D363-F696-4E25-87C5-DE348E591191}">
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent"> <COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
<ROW Name="HiddenItems" Value="AppXProductDetailsComponent;AppXDependenciesComponent;AppXAppDetailsComponent;AppXVisualAssetsComponent;AppXCapabilitiesComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent;MsiJavaComponent;MsiDriverPackagesComponent;UserAccountsComponent;ScheduledTasksComponent;SqlConnectionComponent;AutorunComponent;FirewallExceptionComponent;GameUxComponent;MsiDirectEditorComponent;SharePointSlnComponent;SilverlightSlnComponent;MultipleInstancesComponent;SccmComponent;ActSyncAppComponent"/> <ROW Name="HiddenItems" Value="AppXProductDetailsComponent;AppXDependenciesComponent;AppXAppDetailsComponent;AppXVisualAssetsComponent;AppXCapabilitiesComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent;MsiJavaComponent;MsiDriverPackagesComponent;UserAccountsComponent;ScheduledTasksComponent;SqlConnectionComponent;AutorunComponent;FirewallExceptionComponent;GameUxComponent;MsiDirectEditorComponent;SharePointSlnComponent;SilverlightSlnComponent;MultipleInstancesComponent;SccmComponent;ActSyncAppComponent"/>
</COMPONENT> </COMPONENT>
@@ -18,7 +18,7 @@
<ROW Property="ALLUSERS" Value="1"/> <ROW Property="ALLUSERS" Value="1"/>
<ROW Property="ARPCOMMENTS" Value="This installs Vocaluxe. Vocaluxe is an open source singing game inspired by SingStar™ and Ultrastar Deluxe." ValueLocId="*"/> <ROW Property="ARPCOMMENTS" Value="This installs Vocaluxe. Vocaluxe is an open source singing game inspired by SingStar™ and Ultrastar Deluxe." ValueLocId="*"/>
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1#x64_1:1"/> <ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1#x64_1:1"/>
<ROW Property="ARPNOREPAIR" Value="1"/> <ROW Property="ARPNOREPAIR" Value="1" MultiBuildValue="DefaultBuild:1#x64_1:1"/>
<ROW Property="ARPPRODUCTICON" Value="Vocaluxe.exe" Type="8"/> <ROW Property="ARPPRODUCTICON" Value="Vocaluxe.exe" Type="8"/>
<ROW Property="ARPURLINFOABOUT" Value="https://vocaluxe.org"/> <ROW Property="ARPURLINFOABOUT" Value="https://vocaluxe.org"/>
<ROW Property="BannerBitmap" Value="banner" MultiBuildValue="DefaultBuild:banner.jpg#x64_1:banner.jpg" Type="1" MsiKey="BannerBitmap"/> <ROW Property="BannerBitmap" Value="banner" MultiBuildValue="DefaultBuild:banner.jpg#x64_1:banner.jpg" Type="1" MsiKey="BannerBitmap"/>
@@ -28,7 +28,7 @@
<ROW Property="ProductCode" Value="1029:{DCDF3A8D-05B4-4CBF-8128-0BD10FDE4BDB} 1031:{3A3B2184-E965-4A08-8864-8B59990F963A} 1033:{756FABFA-4336-40AE-9245-60AB2D2C38F9} 1036:{ABCA971F-E153-4014-AC14-FF305678F6DE} 1038:{4345A445-5D72-4C8D-BB34-98C8B5D152E4} 1040:{D060F8C3-D29E-442F-B13C-B132B29C58BF} 1043:{5C0D700A-45AC-4616-94F6-2CAF8FA7E8AA} 1053:{0CAB03D2-183F-4680-970F-07F7EFAB0373} 1055:{307D49D0-9D47-409F-A3D1-92630CAE5C7E} 2070:{87BE9C14-3781-4EE9-871C-15E8F220A4E0} 3082:{F262F983-9F34-4201-B38B-0D45D2879E23} " Type="16"/> <ROW Property="ProductCode" Value="1029:{DCDF3A8D-05B4-4CBF-8128-0BD10FDE4BDB} 1031:{3A3B2184-E965-4A08-8864-8B59990F963A} 1033:{756FABFA-4336-40AE-9245-60AB2D2C38F9} 1036:{ABCA971F-E153-4014-AC14-FF305678F6DE} 1038:{4345A445-5D72-4C8D-BB34-98C8B5D152E4} 1040:{D060F8C3-D29E-442F-B13C-B132B29C58BF} 1043:{5C0D700A-45AC-4616-94F6-2CAF8FA7E8AA} 1053:{0CAB03D2-183F-4680-970F-07F7EFAB0373} 1055:{307D49D0-9D47-409F-A3D1-92630CAE5C7E} 2070:{87BE9C14-3781-4EE9-871C-15E8F220A4E0} 3082:{F262F983-9F34-4201-B38B-0D45D2879E23} " Type="16"/>
<ROW Property="ProductLanguage" Value="1055"/> <ROW Property="ProductLanguage" Value="1055"/>
<ROW Property="ProductName" Value="Vocaluxe"/> <ROW Property="ProductName" Value="Vocaluxe"/>
<ROW Property="ProductVersion" Value="0.4.0.11" Type="32" TargetFile="Vocaluxe.exe"/> <ROW Property="ProductVersion" Value="0.4.0.12" Type="32" TargetFile="Vocaluxe.exe"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/> <ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
<ROW Property="UpgradeCode" Value="{4254D936-CC8F-4E52-B79B-A6C733ABEC96}"/> <ROW Property="UpgradeCode" Value="{4254D936-CC8F-4E52-B79B-A6C733ABEC96}"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME#x64_1:Windows 9x/ME" ValueLocId="-"/> <ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME#x64_1:Windows 9x/ME" ValueLocId="-"/>
@@ -3765,8 +3765,8 @@
<ROW Action="AI_DetectSoftware" Sequence="101"/> <ROW Action="AI_DetectSoftware" Sequence="101"/>
</COMPONENT> </COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent"> <COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
<ROW BuildKey="DefaultBuild" BuildName="x64" BuildOrder="1" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]-[|ProductVersion]-x64" MsiPackageType="x64"/> <ROW BuildKey="DefaultBuild" BuildName="x64" BuildOrder="1" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]_[|ProductVersion]_Windows_x64" MsiPackageType="x64"/>
<ROW BuildKey="x64_1" BuildName="x86" BuildOrder="2" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]-[|ProductVersion]-x86"/> <ROW BuildKey="x64_1" BuildName="x86" BuildOrder="2" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]_[|ProductVersion]_Windows_x86"/>
</COMPONENT> </COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent"> <COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
<ROW Path="&lt;AI_DICTS&gt;ui.ail"/> <ROW Path="&lt;AI_DICTS&gt;ui.ail"/>
@@ -4032,8 +4032,8 @@
<ATTRIBUTE name="PrereqsOrder" value="B63_41B8_9CB7_8C5E07C0FC18_ CB585686_DAA3_4384_BDDF_08ABA631E9F3_ C673FE9433B49AFAC9592AB26B8F8E4"/> <ATTRIBUTE name="PrereqsOrder" value="B63_41B8_9CB7_8C5E07C0FC18_ CB585686_DAA3_4384_BDDF_08ABA631E9F3_ C673FE9433B49AFAC9592AB26B8F8E4"/>
</COMPONENT> </COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.PreReqSearchComponent"> <COMPONENT cid="caphyon.advinst.msicomp.PreReqSearchComponent">
<ROW SearchKey="B63_41B8_9CB7_8C5E07C0FC18_Version" Prereq="B63_41B8_9CB7_8C5E07C0FC18_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\amd64\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_B63_41B8_9CB7_8C5E07C0FC18_"/> <ROW SearchKey="B63_41B8_9CB7_8C5E07C0FC18_Version" Prereq="B63_41B8_9CB7_8C5E07C0FC18_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\amd64\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_B63_41B8_9CB7_8C5E07C0"/>
<ROW SearchKey="C673FE9433B49AFAC9592AB26B8F8E4Install" Prereq="C673FE9433B49AFAC9592AB26B8F8E4" SearchType="9" SearchString="HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Install" RefContent="M1" Order="1" Property="PreReqSearch_C673FE9433B49AFAC9592AB26B8F8E4"/> <ROW SearchKey="C673FE9433B49AFAC9592AB26B8F8E4Install" Prereq="C673FE9433B49AFAC9592AB26B8F8E4" SearchType="9" SearchString="HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Install" RefContent="M1" Order="1" Property="PreReqSearch_C673FE9433B49AFAC9592A"/>
<ROW SearchKey="CB585686_DAA3_4384_BDDF_08ABA631E9F3_Version" Prereq="CB585686_DAA3_4384_BDDF_08ABA631E9F3_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\x86\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_CB585686_DAA3_4384_BDDF_08ABA631E9F3_"/> <ROW SearchKey="CB585686_DAA3_4384_BDDF_08ABA631E9F3_Version" Prereq="CB585686_DAA3_4384_BDDF_08ABA631E9F3_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\x86\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_CB585686_DAA3_4384_BDD"/>
</COMPONENT> </COMPONENT>
</DOCUMENT> </DOCUMENT>
+1 -2
View File
@@ -1,4 +1,4 @@
Vocaluxe 0.4 README Vocaluxe 0.4.1 README
---------------------------- ----------------------------
================================= =================================
@@ -168,7 +168,6 @@ Vocaluxe Homepage: https://vocaluxe.org
Bug Tracker: https://github.com/Vocaluxe/Vocaluxe/issues Bug Tracker: https://github.com/Vocaluxe/Vocaluxe/issues
Translations: https://www.transifex.com/projects/p/vocaluxe/ Translations: https://www.transifex.com/projects/p/vocaluxe/
GitHub Wiki: https://github.com/Vocaluxe/Vocaluxe/wiki GitHub Wiki: https://github.com/Vocaluxe/Vocaluxe/wiki
Support Forum (German): http://www.ultra-star.de
Song-DataBase (USDB): http://usdb.animux.de/ Song-DataBase (USDB): http://usdb.animux.de/
@@ -18,6 +18,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using VocaluxeLib.Game;
using VocaluxeLib.Menu; using VocaluxeLib.Menu;
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
@@ -430,39 +431,62 @@ namespace VocaluxeLib.PartyModes.Challenge
private void _UpdateScores() private void _UpdateScores()
{ {
//Prepare results table
if (GameData.ResultTable.Count == 0) if (GameData.ResultTable.Count == 0)
{ {
for (int i = 0; i < GameData.NumPlayer; i++) for (int i = 0; i < GameData.NumPlayer; i++)
{ {
var row = new CResultTableRow {PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0}; var row = new CResultTableRow { PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0 };
GameData.ResultTable.Add(row); GameData.ResultTable.Add(row);
} }
GameData.Results = new int[GameData.NumRounds,GameData.NumPlayerAtOnce]; GameData.Results = new int[GameData.NumRounds, GameData.NumPlayerAtOnce];
for (int i = 0; i < GameData.NumRounds; i++) for (int i = 0; i < GameData.NumRounds; i++)
{ {
for (int j = 0; j < GameData.NumPlayerAtOnce; j++) for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
GameData.Results[i, j] = 0; GameData.Results[i, j] = 0;
} }
} }
SPlayer[] results = CBase.Game.GetPlayers();
if (results == null) //Get points from game
CPoints points = CBase.Game.GetPoints();
SPlayer[] players = CBase.Game.GetPlayers();
//Go over all rounds and sum up points
for (int round = 0; round < points.NumRounds; round++)
{
SPlayer[] res = points.GetPlayer(round, GameData.NumPlayerAtOnce);
if (res == null || res.Length < GameData.NumPlayerAtOnce)
return; return;
if (results.Length < GameData.NumPlayerAtOnce) for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
return; {
players[p].Points += res[p].Points;
players[p].PointsGoldenNotes += res[p].PointsGoldenNotes;
players[p].PointsLineBonus += res[p].PointsLineBonus;
}
}
//Calculate average points
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
{
players[p].Points /= points.NumRounds;
players[p].PointsGoldenNotes /= points.NumRounds;
players[p].PointsLineBonus /= points.NumRounds;
for (int j = 0; j < GameData.NumPlayerAtOnce; j++) //Save points in GameData
GameData.Results[GameData.CurrentRoundNr - 2, j] = (int)Math.Round(results[j].Points); GameData.Results[GameData.CurrentRoundNr - 2, p] = (int)Math.Round(players[p].Points);
}
List<SStats> points = _GetPointsForPlayer(results); List<SStats> stats = _GetPointsForPlayer(players);
for (int i = 0; i < GameData.NumPlayerAtOnce; i++) for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
{ {
//Find matching row in results table
int index = -1; int index = -1;
for (int j = 0; j < GameData.ResultTable.Count; j++) for (int j = 0; j < GameData.ResultTable.Count; j++)
{ {
if (points[i].ProfileID == GameData.ResultTable[j].PlayerID) if (stats[i].ProfileID == GameData.ResultTable[j].PlayerID)
{ {
index = j; index = j;
break; break;
@@ -473,15 +497,15 @@ namespace VocaluxeLib.PartyModes.Challenge
continue; continue;
CResultTableRow row = GameData.ResultTable[index]; CResultTableRow row = GameData.ResultTable[index];
//Update results entry
row.NumPlayed++; row.NumPlayed++;
row.NumWon += points[i].Won; row.NumWon += stats[i].Won;
row.NumSingPoints += points[i].SingPoints; row.NumSingPoints += stats[i].SingPoints;
row.NumGamePoints += points[i].GamePoints; row.NumGamePoints += stats[i].GamePoints;
GameData.ResultTable[index] = row; GameData.ResultTable[index] = row;
} }
GameData.ResultTable.Sort(); GameData.ResultTable.Sort();
//Update position-number //Update position-number
@@ -125,6 +125,7 @@ namespace VocaluxeLib.PartyModes.Challenge
_AddText(_NextPlayerTexts[_NextPlayerTexts.Count - 1]); _AddText(_NextPlayerTexts[_NextPlayerTexts.Count - 1]);
_NextPlayerStatics.Add(GetNewStatic(_Statics[_StaticNextPlayer])); _NextPlayerStatics.Add(GetNewStatic(_Statics[_StaticNextPlayer]));
_AddStatic(_NextPlayerStatics[_NextPlayerStatics.Count - 1]); _AddStatic(_NextPlayerStatics[_NextPlayerStatics.Count - 1]);
_NextPlayerStatics[_NextPlayerStatics.Count - 1].Aspect = EAspect.Crop;
} }
_Statics[_StaticNextPlayer].Visible = false; _Statics[_StaticNextPlayer].Visible = false;
} }
@@ -411,15 +411,16 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
private void _UpdateScores() private void _UpdateScores()
{ {
//Prepare results table
if (GameData.ResultTable.Count == 0) if (GameData.ResultTable.Count == 0)
{ {
for (int i = 0; i < GameData.NumPlayer; i++) for (int i = 0; i < GameData.NumPlayer; i++)
{ {
CResultTableRow row = new CResultTableRow {PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0}; var row = new CResultTableRow { PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0 };
GameData.ResultTable.Add(row); GameData.ResultTable.Add(row);
} }
GameData.Results = new int[GameData.NumRounds,GameData.NumPlayerAtOnce]; GameData.Results = new int[GameData.NumRounds, GameData.NumPlayerAtOnce];
for (int i = 0; i < GameData.NumRounds; i++) for (int i = 0; i < GameData.NumRounds; i++)
{ {
for (int j = 0; j < GameData.NumPlayerAtOnce; j++) for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
@@ -427,59 +428,63 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
} }
} }
CPoints gamePoints = CBase.Game.GetPoints(); //Get points from game
if (gamePoints == null || gamePoints.NumPlayer < GameData.NumPlayerAtOnce) CPoints points = CBase.Game.GetPoints();
return; SPlayer[] players = CBase.Game.GetPlayers();
SPlayer[] results = gamePoints.GetPlayer(0, GameData.NumPlayerAtOnce); //Go over all rounds and sum up points
if (results == null) for (int round = 0; round < points.NumRounds; round++)
return;
if (results.Length < GameData.NumPlayerAtOnce)
return;
if (gamePoints.NumRounds == 0)
return;
for (int i = 1; i < gamePoints.NumRounds; i++)
{ {
SPlayer[] temp = gamePoints.GetPlayer(i, GameData.NumPlayerAtOnce); SPlayer[] res = points.GetPlayer(round, GameData.NumPlayerAtOnce);
if (res == null || res.Length < GameData.NumPlayerAtOnce)
return;
for (int p = 0; p < GameData.NumPlayerAtOnce; p++) for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
results[p].Points += temp[p].Points;
}
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
{ {
results[j].Points = results[j].Points / gamePoints.NumRounds; players[p].Points += res[p].Points;
GameData.Results[GameData.CurrentRoundNr - 2, j] = (int)Math.Round(results[j].Points); players[p].PointsGoldenNotes += res[p].PointsGoldenNotes;
players[p].PointsLineBonus += res[p].PointsLineBonus;
}
}
//Calculate average points
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
{
players[p].Points /= points.NumRounds;
players[p].PointsGoldenNotes /= points.NumRounds;
players[p].PointsLineBonus /= points.NumRounds;
//Save points in GameData
GameData.Results[GameData.CurrentRoundNr - 2, p] = (int)Math.Round(players[p].Points);
} }
List<SStats> points = _GetPointsForPlayer(results); List<SStats> stats = _GetPointsForPlayer(players);
for (int i = 0; i < GameData.NumPlayerAtOnce; i++) for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
{ {
//Find matching row in results table
int index = -1; int index = -1;
for (int j = 0; j < GameData.ResultTable.Count; j++) for (int j = 0; j < GameData.ResultTable.Count; j++)
{ {
if (points[i].ProfileID == GameData.ResultTable[j].PlayerID) if (stats[i].ProfileID == GameData.ResultTable[j].PlayerID)
{ {
index = j; index = j;
break; break;
} }
} }
if (index != -1) if (index == -1)
{ continue;
CResultTableRow row = GameData.ResultTable[index]; CResultTableRow row = GameData.ResultTable[index];
//Update results entry
row.NumPlayed++; row.NumPlayed++;
row.NumWon += points[i].Won; row.NumWon += stats[i].Won;
row.NumSingPoints += points[i].SingPoints; row.NumSingPoints += stats[i].SingPoints;
row.NumGamePoints += points[i].GamePoints; row.NumGamePoints += stats[i].GamePoints;
GameData.ResultTable[index] = row; GameData.ResultTable[index] = row;
} }
}
GameData.ResultTable.Sort(); GameData.ResultTable.Sort();
@@ -20,6 +20,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using VocaluxeLib.Game;
using VocaluxeLib.Menu; using VocaluxeLib.Menu;
using VocaluxeLib.Songs; using VocaluxeLib.Songs;
@@ -530,13 +531,33 @@ namespace VocaluxeLib.PartyModes.TicTacToe
if (!GameData.Rounds[GameData.FieldNr].Finished) if (!GameData.Rounds[GameData.FieldNr].Finished)
GameData.CurrentRoundNr++; GameData.CurrentRoundNr++;
CPoints points = CBase.Game.GetPoints();
SPlayer[] results = CBase.Game.GetPlayers(); SPlayer[] results = CBase.Game.GetPlayers();
if (results == null)
if (results == null || results.Length < 2)
return; return;
if (results.Length < 2) //Sum up all points
return; for (int r = 0; r < points.NumRounds; r++)
{
SPlayer[] player = points.GetPlayer(r, 2);
for (int i = 0; i < 2; i++)
{
results[i].Points += player[i].Points;
results[i].PointsGoldenNotes += player[i].PointsGoldenNotes;
results[i].PointsLineBonus += player[i].PointsLineBonus;
}
}
//Calc average of points
for (int i = 0; i < 2; i++)
{
results[i].Points /= points.NumRounds;
results[i].PointsGoldenNotes /= points.NumRounds;
results[i].PointsLineBonus /= points.NumRounds;
}
//Decide who has won
GameData.Rounds[GameData.FieldNr].PointsTeam1 = (int)Math.Round(results[0].Points); GameData.Rounds[GameData.FieldNr].PointsTeam1 = (int)Math.Round(results[0].Points);
GameData.Rounds[GameData.FieldNr].PointsTeam2 = (int)Math.Round(results[1].Points); GameData.Rounds[GameData.FieldNr].PointsTeam2 = (int)Math.Round(results[1].Points);
GameData.Rounds[GameData.FieldNr].Finished = true; GameData.Rounds[GameData.FieldNr].Finished = true;
@@ -98,6 +98,9 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_CreateFields(); _CreateFields();
_Buttons[_ButtonField].Visible = false; _Buttons[_ButtonField].Visible = false;
_Statics[_StaticAvatarT1].Aspect = EAspect.Crop;
_Statics[_StaticAvatarT2].Aspect = EAspect.Crop;
} }
public override bool HandleInput(SKeyEvent keyEvent) public override bool HandleInput(SKeyEvent keyEvent)
+22 -3
View File
@@ -51,6 +51,7 @@ namespace Vocaluxe.Base
private static Task _PreviewStartHelperTask; private static Task _PreviewStartHelperTask;
private static int _PreviewStartWaitCounter; private static int _PreviewStartWaitCounter;
private const int _PreviewStartWaitMaxTries = 10; private const int _PreviewStartWaitMaxTries = 10;
private static readonly object _PreviewStartHelperTaskLock = new Object();
public static bool VideoEnabled public static bool VideoEnabled
{ {
@@ -255,12 +256,18 @@ namespace Vocaluxe.Base
public static void Update() public static void Update()
{ {
if (_PreviewStartHelperTask != null && ( _PreviewPlayer.Length > 0 || _PreviewStartWaitCounter++ >= _PreviewStartWaitMaxTries)) if (_PreviewStartHelperTask != null && ( _PreviewPlayer.Length > 0 || _PreviewStartWaitCounter++ >= _PreviewStartWaitMaxTries))
{
lock (_PreviewStartHelperTaskLock)
{
// Recheck the condition as it cloud have change before we got the lock
if (_PreviewStartHelperTask != null && (_PreviewPlayer.Length > 0 || _PreviewStartWaitCounter++ >= _PreviewStartWaitMaxTries))
{ {
_PreviewStartHelperTask.RunSynchronously(TaskScheduler.FromCurrentSynchronizationContext()); _PreviewStartHelperTask.RunSynchronously(TaskScheduler.FromCurrentSynchronizationContext());
_PreviewStartHelperTask.Dispose();
_PreviewStartHelperTask = null; _PreviewStartHelperTask = null;
_PreviewStartWaitCounter = 0; _PreviewStartWaitCounter = 0;
} }
}
}
if (!IsPlaying) if (!IsPlaying)
return; return;
@@ -315,7 +322,9 @@ namespace Vocaluxe.Base
//Change song position only if song is changed or near to end //Change song position only if song is changed or near to end
if (songChanged || _CurPlayer.Position + 30 < _CurPlayer.Length) if (songChanged || _CurPlayer.Position + 30 < _CurPlayer.Length || _PreviewStartHelperTask == null)
{
lock (_PreviewStartHelperTaskLock)
{ {
_PreviewStartHelperTask = new Task(() => _PreviewStartHelperTask = new Task(() =>
{ {
@@ -333,12 +342,22 @@ namespace Vocaluxe.Base
_PreviewPlayer.Position = start; _PreviewPlayer.Position = start;
Play(); Play();
}); });
}
_CurPlayer = _PreviewPlayer; _CurPlayer = _PreviewPlayer;
} }
else else
{ {
_PreviewStartHelperTask.Dispose(); if (_PreviewStartHelperTask != null)
{
lock (_PreviewStartHelperTaskLock)
{
// Recheck the condition as it cloud have change before we got the lock
if (_PreviewStartHelperTask != null)
{
_PreviewStartHelperTask = null; _PreviewStartHelperTask = null;
}
}
}
_PreviewPlayer.Position = _CurPlayer.Position; _PreviewPlayer.Position = _CurPlayer.Position;
_CurPlayer = _PreviewPlayer; _CurPlayer = _PreviewPlayer;
Play(); Play();
+28 -11
View File
@@ -191,13 +191,14 @@ namespace Vocaluxe.Base
public static event OnSongMenuChanged SongMenuChanged; public static event OnSongMenuChanged SongMenuChanged;
//Folders //Folders
//We need full path for folders for matching folder path with textfile path when loading
public static readonly List<string> SongFolders = new List<string> public static readonly List<string> SongFolders = new List<string>
{ {
#if INSTALLER #if INSTALLER
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs), Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs),
CSettings.FolderNameSongs Path.Combine(CSettings.ProgramFolder, FolderNameSongs)
#elif WIN #elif WIN
CSettings.FolderNameSongs Path.Combine(CSettings.ProgramFolder, CSettings.FolderNameSongs)
#elif LINUX #elif LINUX
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs) Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs)
#endif #endif
@@ -335,15 +336,8 @@ namespace Vocaluxe.Base
else else
Config = xml.DeserializeString<SConfig>("<root />"); Config = xml.DeserializeString<SConfig>("<root />");
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "") NormalizeSongPaths();
{
SongFolders.Clear();
SongFolders.AddRange(Config.Game.SongFolder);
}
else
{
Config.Game.SongFolder = SongFolders.ToArray();
}
if ((Config.Game.ScoreAnimationTime > 0 && Config.Game.ScoreAnimationTime < 1) || Config.Game.ScoreAnimationTime < 0) if ((Config.Game.ScoreAnimationTime > 0 && Config.Game.ScoreAnimationTime < 1) || Config.Game.ScoreAnimationTime < 0)
Config.Game.ScoreAnimationTime = 1; Config.Game.ScoreAnimationTime = 1;
@@ -625,6 +619,29 @@ namespace Vocaluxe.Base
return false; return false;
} }
/// <summary>
/// Set song path if none is find in config and check if every path exists
/// </summary>
public static void NormalizeSongPaths()
{
//Check if there are configured songfolders
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "")
{
SongFolders.Clear();
foreach (string folder in Config.Game.SongFolder)
{
//Check if folder exists
if (Directory.Exists(folder))
SongFolders.Add(Path.GetFullPath(folder));
}
}
//Test if songfolders are still empty or now empty
if(Config.Game.SongFolder.Length == 0)
Config.Game.SongFolder = SongFolders.ToArray();
}
/// <summary> /// <summary>
/// Load command-line-parameters and their values to lists. /// Load command-line-parameters and their values to lists.
/// </summary> /// </summary>
+2 -2
View File
@@ -84,7 +84,7 @@ namespace Vocaluxe.Base
if (_WidthTrimmed < 0f) if (_WidthTrimmed < 0f)
{ {
string text = Text.TrimEnd(null); string text = Text.TrimEnd(null);
_WidthTrimmed = text.Length == Text.Length ? Width : _Graphics.MeasureString(text, _Font, -1, StringFormat.GenericTypographic).Width; _WidthTrimmed = text.Length == Text.Length ? Width : _Graphics.MeasureString(text, _Font).Width;
} }
return _WidthTrimmed; return _WidthTrimmed;
} }
@@ -94,7 +94,7 @@ namespace Vocaluxe.Base
public CTextElement(string text, Graphics g, Font font) public CTextElement(string text, Graphics g, Font font)
{ {
Text = text; Text = text;
SizeF dimensions = g.MeasureString(text, font, -1, StringFormat.GenericTypographic); SizeF dimensions = g.MeasureString(text, font);
Width = dimensions.Width; Width = dimensions.Width;
Height = (dimensions.Height + font.Height) / 2; Height = (dimensions.Height + font.Height) / 2;
_Graphics = g; _Graphics = g;
+21
View File
@@ -821,9 +821,16 @@ namespace Vocaluxe.Base
} }
public void Close(ref CVideoStream stream) public void Close(ref CVideoStream stream)
{
try
{ {
CVideo.Close(ref stream); CVideo.Close(ref stream);
} }
catch (NotSupportedException e)
{
CLog.LogError($"Clould not close the background video: {e.Message}");
}
}
public void SetLoop(CVideoStream stream, bool loop = true) public void SetLoop(CVideoStream stream, bool loop = true)
{ {
@@ -831,14 +838,28 @@ namespace Vocaluxe.Base
} }
public void Pause(CVideoStream stream) public void Pause(CVideoStream stream)
{
try
{ {
CVideo.Pause(stream); CVideo.Pause(stream);
} }
catch (NotSupportedException e)
{
CLog.LogError($"Clould not pause the background video: {e.Message}");
}
}
public void Resume(CVideoStream stream) public void Resume(CVideoStream stream)
{
try
{ {
CVideo.Resume(stream); CVideo.Resume(stream);
} }
catch (NotSupportedException e)
{
CLog.LogError($"Clould not resume the background video: {e.Message}");
}
}
} }
class CBsound : ISound class CBsound : ISound
+73
View File
@@ -15,6 +15,7 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>. // along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion #endregion
using System;
using Vocaluxe.Lib.Video; using Vocaluxe.Lib.Video;
using VocaluxeLib; using VocaluxeLib;
@@ -61,6 +62,10 @@ namespace Vocaluxe.Base
public static CVideoStream Load(string videoFileName) public static CVideoStream Load(string videoFileName)
{ {
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.Load(videoFileName); return _VideoDecoder.Load(videoFileName);
} }
@@ -73,41 +78,109 @@ namespace Vocaluxe.Base
public static float GetLength(CVideoStream stream) public static float GetLength(CVideoStream stream)
{ {
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.GetLength(stream); return _VideoDecoder.GetLength(stream);
} }
public static bool GetFrame(CVideoStream stream, float time) public static bool GetFrame(CVideoStream stream, float time)
{ {
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.GetFrame(stream, time); return _VideoDecoder.GetFrame(stream, time);
} }
public static bool Skip(CVideoStream stream, float start, float gap) public static bool Skip(CVideoStream stream, float start, float gap)
{ {
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.Skip(stream, start, gap); return _VideoDecoder.Skip(stream, start, gap);
} }
public static void SetLoop(CVideoStream stream, bool loop) public static void SetLoop(CVideoStream stream, bool loop)
{ {
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
_VideoDecoder.SetLoop(stream, loop); _VideoDecoder.SetLoop(stream, loop);
} }
public static void Pause(CVideoStream stream) public static void Pause(CVideoStream stream)
{ {
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
_VideoDecoder.Pause(stream); _VideoDecoder.Pause(stream);
} }
public static void Resume(CVideoStream stream) public static void Resume(CVideoStream stream)
{ {
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
_VideoDecoder.Resume(stream); _VideoDecoder.Resume(stream);
} }
public static bool Finished(CVideoStream stream) public static bool Finished(CVideoStream stream)
{ {
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.Finished(stream); return _VideoDecoder.Finished(stream);
} }
public static void Update() public static void Update()
{ {
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
_VideoDecoder.Update(); _VideoDecoder.Update();
} }
#endregion Interface #endregion Interface
+15 -1
View File
@@ -53,19 +53,30 @@ namespace Vocaluxe.Base
{ {
_VideoTimer.Reset(); _VideoTimer.Reset();
_Finished = false; _Finished = false;
if (_VideoStream == null)
{
return;
}
//CVideo.VdSkip(_VideoStream, 0f, 0f); //CVideo.VdSkip(_VideoStream, 0f, 0f);
_VideoTimer.Start(); _VideoTimer.Start();
CVideo.Resume(_VideoStream); CVideo.Resume(_VideoStream);
} }
public void Pause() public void Pause()
{
if (_VideoStream != null)
{ {
CVideo.Pause(_VideoStream); CVideo.Pause(_VideoStream);
}
_VideoTimer.Stop(); _VideoTimer.Stop();
} }
public void Resume() public void Resume()
{ {
if (_VideoStream == null)
{
return;
}
CVideo.Resume(_VideoStream); CVideo.Resume(_VideoStream);
_VideoTimer.Start(); _VideoTimer.Start();
} }
@@ -92,7 +103,7 @@ namespace Vocaluxe.Base
public void PreLoad() public void PreLoad()
{ {
if (!_Loaded) if (!_Loaded || _VideoStream == null)
{ {
return; return;
} }
@@ -110,8 +121,11 @@ namespace Vocaluxe.Base
} }
public void Close() public void Close()
{
if (_VideoStream != null)
{ {
CVideo.Close(ref _VideoStream); CVideo.Close(ref _VideoStream);
}
_Loaded = false; _Loaded = false;
_Finished = false; _Finished = false;
_VideoTimer.Reset(); _VideoTimer.Reset();
+7 -1
View File
@@ -51,7 +51,13 @@ namespace Vocaluxe.Base.Fonts
if (chr != ' ') if (chr != ' ')
{ {
//Gets exact height and width for drawing more than 1 char. But width is to small to draw char on bitmap as e.g. italic chars will get cropped //Gets exact height and width for drawing more than 1 char. But width is to small to draw char on bitmap as e.g. italic chars will get cropped
_BoundingBox = g.MeasureString(chrString, fo, -1, StringFormat.GenericTypographic); //See https://stackoverflow.com/questions/11708621/how-to-measure-width-of-a-string-precisely
StringFormat format = StringFormat.GenericTypographic;
RectangleF rect = new RectangleF(0, 0, 1000, 1000);
CharacterRange[] ranges = { new CharacterRange(0, chrString.Length) };
format.SetMeasurableCharacterRanges(ranges);
_BoundingBox = g.MeasureCharacterRanges(chrString, fo, rect, format)[0].GetBounds(g).Size;
// ReSharper disable CompareOfFloatsByEqualityOperator // ReSharper disable CompareOfFloatsByEqualityOperator
if (_BoundingBox.Height == 0) if (_BoundingBox.Height == 0)
// ReSharper restore CompareOfFloatsByEqualityOperator // ReSharper restore CompareOfFloatsByEqualityOperator
+23 -5
View File
@@ -463,10 +463,19 @@ namespace Vocaluxe.Lib.Database
if (reader != null && reader.HasRows) if (reader != null && reader.HasRows)
{ {
reader.Read(); reader.Read();
if (!reader.IsDBNull(0))
artist = reader.GetString(0); artist = reader.GetString(0);
if (!reader.IsDBNull(1))
title = reader.GetString(1); title = reader.GetString(1);
if (!reader.IsDBNull(2))
numPlayed = reader.GetInt32(2); numPlayed = reader.GetInt32(2);
if (!reader.IsDBNull(3))
dateAdded = new DateTime(reader.GetInt64(3)); dateAdded = new DateTime(reader.GetInt64(3));
reader.Dispose(); reader.Dispose();
return true; return true;
} }
@@ -604,7 +613,7 @@ namespace Vocaluxe.Lib.Database
{ {
//Check for USDX 1.1 DB //Check for USDX 1.1 DB
_CreateHighscoreDBV1(filePath); _CreateHighscoreDBV1(filePath);
result &= !_ConvertFrom110(filePath); result &= _ConvertFrom110(filePath);
result &= _UpdateDatabase(1, connection); result &= _UpdateDatabase(1, connection);
result &= _UpdateDatabase(2, connection); result &= _UpdateDatabase(2, connection);
} }
@@ -733,13 +742,22 @@ namespace Vocaluxe.Lib.Database
transaction.Commit(); transaction.Commit();
//Delete old tables after conversion //Delete old tables after conversion
command.CommandText = "DROP TABLE US_Scores;"; command.CommandText = "DROP TABLE IF EXISTS us_scores;";
command.ExecuteNonQuery(); command.ExecuteNonQuery();
command.CommandText = "DROP TABLE US_Songs;"; command.CommandText = "DROP TABLE IF EXISTS us_songs;";
command.ExecuteNonQuery(); command.ExecuteNonQuery();
command.CommandText = "DROP TABLE us_statistics_info;"; command.CommandText = "DROP TABLE IF EXISTS us_statistics_info;";
command.ExecuteNonQuery();
command.CommandText = "DROP TABLE IF EXISTS us_users_info;";
command.ExecuteNonQuery();
command.CommandText = "DROP TABLE IF EXISTS us_webs;";
command.ExecuteNonQuery();
command.CommandText = "DROP TABLE IF EXISTS us_webs_stats;";
command.ExecuteNonQuery(); command.ExecuteNonQuery();
//This versioning is not used in Vocaluxe so reset it to 0 //This versioning is not used in Vocaluxe so reset it to 0
@@ -918,7 +936,7 @@ namespace Vocaluxe.Lib.Database
if (currentVersion < 2) if (currentVersion < 2)
updated &= _ConvertV1toV2(connection); updated &= _ConvertV1toV2(connection);
if (currentVersion < 3) else if (currentVersion < 3)
updated &= _ConvertV2toV3(connection); updated &= _ConvertV2toV3(connection);
return updated; return updated;
+21 -3
View File
@@ -74,13 +74,24 @@ namespace Vocaluxe.Lib.Sound
} }
lock (_Mutex) lock (_Mutex)
{ {
if (_Disposed)
return;
Debug.Assert(_RefCount > 0); Debug.Assert(_RefCount > 0);
_RefCount--; _RefCount--;
if (_RefCount == 0) if (_RefCount == 0)
{
try
{
PortAudio.Pa_Terminate(); PortAudio.Pa_Terminate();
} }
catch (Exception ex)
{
CLog.LogError(errorText: $"Error disposing PortAudio: {ex.Message}", e: ex);
}
}
_Disposed = true; _Disposed = true;
} }
}
public void Dispose() public void Dispose()
{ {
@@ -99,12 +110,12 @@ namespace Vocaluxe.Lib.Sound
public PortAudio.PaError OpenStream(out IntPtr stream, ref PortAudio.PaStreamParameters? inputParameters, ref PortAudio.PaStreamParameters? outputParameters, public PortAudio.PaError OpenStream(out IntPtr stream, ref PortAudio.PaStreamParameters? inputParameters, ref PortAudio.PaStreamParameters? outputParameters,
double sampleRate, uint framesPerBuffer, PortAudio.PaStreamFlags streamFlags, double sampleRate, uint framesPerBuffer, PortAudio.PaStreamFlags streamFlags,
PortAudio.PaStreamCallbackDelegate streamCallback, IntPtr userData) PortAudio.PaStreamCallbackDelegate streamCallback, IntPtr userData)
{
lock (_Mutex)
{ {
if (_Disposed) if (_Disposed)
throw new ObjectDisposedException("PortAudioHandle already disposed"); throw new ObjectDisposedException("PortAudioHandle already disposed");
lock (_Mutex)
{
PortAudio.PaError res = PortAudio.Pa_OpenStream(out stream, ref inputParameters, ref outputParameters, sampleRate, framesPerBuffer, streamFlags, streamCallback, PortAudio.PaError res = PortAudio.Pa_OpenStream(out stream, ref inputParameters, ref outputParameters, sampleRate, framesPerBuffer, streamFlags, streamCallback,
userData); userData);
if (res == PortAudio.PaError.paNoError) if (res == PortAudio.PaError.paNoError)
@@ -156,13 +167,20 @@ namespace Vocaluxe.Lib.Sound
} }
public void CloseStream(IntPtr stream) public void CloseStream(IntPtr stream)
{
lock (_Mutex)
{ {
if (_Disposed) if (_Disposed)
throw new ObjectDisposedException("PortAudioHandle already disposed"); throw new ObjectDisposedException("PortAudioHandle already disposed");
lock (_Mutex) try
{ {
PortAudio.Pa_CloseStream(stream); PortAudio.Pa_CloseStream(stream);
}
catch (Exception ex)
{
CLog.LogError(errorText:$"Error closing stream: {ex.Message}", e:ex);
}
_Streams.Remove(stream); _Streams.Remove(stream);
} }
} }
@@ -70,14 +70,20 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
{ {
get get
{ {
if (_Element != null)
if (_Element == null || (_Element.CurrentState == State.Paused && _Element.PendingState != State.VoidPending))
{ {
return _Position;
}
long position; long position;
if (!_Element.QueryPosition(Format.Time, out position)) if (!_Element.QueryPosition(Format.Time, out position))
CLog.LogError("Could not query position"); CLog.LogError("Could not query position");
else else
_Position = ((float)position / Constants.SECOND); _Position = ((float)position / Constants.SECOND);
}
return _Position; return _Position;
} }
set set
@@ -16,6 +16,8 @@
#endregion #endregion
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
using Vocaluxe.Base; using Vocaluxe.Base;
@@ -141,10 +143,14 @@ namespace Vocaluxe.Lib.Sound.Record.PortAudio
return false; return false;
foreach (IntPtr handle in _RecHandle) foreach (IntPtr handle in _RecHandle)
{
if (handle != IntPtr.Zero)
{ {
PortAudioSharp.PortAudio.Pa_StopStream(handle); PortAudioSharp.PortAudio.Pa_StopStream(handle);
PortAudioSharp.PortAudio.Pa_CloseStream(handle); PortAudioSharp.PortAudio.Pa_CloseStream(handle);
} }
}
_RecHandle = new IntPtr[_Devices.Count];
return true; return true;
} }
@@ -153,14 +159,18 @@ namespace Vocaluxe.Lib.Sound.Record.PortAudio
/// </summary> /// </summary>
public override void Close() public override void Close()
{ {
if (_RecHandle != null) if (_RecHandle != null && _RecHandle.Length > 0)
{ {
foreach (IntPtr handle in _RecHandle) foreach (IntPtr handle in _RecHandle)
{ {
if (handle != IntPtr.Zero) if (handle != IntPtr.Zero)
{
_PaHandle.CloseStream(handle); _PaHandle.CloseStream(handle);
} }
} }
_RecHandle = new IntPtr[_Devices.Count];
}
if (_PaHandle != null) if (_PaHandle != null)
{ {
_PaHandle.Close(); _PaHandle.Close();
@@ -429,7 +429,18 @@ namespace Vocaluxe.Lib.Video.Acinerella
private bool _CopyDecodedFrameToBuffer() private bool _CopyDecodedFrameToBuffer()
{ {
bool result; bool result;
var decoder = (SACDecoder)Marshal.PtrToStructure(_Videodecoder, typeof(SACDecoder)); SACDecoder decoder;
try
{
decoder = (SACDecoder)Marshal.PtrToStructure(_Videodecoder, typeof(SACDecoder));
}
catch (Exception e)
{
CLog.LogError("Couldn't copy the frame to the managed environment.", false, false, e);
return false;
}
if (decoder.Buffer != IntPtr.Zero) if (decoder.Buffer != IntPtr.Zero)
{ {
_LastDecodedTime = (float)decoder.Timecode; _LastDecodedTime = (float)decoder.Timecode;
+98 -1
View File
@@ -285,23 +285,120 @@ namespace Vocaluxe
try try
{ {
CController.Close(); CController.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CController)", false, false, e);
}
try
{
CVocaluxeServer.Close(); CVocaluxeServer.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CVocaluxeServer)", false, false, e);
}
try
{
CGraphics.Close(); CGraphics.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CGraphics)", false, false, e);
}
try
{
CThemes.Close(); CThemes.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CThemes)", false, false, e);
}
try
{
CCover.Close(); CCover.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CCover)", false, false, e);
}
try
{
CFonts.Close(); CFonts.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CFonts)", false, false, e);
}
try
{
CBackgroundMusic.Close(); CBackgroundMusic.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CBackgroundMusic)", false, false, e);
}
try
{
CWebcam.Close(); CWebcam.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CWebcam)", false, false, e);
}
try
{
CDataBase.Close(); CDataBase.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CDataBase)", false, false, e);
}
try
{
CVideo.Close(); CVideo.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CVideo)", false, false, e);
}
try
{
CRecord.Close(); CRecord.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CRecord)", false, false, e);
}
try
{
CSound.Close(); CSound.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CSound)", false, false, e);
}
try
{
CDraw.Close(); CDraw.Close();
} }
catch (Exception e) catch (Exception e)
{ {
CLog.LogError("Error during shutdown!", false, false, e); CLog.LogError("Error during shutdown! (CDraw)", false, false, e);
} }
GC.Collect(); // Do a GC run here before we close logs to have finalizers run GC.Collect(); // Do a GC run here before we close logs to have finalizers run
try try
{ {
+3
View File
@@ -139,6 +139,9 @@ namespace Vocaluxe.Screens
_SetVisibility(); _SetVisibility();
_UpdateRatings(); _UpdateRatings();
_SlideShowBG.Visible = _UpdateBackground(); _SlideShowBG.Visible = _UpdateBackground();
for (int p = 0; p < CGame.NumPlayers; p++)
_Statics[_StaticAvatar[p, CGame.NumPlayers - 1]].Aspect = EAspect.Crop;
} }
public override bool UpdateGame() public override bool UpdateGame()
+30 -31
View File
@@ -201,8 +201,6 @@ namespace Vocaluxe.Screens
CConfig.Config.Theme.PlayerInfo = (EPlayerInfo)mode; CConfig.Config.Theme.PlayerInfo = (EPlayerInfo)mode;
CConfig.SaveConfig(); CConfig.SaveConfig();
_SetVisibility(); _SetVisibility();
if (CGame.GetSong() != null)
_SetDuetLyricsVisibility(CGame.GetSong().IsDuet); //make sure duet lyrics remain visible
break; break;
case Keys.S: case Keys.S:
@@ -596,7 +594,6 @@ namespace Vocaluxe.Screens
_DynamicLyricsTop = true; _DynamicLyricsTop = true;
} }
_SetDuetLyricsVisibility(song.IsDuet);
_SetNormalLyricsVisibility(); _SetNormalLyricsVisibility();
_TimerSongText.Reset(); _TimerSongText.Reset();
@@ -609,37 +606,36 @@ namespace Vocaluxe.Screens
_StartSong(); _StartSong();
} }
private void _SetDuetLyricsVisibility(bool isDuet)
{
_Statics[_StaticLyricsDuet].Visible = isDuet;
_Lyrics[_LyricMainDuet].Visible = isDuet;
_Lyrics[_LyricSubDuet].Visible = isDuet;
if (isDuet)
{
_Lyrics[_LyricMainTop].Visible = false;
_Lyrics[_LyricSubTop].Visible = false;
_Statics[_StaticLyricsTop].Visible = false;
}
else
{
bool lyricsOnTop = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP
|| CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|| (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsTop);
_Lyrics[_LyricMainTop].Visible = lyricsOnTop;
_Lyrics[_LyricSubTop].Visible = lyricsOnTop;
_Statics[_StaticLyricsTop].Visible = lyricsOnTop;
}
}
private void _SetNormalLyricsVisibility() private void _SetNormalLyricsVisibility()
{ {
bool visible = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM bool bottomLyricsVisible = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM
|| CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH || CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|| (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsBottom); || (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsBottom);
_Lyrics[_LyricMain].Visible = visible;
_Lyrics[_LyricSub].Visible = visible; bool topLyricsVisible = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP
_Statics[_StaticLyrics].Visible = visible; || CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|| (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsTop);
bool duetLyricsVisible = false;
if (CGame.GetSong() != null && CGame.GetSong().IsDuet)
{
bottomLyricsVisible = true;
topLyricsVisible = false;
duetLyricsVisible = true;
}
_Lyrics[_LyricMain].Visible = bottomLyricsVisible;
_Lyrics[_LyricSub].Visible = bottomLyricsVisible;
_Statics[_StaticLyrics].Visible = bottomLyricsVisible;
_Lyrics[_LyricMainTop].Visible = topLyricsVisible;
_Lyrics[_LyricSubTop].Visible = topLyricsVisible;
_Statics[_StaticLyricsTop].Visible = topLyricsVisible;
_Lyrics[_LyricMainDuet].Visible = duetLyricsVisible;
_Lyrics[_LyricSubDuet].Visible = duetLyricsVisible;
_Statics[_StaticLyricsDuet].Visible = duetLyricsVisible;
} }
private void _StartSong() private void _StartSong()
@@ -655,7 +651,10 @@ namespace Vocaluxe.Screens
{ {
//Need this to set other songs to points-var //Need this to set other songs to points-var
while (!CGame.IsFinished()) while (!CGame.IsFinished())
{
CGame.NextRound(); CGame.NextRound();
CGame.ResetPlayer();
}
_FinishedSinging(); _FinishedSinging();
} }
@@ -1115,7 +1114,7 @@ namespace Vocaluxe.Screens
} }
// sub // sub
if (currentLineSub < lines.Length - 2) if ((currentLineSub + 1) < lines.Length)
{ {
float diff = CGame.GetTimeFromBeats(lines[currentLineSub + 1].FirstNoteBeat, song.BPM) - currentTime; float diff = CGame.GetTimeFromBeats(lines[currentLineSub + 1].FirstNoteBeat, song.BPM) - currentTime;
+1 -1
View File
@@ -1067,7 +1067,7 @@ namespace Vocaluxe.Screens
case ESongSorting.TR_CONFIG_FOLDER: case ESongSorting.TR_CONFIG_FOLDER:
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)) if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
start = curSelected + 1; start = curSelected + 1;
visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase)); visibleID = _FindIndex(songs, start, element => element.FolderName.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
break; break;
} }
if (visibleID > -1) if (visibleID > -1)
+6 -7
View File
@@ -31,7 +31,8 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>3d91144f</NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@@ -542,12 +543,11 @@
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets'))" /> <Error Condition="!Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets'))" />
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets'))" /> <Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets'))" /> <Error Condition="!Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets'))" /> <Error Condition="!Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets'))" /> <Error Condition="!Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets'))" /> <Error Condition="!Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets'))" />
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets'))" /> <Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets'))" /> <Error Condition="!Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets'))" />
</Target> </Target>
<Import Project="..\packages\vocaluxe.dependencies.acinerella.1.0.5\build\vocaluxe.dependencies.acinerella.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.5\build\vocaluxe.dependencies.acinerella.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.acinerella.1.0.5\build\vocaluxe.dependencies.acinerella.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.5\build\vocaluxe.dependencies.acinerella.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets" Condition="Exists('..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets" Condition="Exists('..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets')" />
@@ -556,10 +556,9 @@
<Import Project="..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets" Condition="Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets" Condition="Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets" Condition="Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets" Condition="Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets" Condition="Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets" Condition="Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets" Condition="Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets" Condition="Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets" Condition="Exists('..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets')" /> <Import Project="..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets')" />
</Project> </Project>
+3 -3
View File
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="vocaluxe.dependencies" version="1.0.11" targetFramework="net40" /> <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net471" />
<package id="vocaluxe.dependencies.acinerella" version="1.0.5" targetFramework="net40" /> <package id="vocaluxe.dependencies.acinerella" version="1.0.5" targetFramework="net40" />
<package id="vocaluxe.dependencies.aforgevideo" version="1.0.1" targetFramework="net40" /> <package id="vocaluxe.dependencies.aforgevideo" version="1.0.1" targetFramework="net40" />
<package id="vocaluxe.dependencies.csharpsqlite" version="1.0.1" targetFramework="net40" /> <package id="vocaluxe.dependencies.csharpsqlite" version="1.0.1" targetFramework="net40" />
<package id="vocaluxe.dependencies.ffmpeg" version="1.0.4" targetFramework="net40" /> <package id="vocaluxe.dependencies.ffmpeg" version="1.0.4" targetFramework="net40" />
<package id="vocaluxe.dependencies.gstreamer" version="1.0.2" targetFramework="net40" /> <package id="vocaluxe.dependencies.gstreamer" version="1.0.3" targetFramework="net40" />
<package id="vocaluxe.dependencies.gstreamersharp" version="1.0.1" targetFramework="net40" /> <package id="vocaluxe.dependencies.gstreamersharp" version="1.0.1" targetFramework="net40" />
<package id="vocaluxe.dependencies.hidapi" version="1.0.4" targetFramework="net40" /> <package id="vocaluxe.dependencies.hidapi" version="1.0.4" targetFramework="net40" />
<package id="vocaluxe.dependencies.opentk" version="1.0.1" targetFramework="net40" /> <package id="vocaluxe.dependencies.opentk" version="1.0.1" targetFramework="net40" />
<package id="vocaluxe.dependencies.portaudiosharp" version="1.0.2" targetFramework="net40" /> <package id="vocaluxe.dependencies.portaudiosharp" version="1.0.3" targetFramework="net40" />
<package id="vocaluxe.dependencies.qrcoder" version="1.0.1" targetFramework="net40" /> <package id="vocaluxe.dependencies.qrcoder" version="1.0.1" targetFramework="net40" />
<package id="vocaluxe.dependencies.slimdx" version="1.0.1" targetFramework="net40" /> <package id="vocaluxe.dependencies.slimdx" version="1.0.1" targetFramework="net40" />
<package id="vocaluxe.dependencies.sqlite" version="1.0.1" targetFramework="net40" /> <package id="vocaluxe.dependencies.sqlite" version="1.0.1" targetFramework="net40" />
+1 -1
View File
@@ -135,7 +135,7 @@ namespace VocaluxeLib.Menu
MaxRect = button.MaxRect; MaxRect = button.MaxRect;
Color = button.Color; Color = button.Color;
SelColor = button.Color; SelColor = button.SelColor;
Texture = button.Texture; Texture = button.Texture;
SelTexture = button.SelTexture; SelTexture = button.SelTexture;
+12 -3
View File
@@ -15,6 +15,7 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>. // along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion #endregion
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using VocaluxeLib.Draw; using VocaluxeLib.Draw;
@@ -587,12 +588,15 @@ namespace VocaluxeLib.Menu
} }
else else
{ {
_NumPlayerTeams[i] = _NumPlayer; //Get average num players per teams as default player number
_NumPlayerTeams[i] = _NumPlayer/(_NumTeams - 1);
_NumPlayer += _NumPlayerTeams[i];
_TeamList[i] = new List<int>(); _TeamList[i] = new List<int>();
} }
} }
} }
_UpdateButtonState(); _UpdateButtonState();
_UpdateTeamSlide();
} }
public void DecreaseTeamNum() public void DecreaseTeamNum()
@@ -603,6 +607,7 @@ namespace VocaluxeLib.Menu
if (_NumTeams - 1 >= _PartyMode.MinTeams) if (_NumTeams - 1 >= _PartyMode.MinTeams)
_NumTeams--; _NumTeams--;
_UpdateButtonState(); _UpdateButtonState();
_UpdateTeamSlide();
} }
public void IncreasePlayerNum(int team) public void IncreasePlayerNum(int team)
@@ -691,16 +696,20 @@ namespace VocaluxeLib.Menu
private void _UpdateTeamSlide() private void _UpdateTeamSlide()
{ {
int sel = _SelectSlides[_SelectSlideTeams].Selection;
_SelectSlides[_SelectSlideTeams].Visible = _Teams; _SelectSlides[_SelectSlideTeams].Visible = _Teams;
_SelectSlides[_SelectSlideTeams].Clear(); _SelectSlides[_SelectSlideTeams].Clear();
for (int i = 1; i <= _NumTeams; i++) for (int i = 1; i <= _NumTeams; i++)
_SelectSlides[_SelectSlideTeams].AddValue("Team " + i, null, i); _SelectSlides[_SelectSlideTeams].AddValue("Team " + i, null, i);
_SelectSlides[_SelectSlideTeams].Selection = Math.Min(sel, _SelectSlides[_SelectSlideTeams].NumValues - 1);
} }
private void _UpdateButtonVisibility() private void _UpdateButtonVisibility()
{ {
_Buttons[_ButtonIncreaseTeams].Visible = _AllowChangePlayerNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams; _Buttons[_ButtonIncreaseTeams].Visible = _AllowChangeTeamNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
_Buttons[_ButtonDecreaseTeams].Visible = _AllowChangePlayerNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams; _Buttons[_ButtonDecreaseTeams].Visible = _AllowChangeTeamNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
_Buttons[_ButtonIncreasePlayer].Visible = _AllowChangePlayerNum; _Buttons[_ButtonIncreasePlayer].Visible = _AllowChangePlayerNum;
_Buttons[_ButtonDecreasePlayer].Visible = _AllowChangePlayerNum; _Buttons[_ButtonDecreasePlayer].Visible = _AllowChangePlayerNum;
} }
+2 -2
View File
@@ -554,7 +554,7 @@ namespace VocaluxeLib.Menu
break; break;
case Keys.Enter: case Keys.Enter:
_StartPlaylistSong(_CurrentPlaylistElement); _StartPlaylistSong(_CurrentPlaylistElement + _Offset);
break; break;
case Keys.Add: //move the selected song up case Keys.Add: //move the selected song up
@@ -880,7 +880,7 @@ namespace VocaluxeLib.Menu
//Start selected song with double click //Start selected song with double click
if (mouseEvent.LD && _CurrentPlaylistElement != -1) if (mouseEvent.LD && _CurrentPlaylistElement != -1)
_StartPlaylistSong(_CurrentPlaylistElement); _StartPlaylistSong(_CurrentPlaylistElement + _Offset);
//Change order with holding LB //Change order with holding LB
if (mouseEvent.LBH && _CurrentPlaylistElement != -1 && _PlaylistElementContents.Count > 0 && DragAndDropSongID == -1) if (mouseEvent.LBH && _CurrentPlaylistElement != -1 && _PlaylistElementContents.Count > 0 && DragAndDropSongID == -1)
+1
View File
@@ -586,6 +586,7 @@ namespace VocaluxeLib.Menu
Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID), Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID),
Img = new CStatic(_PartyModeID) Img = new CStatic(_PartyModeID)
}; };
el.Img.Aspect = EAspect.Crop;
_VisibleElements.Add(el); _VisibleElements.Add(el);
} }
} }
+3 -1
View File
@@ -541,7 +541,9 @@ namespace VocaluxeLib.Menu.SongMenu
} }
_TextBG.Draw(); _TextBG.Draw();
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null; CTextureRef vidtex = null;
if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null);
if (vidtex != null) if (vidtex != null)
{ {
@@ -515,7 +515,9 @@ namespace VocaluxeLib.Menu.SongMenu
_TextBG.Draw(); _TextBG.Draw();
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null; CTextureRef vidtex = null;
if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null);
if (vidtex != null) if (vidtex != null)
{ {
+1 -1
View File
@@ -67,7 +67,7 @@ namespace VocaluxeLib.Profile
{ {
Avatar = CBase.Profiles.GetAvatarByFilename(value); Avatar = CBase.Profiles.GetAvatarByFilename(value);
if (Avatar == null) if (Avatar == null)
throw new Exception("Avatar '" + value + "' not found"); CBase.Log.LogError("Avatar '" + value + "' not found");
} }
} }
+3 -3
View File
@@ -9,7 +9,7 @@ platform:
clone_depth: 15 clone_depth: 15
environment: environment:
GitHubKey: GitHubKey:
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW secure: sGetWh2XUYs95VBT+QYNPtDW9Rh2/JBuxNNYXytpn7mMudUMcjSKDGErkCTum+ZE
install: install:
- ps: | - ps: |
$Env:CurrentCommitSha = "$(git rev-parse --verify HEAD)" $Env:CurrentCommitSha = "$(git rev-parse --verify HEAD)"
@@ -88,7 +88,7 @@ deploy:
release: $(APPVEYOR_REPO_TAG_NAME) release: $(APPVEYOR_REPO_TAG_NAME)
description: $(APPVEYOR_REPO_COMMIT) description: $(APPVEYOR_REPO_COMMIT)
auth_token: auth_token:
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW secure: sGetWh2XUYs95VBT+QYNPtDW9Rh2/JBuxNNYXytpn7mMudUMcjSKDGErkCTum+ZE
artifact: ReleaseZip artifact: ReleaseZip
prerelease: $(IS_BETA_RELEASE) prerelease: $(IS_BETA_RELEASE)
on: on:
@@ -100,7 +100,7 @@ deploy:
release: Latest Nightly build release: Latest Nightly build
description: $(APPVEYOR_REPO_COMMIT) description: $(APPVEYOR_REPO_COMMIT)
auth_token: auth_token:
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW secure: sGetWh2XUYs95VBT+QYNPtDW9Rh2/JBuxNNYXytpn7mMudUMcjSKDGErkCTum+ZE
artifact: ReleaseZip artifact: ReleaseZip
prerelease: true prerelease: true
on: on: