initial checkin

This commit is contained in:
chudov
2008-10-13 19:25:11 +00:00
parent 2e379c72e2
commit 36757fca7a
937 changed files with 184964 additions and 0 deletions

View File

@@ -0,0 +1,233 @@
#include "MACDll.h"
#include "resource.h"
#include "WinFileIO.h"
#include "APEInfoDialog.h"
#include "WAVInfoDialog.h"
#include "APEDecompress.h"
#include "APECompressCreate.h"
#include "APECompressCore.h"
#include "APECompress.h"
#include "APEInfo.h"
#include "APETag.h"
#include "CharacterHelper.h"
int __stdcall GetVersionNumber()
{
return MAC_VERSION_NUMBER;
}
int __stdcall GetInterfaceCompatibility(int nVersion, BOOL bDisplayWarningsOnFailure, HWND hwndParent)
{
int nRetVal = 0;
if (nVersion > MAC_VERSION_NUMBER)
{
nRetVal = -1;
if (bDisplayWarningsOnFailure)
{
TCHAR cMessage[1024];
_stprintf(cMessage, _T("You system does not have a new enough version of Monkey's Audio installed.\n")
_T("Please visit www.monkeysaudio.com for the latest version.\n\n(version %.2f or later required)"),
float(nVersion) / float(1000));
MessageBox(hwndParent, cMessage, _T("Please Update Monkey's Audio"), MB_OK | MB_ICONINFORMATION);
}
}
else if (nVersion < 3940)
{
nRetVal = -1;
if (bDisplayWarningsOnFailure)
{
TCHAR cMessage[1024];
_stprintf(cMessage, _T("This program is trying to use an old version of Monkey's Audio.\n")
_T("Please contact the author about updating their support for Monkey's Audio.\n\n")
_T("Monkey's Audio currently installed: %.2f\nProgram is searching for: %.2f"),
float(MAC_VERSION_NUMBER) / float(1000), float(nVersion) / float(1000));
MessageBox(hwndParent, cMessage, _T("Program Requires Updating"), MB_OK | MB_ICONINFORMATION);
}
}
return nRetVal;
}
int __stdcall ShowFileInfoDialog(const str_ansi * pFilename, HWND hwndWindow)
{
// convert the filename
CSmartPtr<wchar_t> spFilename(GetUTF16FromANSI(pFilename), TRUE);
// make sure the file exists
WIN32_FIND_DATA FindData = { 0 };
HANDLE hFind = FindFirstFile(spFilename, &FindData);
if (hFind == INVALID_HANDLE_VALUE)
{
MessageBox(hwndWindow, _T("File not found."), _T("File Info"), MB_OK);
return 0;
}
else
{
FindClose(hFind);
}
// see what type the file is
if ((_tcsicmp(&spFilename[_tcslen(spFilename) - 4], _T(".ape")) == 0) ||
(_tcsicmp(&spFilename[_tcslen(spFilename) - 4], _T(".apl")) == 0))
{
CAPEInfoDialog APEInfoDialog;
APEInfoDialog.ShowAPEInfoDialog(spFilename, GetModuleHandle(_T("MACDll.dll")), (LPCTSTR) IDD_APE_INFO, hwndWindow);
return 0;
}
else if (_tcsicmp(&spFilename[_tcslen(spFilename) - 4], _T(".wav")) == 0)
{
CWAVInfoDialog WAVInfoDialog;
WAVInfoDialog.ShowWAVInfoDialog(spFilename, GetModuleHandle(_T("MACDll.dll")), (LPCTSTR) IDD_WAV_INFO, hwndWindow);
return 0;
}
else
{
MessageBox(hwndWindow, _T("File type not supported. (only .ape, .apl, and .wav files currently supported)"), _T("File Info: Unsupported File Type"), MB_OK);
return 0;
};
}
int __stdcall TagFileSimple(const str_ansi * pFilename, const char * pArtist, const char * pAlbum, const char * pTitle, const char * pComment, const char * pGenre, const char * pYear, const char * pTrack, BOOL bClearFirst, BOOL bUseOldID3)
{
CSmartPtr<wchar_t> spFilename(GetUTF16FromANSI(pFilename), TRUE);
IO_CLASS_NAME FileIO;
if (FileIO.Open(spFilename) != 0)
return -1;
CAPETag APETag(&FileIO, TRUE);
if (bClearFirst)
APETag.ClearFields();
APETag.SetFieldString(APE_TAG_FIELD_ARTIST, pArtist, TRUE);
APETag.SetFieldString(APE_TAG_FIELD_ALBUM, pAlbum, TRUE);
APETag.SetFieldString(APE_TAG_FIELD_TITLE, pTitle, TRUE);
APETag.SetFieldString(APE_TAG_FIELD_GENRE, pGenre, TRUE);
APETag.SetFieldString(APE_TAG_FIELD_YEAR, pYear, TRUE);
APETag.SetFieldString(APE_TAG_FIELD_COMMENT, pComment, TRUE);
APETag.SetFieldString(APE_TAG_FIELD_TRACK, pTrack, TRUE);
if (APETag.Save(bUseOldID3) != 0)
{
return -1;
}
return 0;
}
int __stdcall GetID3Tag(const str_ansi * pFilename, ID3_TAG * pID3Tag)
{
CSmartPtr<wchar_t> spFilename(GetUTF16FromANSI(pFilename), TRUE);
IO_CLASS_NAME FileIO;
if (FileIO.Open(spFilename) != 0)
return -1;
CAPETag APETag(&FileIO, TRUE);
return APETag.CreateID3Tag(pID3Tag);
}
int __stdcall RemoveTag(char * pFilename)
{
CSmartPtr<wchar_t> spFilename(GetUTF16FromANSI(pFilename), TRUE);
int nErrorCode = ERROR_SUCCESS;
CSmartPtr<IAPEDecompress> spAPEDecompress(CreateIAPEDecompress(spFilename, &nErrorCode));
if (spAPEDecompress == NULL) return -1;
GET_TAG(spAPEDecompress)->Remove(FALSE);
return 0;
}
/*****************************************************************************************
CAPEDecompress wrapper(s)
*****************************************************************************************/
APE_DECOMPRESS_HANDLE __stdcall c_APEDecompress_Create(const str_ansi * pFilename, int * pErrorCode)
{
CSmartPtr<wchar_t> spFilename(GetUTF16FromANSI(pFilename), TRUE);
return (APE_DECOMPRESS_HANDLE) CreateIAPEDecompress(spFilename, pErrorCode);
}
APE_DECOMPRESS_HANDLE __stdcall c_APEDecompress_CreateW(const str_utf16 * pFilename, int * pErrorCode)
{
return (APE_DECOMPRESS_HANDLE) CreateIAPEDecompress(pFilename, pErrorCode);
}
void __stdcall c_APEDecompress_Destroy(APE_DECOMPRESS_HANDLE hAPEDecompress)
{
IAPEDecompress * pAPEDecompress = (IAPEDecompress *) hAPEDecompress;
if (pAPEDecompress)
delete pAPEDecompress;
}
int __stdcall c_APEDecompress_GetData(APE_DECOMPRESS_HANDLE hAPEDecompress, char * pBuffer, int nBlocks, int * pBlocksRetrieved)
{
return ((IAPEDecompress *) hAPEDecompress)->GetData(pBuffer, nBlocks, pBlocksRetrieved);
}
int __stdcall c_APEDecompress_Seek(APE_DECOMPRESS_HANDLE hAPEDecompress, int nBlockOffset)
{
return ((IAPEDecompress *) hAPEDecompress)->Seek(nBlockOffset);
}
int __stdcall c_APEDecompress_GetInfo(APE_DECOMPRESS_HANDLE hAPEDecompress, APE_DECOMPRESS_FIELDS Field, int nParam1, int nParam2)
{
return ((IAPEDecompress *) hAPEDecompress)->GetInfo(Field, nParam1, nParam2);
}
/*****************************************************************************************
CAPECompress wrapper(s)
*****************************************************************************************/
APE_COMPRESS_HANDLE __stdcall c_APECompress_Create(int * pErrorCode)
{
return (APE_COMPRESS_HANDLE) CreateIAPECompress(pErrorCode);
}
void __stdcall c_APECompress_Destroy(APE_COMPRESS_HANDLE hAPECompress)
{
IAPECompress * pAPECompress = (IAPECompress *) hAPECompress;
if (pAPECompress)
delete pAPECompress;
}
int __stdcall c_APECompress_Start(APE_COMPRESS_HANDLE hAPECompress, const char * pOutputFilename, const WAVEFORMATEX * pwfeInput, int nMaxAudioBytes, int nCompressionLevel, const void * pHeaderData, int nHeaderBytes)
{
CSmartPtr<wchar_t> spOutputFilename(GetUTF16FromANSI(pOutputFilename), TRUE);
return ((IAPECompress *) hAPECompress)->Start(spOutputFilename, pwfeInput, nMaxAudioBytes, nCompressionLevel, pHeaderData, nHeaderBytes);
}
int __stdcall c_APECompress_StartW(APE_COMPRESS_HANDLE hAPECompress, const str_utf16 * pOutputFilename, const WAVEFORMATEX * pwfeInput, int nMaxAudioBytes, int nCompressionLevel, const void * pHeaderData, int nHeaderBytes)
{
return ((IAPECompress *) hAPECompress)->Start(pOutputFilename, pwfeInput, nMaxAudioBytes, nCompressionLevel, pHeaderData, nHeaderBytes);
}
int __stdcall c_APECompress_AddData(APE_COMPRESS_HANDLE hAPECompress, unsigned char * pData, int nBytes)
{
return ((IAPECompress *) hAPECompress)->AddData(pData, nBytes);
}
int __stdcall c_APECompress_GetBufferBytesAvailable(APE_COMPRESS_HANDLE hAPECompress)
{
return ((IAPECompress *) hAPECompress)->GetBufferBytesAvailable();
}
unsigned char * __stdcall c_APECompress_LockBuffer(APE_COMPRESS_HANDLE hAPECompress, int * pBytesAvailable)
{
return ((IAPECompress *) hAPECompress)->LockBuffer(pBytesAvailable);
}
int __stdcall c_APECompress_UnlockBuffer(APE_COMPRESS_HANDLE hAPECompress, int nBytesAdded, BOOL bProcess)
{
return ((IAPECompress *) hAPECompress)->UnlockBuffer(nBytesAdded, bProcess);
}
int __stdcall c_APECompress_Finish(APE_COMPRESS_HANDLE hAPECompress, unsigned char * pTerminatingData, int nTerminatingBytes, int nWAVTerminatingBytes)
{
return ((IAPECompress *) hAPECompress)->Finish(pTerminatingData, nTerminatingBytes, nWAVTerminatingBytes);
}
int __stdcall c_APECompress_Kill(APE_COMPRESS_HANDLE hAPECompress)
{
return ((IAPECompress *) hAPECompress)->Kill();
}

