Преглед на файлове

Fehler in der Lautstärke behoben

Kolja Strohm преди 5 години
родител
ревизия
d8389574f0
променени са 2 файла, в които са добавени 12 реда и са изтрити 8 реда
  1. 7 4
      GSL/GSL.vcxproj
  2. 5 4
      GSL/Sound.cpp

+ 7 - 4
GSL/GSL.vcxproj

@@ -88,16 +88,19 @@
     <LinkIncremental>true</LinkIncremental>
     <IncludePath>..\..\Framework;$(IncludePath)</IncludePath>
     <LibraryPath>..\..\Framework\x64\Debug;$(LibraryPath)</LibraryPath>
+    <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <LinkIncremental>false</LinkIncremental>
     <IncludePath>..\..\Framework;$(IncludePath)</IncludePath>
     <LibraryPath>..\..\Framework\Release;$(LibraryPath)</LibraryPath>
+    <OutDir>..\$(Configuration)\</OutDir>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <LinkIncremental>false</LinkIncremental>
     <IncludePath>..\..\Framework;$(IncludePath)</IncludePath>
     <LibraryPath>..\..\Framework\x64\Release;$(LibraryPath)</LibraryPath>
+    <OutDir>..\$(Platform)\$(Configuration)\</OutDir>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
@@ -127,8 +130,8 @@
       <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
     <CustomBuildStep>
-      <Command>copy "x64\Debug\GSL.dll" "..\..\..\Spiele Platform\Klient\patcher\patcher\data\bin\GSL.dll"
-copy "x64\Debug\GSL.dll" "..\..\..\Spiele Platform\Klient\Fertig\Debug\x64\data\bin\GSL.dll"</Command>
+      <Command>copy "..\x64\Debug\GSL.dll" "..\..\..\Spiele Platform\Klient\patcher\patcher\data\bin\GSL.dll"
+copy "..\x64\Debug\GSL.dll" "..\..\..\Spiele Platform\Klient\Fertig\Debug\x64\data\bin\GSL.dll"</Command>
     </CustomBuildStep>
     <CustomBuildStep>
       <Outputs>kopieren...;%(Outputs)</Outputs>
@@ -153,7 +156,7 @@ copy "x64\Debug\GSL.dll" "..\..\..\Spiele Platform\Klient\Fertig\Debug\x64\data\
       <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
     <CustomBuildStep>
-      <Command>copy "Release\GSL.dll" "..\..\..\Spiele Platform\Klient\Fertig\x32\data\bin\GSL.dll"</Command>
+      <Command>copy "..\Release\GSL.dll" "..\..\..\Spiele Platform\Klient\Fertig\x32\data\bin\GSL.dll"</Command>
     </CustomBuildStep>
     <CustomBuildStep>
       <Outputs>kopieren...;%(Outputs)</Outputs>
@@ -178,7 +181,7 @@ copy "x64\Debug\GSL.dll" "..\..\..\Spiele Platform\Klient\Fertig\Debug\x64\data\
       <AdditionalDependencies>Framework.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Link>
     <CustomBuildStep>
-      <Command>copy "x64\Release\GSL.dll" "..\..\..\Spiele Platform\Klient\Fertig\x64\data\bin\GSL.dll"</Command>
+      <Command>copy "..\x64\Release\GSL.dll" "..\..\..\Spiele Platform\Klient\Fertig\x64\data\bin\GSL.dll"</Command>
     </CustomBuildStep>
     <CustomBuildStep>
       <Outputs>kopieren...;%(Outputs)</Outputs>

+ 5 - 4
GSL/Sound.cpp

@@ -240,12 +240,13 @@ int GSLSound::audioLesen( char *buff, int len )
     if( len > 0 )
         dat->lese( buff, len );
 #ifdef WIN32
-    for( int i = 0; i < len; i++, buff++ )
+    short *ucb = (short *)buff;
+    for( int i = 0; i < len / 2; i++, ucb++ )
     {
-        if( i % 4 >= 2 )
-            *buff = (char)( *buff * rechtsV );
+        if( i % 2 == 1 )
+            *ucb = (short)( *ucb * rechtsV );
         else
-            *buff = (char)( *buff * linksV );
+            *ucb = (short)( *ucb * linksV );
     }
 #endif
     return len;