Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
67
Src/Plugins/Library/ml_rg/RGFactory.cpp
Normal file
67
Src/Plugins/Library/ml_rg/RGFactory.cpp
Normal file
|
@ -0,0 +1,67 @@
|
|||
#include "main.h"
|
||||
#include "RGFactory.h"
|
||||
#include "Process.h"
|
||||
static const char serviceName[] = "Replay Gain Processor";
|
||||
|
||||
FOURCC RGFactory::GetServiceType()
|
||||
{
|
||||
return WaSvc::OBJECT;
|
||||
}
|
||||
|
||||
const char *RGFactory::GetServiceName()
|
||||
{
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
GUID RGFactory::GetGUID()
|
||||
{
|
||||
return RGGUID;
|
||||
}
|
||||
|
||||
void *RGFactory::GetInterface(int global_lock)
|
||||
{
|
||||
obj_replaygain *ifc=new ProcessReplayGain;
|
||||
// if (global_lock)
|
||||
// plugin.service->service_lock(this, (void *)ifc);
|
||||
return ifc;
|
||||
}
|
||||
|
||||
int RGFactory::SupportNonLockingInterface()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int RGFactory::ReleaseInterface(void *ifc)
|
||||
{
|
||||
//plugin.service->service_unlock(ifc);
|
||||
obj_replaygain *api_ = static_cast<obj_replaygain *>(ifc);
|
||||
ProcessReplayGain *svc_ = static_cast<ProcessReplayGain *>(api_);
|
||||
delete svc_;
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char *RGFactory::GetTestString()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int RGFactory::ServiceNotify(int msg, int param1, int param2)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef CBCLASS
|
||||
#undef CBCLASS
|
||||
#endif
|
||||
|
||||
#define CBCLASS RGFactory
|
||||
START_DISPATCH;
|
||||
CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
|
||||
CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
|
||||
CB(WASERVICEFACTORY_GETGUID, GetGUID)
|
||||
CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
|
||||
CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface)
|
||||
CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
|
||||
CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
|
||||
CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
|
||||
END_DISPATCH;
|
Loading…
Add table
Add a link
Reference in a new issue