View File

@@ -0,0 +1,38 @@
LIBRARY MACDll
EXPORTS
; basic functions
CompressFile
DecompressFile
ConvertFile
VerifyFile
; interface wrappers
c_APEDecompress_Create
c_APEDecompress_Destroy
c_APEDecompress_GetData
c_APEDecompress_Seek
c_APEDecompress_GetInfo
c_APECompress_Create
c_APECompress_Destroy
c_APECompress_Start
c_APECompress_AddData
c_APECompress_GetBufferBytesAvailable
c_APECompress_LockBuffer
c_APECompress_UnlockBuffer
c_APECompress_Finish
c_APECompress_Kill
; helpers / miscellaneous
GetVersionNumber
GetInterfaceCompatibility
ShowFileInfoDialog
RemoveTag
TagFileSimple
GetID3Tag
FillWaveHeader
FillWaveFormatEx

View File

@@ -0,0 +1,160 @@
# Microsoft Developer Studio Project File - Name="MACDll" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=MACDll - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "MACDll.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "MACDll.mak" CFG="MACDll - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "MACDll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "MACDll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""$/Monkey's Audio/MACDll", KCAAAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "MACDll - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MACDLL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Ot /Og /Oi /Ob2 /I "..\MACLib\\" /I "..\Shared\\" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MACDLL_EXPORTS" /FR /YX /FD /c
# SUBTRACT CPP /Oa
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib maclib.lib /nologo /dll /machine:I386 /libpath:"..\MACLib\Release"
# SUBTRACT LINK32 /profile
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Desc=Performing post build step...
PostBuild_Cmds=copy Release\MACDll.dll c:\Windows\System32\MACDll.dll
# End Special Build Tool
!ELSEIF "$(CFG)" == "MACDll - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MACDLL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\MACLib\\" /I "..\Shared\\" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MACDLL_EXPORTS" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 maclib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"..\MACLib\Debug"
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Desc=Performing post build step...
PostBuild_Cmds=copy Debug\MACDll.dll c:\Windows\System32\MACDll.dll
# End Special Build Tool
!ENDIF
# Begin Target
# Name "MACDll - Win32 Release"
# Name "MACDll - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\Shared\APEInfoDialog.cpp
# End Source File
# Begin Source File
SOURCE=.\MACDll.cpp
# End Source File
# Begin Source File
SOURCE=.\MACDll.def
# End Source File
# Begin Source File
SOURCE=".\Resource Script.rc"
# End Source File
# Begin Source File
SOURCE=..\Shared\WAVInfoDialog.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\Shared\APEInfoDialog.h
# End Source File
# Begin Source File
SOURCE=.\MACDll.h
# End Source File
# Begin Source File
SOURCE=.\resource.h
# End Source File
# Begin Source File
SOURCE=..\Shared\WAVInfoDialog.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=".\Monkey Head (1).ico"
# End Source File
# Begin Source File
SOURCE=".\Monkey Head.ico"
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,99 @@
/*****************************************************************************************
Monkey's Audio MACDll.h (include for using MACDll.dll in your projects)
Copyright (C) 2000-2004 by Matthew T. Ashland All Rights Reserved.
Overview:
Basically all this dll does is wrap MACLib.lib, so browse through MACLib.h for documentation
on how to use the interfaces.
Questions / Suggestions:
Please direct questions or comments to the Monkey's Audio developers board:
http://www.monkeysaudio.com/cgi-bin/YaBB/YaBB.cgi -> Developers
or, if necessary, matt @ monkeysaudio.com
*****************************************************************************************/
#ifndef APE_MACDLL_H
#define APE_MACDLL_H
/*****************************************************************************************
Includes
*****************************************************************************************/
#include "All.h"
#include "MACLib.h"
/*****************************************************************************************
Defines (implemented elsewhere)
*****************************************************************************************/
struct ID3_TAG;
/*****************************************************************************************
Helper functions
*****************************************************************************************/
extern "C"
{
__declspec( dllexport ) int __stdcall GetVersionNumber();
__declspec( dllexport ) int __stdcall GetInterfaceCompatibility(int nVersion, BOOL bDisplayWarningsOnFailure = TRUE, HWND hwndParent = NULL);
__declspec( dllexport ) int __stdcall ShowFileInfoDialog(const str_ansi * pFilename, HWND hwndWindow);
__declspec( dllexport ) int __stdcall TagFileSimple(const str_ansi * pFilename, const char * pArtist, const char * pAlbum, const char * pTitle, const char * pComment, const char * pGenre, const char * pYear, const char * pTrack, BOOL bClearFirst, BOOL bUseOldID3);
__declspec( dllexport ) int __stdcall GetID3Tag(const str_ansi * pFilename, ID3_TAG * pID3Tag);
__declspec( dllexport ) int __stdcall RemoveTag(const str_ansi * pFilename);
}
typedef int (__stdcall * proc_GetVersionNumber)();
typedef int (__stdcall * proc_GetInterfaceCompatibility)(int, BOOL, HWND);
/*****************************************************************************************
IAPECompress wrapper(s)
*****************************************************************************************/
typedef void * APE_COMPRESS_HANDLE;
typedef APE_COMPRESS_HANDLE (__stdcall * proc_APECompress_Create)(int *);
typedef void (__stdcall * proc_APECompress_Destroy)(APE_COMPRESS_HANDLE);
typedef int (__stdcall * proc_APECompress_Start)(APE_COMPRESS_HANDLE, const char *, const WAVEFORMATEX *, int, int, const void *, int);
typedef int (__stdcall * proc_APECompress_StartW)(APE_COMPRESS_HANDLE, const char *, const WAVEFORMATEX *, int, int, const void *, int);
typedef int (__stdcall * proc_APECompress_AddData)(APE_COMPRESS_HANDLE, unsigned char *, int);
typedef int (__stdcall * proc_APECompress_GetBufferBytesAvailable)(APE_COMPRESS_HANDLE);
typedef unsigned char * (__stdcall * proc_APECompress_LockBuffer)(APE_COMPRESS_HANDLE, int *);
typedef int (__stdcall * proc_APECompress_UnlockBuffer)(APE_COMPRESS_HANDLE, int, BOOL);
typedef int (__stdcall * proc_APECompress_Finish)(APE_COMPRESS_HANDLE, unsigned char *, int, int);
typedef int (__stdcall * proc_APECompress_Kill)(APE_COMPRESS_HANDLE);
extern "C"
{
__declspec( dllexport ) APE_COMPRESS_HANDLE __stdcall c_APECompress_Create(int * pErrorCode = NULL);
__declspec( dllexport ) void __stdcall c_APECompress_Destroy(APE_COMPRESS_HANDLE hAPECompress);
__declspec( dllexport ) int __stdcall c_APECompress_Start(APE_COMPRESS_HANDLE hAPECompress, const char * pOutputFilename, const WAVEFORMATEX * pwfeInput, int nMaxAudioBytes = MAX_AUDIO_BYTES_UNKNOWN, int nCompressionLevel = COMPRESSION_LEVEL_NORMAL, const unsigned char * pHeaderData = NULL, int nHeaderBytes = CREATE_WAV_HEADER_ON_DECOMPRESSION);
__declspec( dllexport ) int __stdcall c_APECompress_StartW(APE_COMPRESS_HANDLE hAPECompress, const str_utf16 * pOutputFilename, const WAVEFORMATEX * pwfeInput, int nMaxAudioBytes = MAX_AUDIO_BYTES_UNKNOWN, int nCompressionLevel = COMPRESSION_LEVEL_NORMAL, const unsigned char * pHeaderData = NULL, int nHeaderBytes = CREATE_WAV_HEADER_ON_DECOMPRESSION);
__declspec( dllexport ) int __stdcall c_APECompress_AddData(APE_COMPRESS_HANDLE hAPECompress, unsigned char * pData, int nBytes);
__declspec( dllexport ) int __stdcall c_APECompress_GetBufferBytesAvailable(APE_COMPRESS_HANDLE hAPECompress);
__declspec( dllexport ) unsigned char * __stdcall c_APECompress_LockBuffer(APE_COMPRESS_HANDLE hAPECompress, int * pBytesAvailable);
__declspec( dllexport ) int __stdcall c_APECompress_UnlockBuffer(APE_COMPRESS_HANDLE hAPECompress, int nBytesAdded, BOOL bProcess = TRUE);
__declspec( dllexport ) int __stdcall c_APECompress_Finish(APE_COMPRESS_HANDLE hAPECompress, unsigned char * pTerminatingData, int nTerminatingBytes, int nWAVTerminatingBytes);
__declspec( dllexport ) int __stdcall c_APECompress_Kill(APE_COMPRESS_HANDLE hAPECompress);
}
/*****************************************************************************************
IAPEDecompress wrapper(s)
*****************************************************************************************/
typedef void * APE_DECOMPRESS_HANDLE;
typedef APE_DECOMPRESS_HANDLE (__stdcall * proc_APEDecompress_Create)(const char *, int *);
typedef APE_DECOMPRESS_HANDLE (__stdcall * proc_APEDecompress_CreateW)(const char *, int *);
typedef void (__stdcall * proc_APEDecompress_Destroy)(APE_DECOMPRESS_HANDLE);
typedef int (__stdcall * proc_APEDecompress_GetData)(APE_DECOMPRESS_HANDLE, char *, int, int *);
typedef int (__stdcall * proc_APEDecompress_Seek)(APE_DECOMPRESS_HANDLE, int);
typedef int (__stdcall * proc_APEDecompress_GetInfo)(APE_DECOMPRESS_HANDLE, APE_DECOMPRESS_FIELDS, int, int);
extern "C"
{
__declspec( dllexport ) APE_DECOMPRESS_HANDLE __stdcall c_APEDecompress_Create(const str_ansi * pFilename, int * pErrorCode = NULL);
__declspec( dllexport ) APE_DECOMPRESS_HANDLE __stdcall c_APEDecompress_CreateW(const str_utf16 * pFilename, int * pErrorCode = NULL);
__declspec( dllexport ) void __stdcall c_APEDecompress_Destroy(APE_DECOMPRESS_HANDLE hAPEDecompress);
__declspec( dllexport ) int __stdcall c_APEDecompress_GetData(APE_DECOMPRESS_HANDLE hAPEDecompress, char * pBuffer, int nBlocks, int * pBlocksRetrieved);
__declspec( dllexport ) int __stdcall c_APEDecompress_Seek(APE_DECOMPRESS_HANDLE hAPEDecompress, int nBlockOffset);
__declspec( dllexport ) int __stdcall c_APEDecompress_GetInfo(APE_DECOMPRESS_HANDLE hAPEDecompress, APE_DECOMPRESS_FIELDS Field, int nParam1 = 0, int nParam2 = 0);
}
#endif // #ifndef APE_MACDLL_H

