Skip to content

Commit

Permalink
Stubs - compiles fine now
Browse files Browse the repository at this point in the history
  • Loading branch information
CookiePLMonster committed Jan 22, 2017
1 parent 1f21f25 commit 458b817
Show file tree
Hide file tree
Showing 6 changed files with 160 additions and 55 deletions.
22 changes: 22 additions & 0 deletions dllmain.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include "vbdec.h"

#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
{
//UNREFERENCED_PARAMETER(hModule);
UNREFERENCED_PARAMETER(lpReserved);

switch ( reason )
{
case DLL_PROCESS_ATTACH:
RegisterVBInterface();
break;
case DLL_PROCESS_DETACH:
UnregisterVBInterface();
break;
}
return TRUE;
}
91 changes: 91 additions & 0 deletions vbdec.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#include "vbdec.h"


static HPROVIDER providerHandle;
void RegisterVBInterface()
{
// ASI codec
const RIB_INTERFACE_ENTRY codecEntries[] = {
REG_FN(PROVIDER_query_attribute),
REG_AT("Name", PROVIDER_NAME, RIB_STRING),
REG_AT("Version", PROVIDER_VERSION, RIB_HEX),
REG_AT("Input file types", 0, RIB_STRING),
REG_AT("Input wave tag", 1, RIB_DEC),
REG_AT("Output file types", 2, RIB_STRING),
REG_AT("Maximum frame size", 3, RIB_DEC),
REG_FN(ASI_startup),
REG_FN(ASI_error),
REG_FN(ASI_shutdown),
};

// ASI stream
/*const RIB_INTERFACE_ENTRY streamEntries[] = {
REG_FN(ASI_stream_open),
};*/

providerHandle = RIB_provider_library_handle();
RIB_register( providerHandle, "ASI codec", codecEntries );
//RIB_register( providerHandle, "ASI stream", streamEntries );
}

void UnregisterVBInterface()
{
RIB_unregister_all(providerHandle);
}


U32 AILCALL FAR PROVIDER_query_attribute(HATTRIB index)
{
switch ( index )
{
case PROVIDER_NAME:
return (U32)"MSS VB Audio Decoder";
case PROVIDER_VERSION:
return 0x100;
case 0: // Input file types
return (U32)"VB audio files\0*.VB";
case 1: // Input wave tag
return 85;
case 2: // Output file types;
return (U32)"Raw PCM files\0*.RAW";
case 3: // Maximum frame size
return 0x1000;
default:
return 0;
}
}

static int startingCount = 0;
ASIRESULT AILCALL FAR ASI_startup(void)
{
// TODO: Implement
if ( startingCount++ == 0 )
{
return ASI_NOERR;
}
else
{
return ASI_ALREADY_STARTED;
}

}

ASIRESULT AILCALL FAR ASI_shutdown(void)
{
// TODO: Implement
if ( startingCount != 0 )
{
startingCount--;
return ASI_NOERR;
}
else
{
return ASI_NOT_INIT;
}
}

C8 FAR* AILCALL FAR ASI_error(void)
{
// TODO: Implement
return nullptr;
}
11 changes: 11 additions & 0 deletions vbdec.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#include "mss/mss.h"

void RegisterVBInterface();
void UnregisterVBInterface();

U32 AILCALL FAR PROVIDER_query_attribute(HATTRIB index);
ASIRESULT AILCALL FAR ASI_startup(void);
ASIRESULT AILCALL FAR ASI_shutdown(void);
C8 FAR* AILCALL FAR ASI_error(void);
6 changes: 0 additions & 6 deletions vbdec.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vbdec", "vbdec.vcxproj", "{
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5257A187-36BF-4998-81EB-B7344F3D92FD}.Debug|x64.ActiveCfg = Debug|x64
{5257A187-36BF-4998-81EB-B7344F3D92FD}.Debug|x64.Build.0 = Debug|x64
{5257A187-36BF-4998-81EB-B7344F3D92FD}.Debug|x86.ActiveCfg = Debug|Win32
{5257A187-36BF-4998-81EB-B7344F3D92FD}.Debug|x86.Build.0 = Debug|Win32
{5257A187-36BF-4998-81EB-B7344F3D92FD}.Release|x64.ActiveCfg = Release|x64
{5257A187-36BF-4998-81EB-B7344F3D92FD}.Release|x64.Build.0 = Release|x64
{5257A187-36BF-4998-81EB-B7344F3D92FD}.Release|x86.ActiveCfg = Release|Win32
{5257A187-36BF-4998-81EB-B7344F3D92FD}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
Expand Down
66 changes: 17 additions & 49 deletions vbdec.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{5257A187-36BF-4998-81EB-B7344F3D92FD}</ProjectGuid>
Expand All @@ -25,26 +17,13 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
Expand All @@ -61,42 +40,24 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<TargetExt>.asi</TargetExt>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetExt>.asi</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>mss/mss32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
Expand All @@ -107,9 +68,16 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>mss/mss32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="vbdec.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="mss\mss.h" />
<ClInclude Include="vbdec.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
19 changes: 19 additions & 0 deletions vbdec.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,24 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Header Files\mss">
<UniqueIdentifier>{b15ad6e8-913c-43a3-8c2a-690af29b81de}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="vbdec.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="vbdec.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="mss\mss.h">
<Filter>Header Files\mss</Filter>
</ClInclude>
</ItemGroup>
</Project>

0 comments on commit 458b817

Please sign in to comment.