Fix the MSVC build.
authorJoshua Bowman <silverbacknet@gmail.com>
Tue, 23 Oct 2012 19:18:38 +0000 (12:18 -0700)
committerRalph Giles <giles@mozilla.com>
Tue, 23 Oct 2012 19:20:32 +0000 (12:20 -0700)
Updates the project files to include the new encoder source files.
Use OPUS_RESTRICT and include config.h to set the proper defines
for build under MSVC.

src/analysis.c
src/mlp.c
src/opus.vcxproj
src/opus.vcxproj.filters

index 48832d5..b3be892 100644 (file)
@@ -142,9 +142,9 @@ void tonality_analysis(TonalityAnalysisState *tonal, AnalysisInfo *info, CELTEnc
     const kiss_fft_state *kfft;
     kiss_fft_cpx in[480], out[480];
     int N = 480, N2=240;
-    float * restrict A = tonal->angle;
-    float * restrict dA = tonal->d_angle;
-    float * restrict d2A = tonal->d2_angle;
+    float * OPUS_RESTRICT A = tonal->angle;
+    float * OPUS_RESTRICT dA = tonal->d_angle;
+    float * OPUS_RESTRICT d2A = tonal->d2_angle;
     float tonality[240];
     float noisiness[240];
     float band_tonality[NB_TBANDS];
index f5f3481..32380fd 100644 (file)
--- a/src/mlp.c
+++ b/src/mlp.c
@@ -25,6 +25,9 @@
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <math.h>
 #include "mlp.h"
index a04d4c6..4707408 100644 (file)
     </CustomBuildStep>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
+    <ClCompile Include="analysis.c" />\r
+    <ClCompile Include="mlp.c" />\r
+    <ClCompile Include="mlp_data.c" />\r
     <ClCompile Include="opus.c" />\r
     <ClCompile Include="opus_decoder.c" />\r
     <ClCompile Include="opus_encoder.c" />\r
     <ClInclude Include="..\include\opus_types.h" />\r
     <ClInclude Include="..\include\opus_multistream.h" />\r
     <ClInclude Include="..\win32\config.h" />\r
+    <ClInclude Include="analysis.h" />\r
+    <ClInclude Include="mlp.h" />\r
     <ClInclude Include="opus_private.h" />\r
   </ItemGroup>\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
-</Project>
\ No newline at end of file
+</Project>\r
index 1d1cd84..93d7a09 100644 (file)
     <ClCompile Include="opus_multistream.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="analysis.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="mlp.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="mlp_data.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\win32\config.h">
     <ClInclude Include="..\include\opus_multistream.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="analysis.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="mlp.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>
\ No newline at end of file