









|
This is a description how to write your own PlugIn for
Digital Audio Copy.
The source code for a sample PlugIn can be found in the download
section. I recommend to study it before you write your first
own PlugIn.
You can use this information to write your own PlugIn for WinDAC32 without
limitations. You can sell them or give them away for free, as long as you
put a remark in the documentation about the legal state of your PlugIn and
that it is designed for WinDAC32. I don't want to be a certification center
so I do not need a copy of your PlugIn, but it would be fine if you would
send me a copy of your work.
Section One: General functionality required for a
PlugIn
All PlugIn's have to follow these points:
-
They have to use a unique identifier you can get ONLY from
me by email.
-
The PlugIn must be able to handle multiple instances and
to be multiple loaded from one process
-
The PlugIn must be ready to handle more than one open
stream (at least all subsequent InitStream commands must be completed with
a correct error message).
-
It should only use the defined API to communicate with
WinDAC32
Section Two: The API description
The API consists of 10 functions that has to
be exported by the PlugIn. The PlugIn has always to use the
latest Header file "DACPlugIn.h" for the function type and
structure definitions. It can be found in the download
section.
-
DWORD DAC_GetPlugInSupportInfo()
Called to identify a PlugIn DLL
PlugIn DLL's will return a DWORD providing some information about it's
features:
- The HiWord contains the supported PlugIn Interface Type. Currently only
a value of 1 is supported
- The LoWord contains the number of PlugIn's supported by this DLL (1 for
one PlugIn, but all accesses are zero based, so the first PlugIn has the
number 0)
-
BOOL DAC_InitPlugInDLL()
Is always called once after the DLL has been loaded and before any of the
following functions is called.
Use this function to make all initialisations.
Returns FALSE if the DLL couldn't be initialized.
-
BOOL DAC_ClosePlugInDLL()
Called before the DLL is unloaded.
Make any CleanUps here.
Returns FALSE if the cleanup fails (the DLL will be unloaded anyway).
-
BOOL DAC_GetPlugInInfo(int nPlugInNum,PDAC_PLUGININFO
pInfo)
Fills the DAC_PLUGININFO struct for the requested PlugInNumber.
nPlugInNum is the zero based index of referenced PlugIn in the DLL.
The function fills pInfo with the information about the PlugIn.
Returns FALSE if the requested PlugInNum cannot be found.
-
void DAC_DisplayAboutDlg(HWND hwndParent,int nPlugInNum)
Displays a Dialog with Information about the specified PlugIn.
hwndParent provides a window handle to the parent window.
-
BOOL DAC_GetFormatInfo(int nPlugInNum,int
nFormatNum,PDAC_FORMATINFO pInfo)
Fills the DAC_FORMATINFO struct for the requested format of the PlugIn.
nFormatNum is the zero based format number for which the information is
requested.
returns FALSE if nFormatNum is invalid.
-
BOOL DAC_DisplayAdvancedConfigDlg(HWND hwndParent,int
nPlugInNum,int nFormatNum,HKEY hkeyParent)
Displays an advanced configuration Dialog, the configured information must
be stored in the registry in the provided Key.
Returns FALSE if the user presses cancel or an error has occured.
-
int DAC_InitStream(char* lpszFileName,int nPlugInNum,int
nFormatNum,HKEY hkeyParent,PDAC_TRACKINFO pTrackInfo,PDAC_STREAM_HANDLE
pStreamHandle)
Called to initialze an output stream with the provided name in the selected
format.pTrackInfo will supply the function with detailed information about
the track namens.
pStreamHandle will contain a handle to access this stream after calling this
function.
Returns one of the error codes defined in this header file. If the return
value is different from DAC_ERR_OK, the returned handle is invalid.
-
int DAC_WriteBuffer(PDAC_STREAM_HANDLE pStreamHandle,int
nSamples,DWORD* pBuffer)
Writes nSamples stereo samples to the output stream. The samples are provided
in a buffer which contain 16 Bit 44Khz stereo data (left/right).
Returns one of the error codes defined in this header file.
-
int DAC_CloseStream(PDAC_STREAM_HANDLE pStreamHandle)
Writes the last data to the stream and closes it.
Returns one of the error codes defined in this header file.
The structures are explained in the header file.
|