View File

@@ -0,0 +1,261 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="MACDll"
ProjectGUID="{F7EE0746-C0AD-4045-B8B9-1CB2AFDFCB96}"
SccProjectName="&quot;$/Monkey&apos;s Audio/MACDll&quot;, KCAAAAAA"
SccAuxPath=""
SccLocalPath="."
SccProvider="MSSCCI:Microsoft Visual SourceSafe">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="1">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
GlobalOptimizations="TRUE"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="TRUE"
FavorSizeOrSpeed="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="..\MACLib\,..\Shared\"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MACDLL_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/MACDll.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="unicows.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib maclib.lib"
OutputFile=".\Release/MACDll.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\MACLib\Release"
IgnoreDefaultLibraryNames="kernel32.lib;advapi32.lib;user32.lib;gdi32.lib;shell32.lib;comdlg32.lib;version.lib;mpr.lib;rasapi32.lib;winmm.lib;winspool.lib;vfw32.lib;secur32.lib;oleacc.lib;oledlg.lib;sensapi.lib"
ModuleDefinitionFile=".\MACDll.def"
ProgramDatabaseFile=".\Release/MACDll.pdb"
ImportLibrary=".\Release/MACDll.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/MACDll.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing post build step..."
CommandLine="copy Release\MACDll.dll c:\Windows\System32\MACDll.dll"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="1">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\MACLib\,..\Shared\"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MACDLL_EXPORTS;"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/MACDll.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="unicows.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib maclib.lib"
OutputFile=".\Debug/MACDll.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="..\MACLib\Debug"
IgnoreDefaultLibraryNames="kernel32.lib;advapi32.lib;user32.lib;gdi32.lib;shell32.lib;comdlg32.lib;version.lib;mpr.lib;rasapi32.lib;winmm.lib;winspool.lib;vfw32.lib;secur32.lib;oleacc.lib;oledlg.lib;sensapi.lib"
ModuleDefinitionFile=".\MACDll.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/MACDll.pdb"
ImportLibrary=".\Debug/MACDll.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/MACDll.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"
Description="Performing post build step..."
CommandLine="copy Debug\MACDll.dll c:\Windows\System32\MACDll.dll"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\Shared\APEInfoDialog.cpp">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
AdditionalIncludeDirectories=""
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
</File>
<File
RelativePath="MACDll.cpp">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
AdditionalIncludeDirectories=""
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
</File>
<File
RelativePath="MACDll.def">
</File>
<File
RelativePath="Resource Script.rc">
</File>
<File
RelativePath="..\Shared\Unicows.cpp">
</File>
<File
RelativePath="..\Shared\WAVInfoDialog.cpp">
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
AdditionalIncludeDirectories=""
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
BasicRuntimeChecks="3"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\Shared\APEInfoDialog.h">
</File>
<File
RelativePath="MACDll.h">
</File>
<File
RelativePath="resource.h">
</File>
<File
RelativePath="..\Shared\WAVInfoDialog.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
<File
RelativePath="Monkey Head (1).ico">
</File>
<File
RelativePath="Monkey Head.ico">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,226 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_WAV_INFO, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 195
TOPMARGIN, 7
BOTTOMMARGIN, 95
END
IDD_APE_INFO, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 242
TOPMARGIN, 7
BOTTOMMARGIN, 211
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MONKEY_LEFT ICON "Monkey Head.ico"
IDI_MONKEY_RIGHT ICON "Monkey Head (1).ico"
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_WAV_INFO DIALOG 0, 0, 202, 102
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "WAV File Info"
FONT 8, "MS Sans Serif"
BEGIN
ICON IDI_MONKEY_LEFT,IDC_STATIC,2,2,20,20
ICON IDI_MONKEY_RIGHT,IDC_STATIC,180,0,20,20
GROUPBOX "Size Info",IDC_STATIC,5,28,93,68
GROUPBOX "Audio Info",IDC_STATIC,105,28,92,47
LTEXT "Bits Per Sample:",3002,115,60,78,8,SS_NOPREFIX
LTEXT "Channels:",3001,115,50,78,8,SS_NOPREFIX
LTEXT "Sample Rate:",3000,115,39,78,8,SS_NOPREFIX
LTEXT "Track Length:",2001,15,50,78,8,SS_NOPREFIX
LTEXT "File Size:",2000,15,39,78,8,SS_NOPREFIX
LTEXT "Terminating Bytes:",2004,15,82,78,8,SS_NOPREFIX
LTEXT "Header Bytes:",2003,15,71,78,8,SS_NOPREFIX
LTEXT "Audio Bytes:",2002,15,60,78,8,SS_NOPREFIX
PUSHBUTTON "OK",4000,105,81,92,15
CTEXT "File Name...",1000,26,2,152,18
END
IDD_APE_INFO DIALOG 0, 0, 249, 218
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION |
WS_SYSMENU
CAPTION "APE File Info"
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT 5000,49,99,189,12,ES_AUTOHSCROLL
EDITTEXT 5001,49,115,189,12,ES_AUTOHSCROLL
EDITTEXT 5002,49,131,189,12,ES_AUTOHSCROLL
EDITTEXT 5003,49,147,189,12,ES_AUTOHSCROLL
EDITTEXT 5004,49,163,24,12,ES_AUTOHSCROLL
COMBOBOX 5005,109,163,77,85,CBS_DROPDOWN | CBS_OEMCONVERT |
CBS_SORT | WS_VSCROLL | WS_TABSTOP
EDITTEXT 5006,220,163,18,12,ES_AUTOHSCROLL
PUSHBUTTON "Save Tag",6000,11,195,69,12
PUSHBUTTON "Remove Tag",6001,90,195,69,12
PUSHBUTTON "Cancel",6002,169,195,69,12
ICON IDI_MONKEY_LEFT,IDC_STATIC,3,3,20,20
ICON IDI_MONKEY_RIGHT,IDC_STATIC,225,3,20,20
CONTROL "Format Flags:",2002,"Static",SS_LEFTNOWORDWRAP |
SS_NOPREFIX | WS_GROUP,11,61,59,8
CONTROL "Mode:",2001,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX |
WS_GROUP,11,50,59,8
CONTROL "Version:",2000,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX |
WS_GROUP,11,39,59,8
GROUPBOX "Format Info",IDC_STATIC,5,29,70,56
GROUPBOX "Audio Info",IDC_STATIC,79,29,78,56
CONTROL "Bits Per Sample:",3002,"Static",SS_LEFTNOWORDWRAP |
SS_NOPREFIX | WS_GROUP,86,61,66,8
CONTROL "Channels:",3001,"Static",SS_LEFTNOWORDWRAP |
SS_NOPREFIX | WS_GROUP,86,50,66,8
CONTROL "Sample Rate:",3000,"Static",SS_LEFTNOWORDWRAP |
SS_NOPREFIX | WS_GROUP,86,39,66,8
GROUPBOX "Tag Info",IDC_STATIC,5,88,240,94
LTEXT "Album:",IDC_STATIC,11,134,23,8,SS_NOPREFIX
LTEXT "Artist:",IDC_STATIC,11,118,23,8,SS_NOPREFIX
LTEXT "Title:",IDC_STATIC,11,102,18,8,SS_NOPREFIX
LTEXT "Comment:",IDC_STATIC,11,150,33,8,SS_NOPREFIX
LTEXT "Year:",IDC_STATIC,11,166,18,8,SS_NOPREFIX
LTEXT "Genre: ",IDC_STATIC,82,166,24,8,SS_NOPREFIX
CONTROL "Length:",4000,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX |
WS_GROUP,167,39,71,8
CONTROL "Compression:",4003,"Static",SS_LEFTNOWORDWRAP |
SS_NOPREFIX | WS_GROUP,167,72,71,8
LTEXT "Track:",IDC_STATIC,195,166,22,8,SS_NOPREFIX
GROUPBOX "Exit",IDC_STATIC,5,185,240,29
CONTROL "Peak Level:",3003,"Static",SS_LEFTNOWORDWRAP |
SS_NOPREFIX | WS_GROUP,86,72,66,8
EDITTEXT 1000,28,4,193,18,ES_CENTER | ES_MULTILINE |
ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
CONTROL "APE:",4002,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX |
WS_GROUP,167,61,71,8
CONTROL "Tagged:",2003,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX |
WS_GROUP,11,71,59,9
GROUPBOX "Length / Size Info",IDC_STATIC,161,29,83,56
CONTROL "WAV:",4001,"Static",SS_LEFTNOWORDWRAP | SS_NOPREFIX |
WS_GROUP,167,50,71,8
END
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,9,9,0
PRODUCTVERSION 3,9,9,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "Compression and decompression library for Monkey's Audio"
VALUE "CompanyName", "Matthew T. Ashland"
VALUE "FileDescription", "Monkey's Audio DLL Library"
VALUE "FileVersion", "3.99"
VALUE "LegalCopyright", "Copyright <20> 2000-2004"
VALUE "OriginalFilename", "MACDll.dll"
VALUE "ProductName", "Monkey's Audio"
VALUE "ProductVersion", "3.99"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,20 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Resource Script.rc
//
#define IDD_DIALOG1 101
#define IDD_WAV_INFO 101
#define IDD_APE_INFO 103
#define IDI_MONKEY_LEFT 105
#define IDI_MONKEY_RIGHT 106
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 149
#define _APS_NEXT_COMMAND_VALUE 40002
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif