SWAP APO inf文件信息
2022-09-19
314
0
SWAP APO编译后的主体为swapapo.dll
这里参考ComponentizedApoSample.inf文件的部分节选说明。
inf文件的方体结构和普通的驱动INF文件一致,其结构如下:
这里关于APO的注册关键是注册表Apo_AddReg相关的。
这里先将各个UUID之间的关系说明一下:
[Apo_AddReg]
; Swap Stream effect APO COM registration
HKCR,CLSID\%SWAP_FX_STREAM_CLSID%,,,%SFX_FriendlyName%
HKCR,CLSID\%SWAP_FX_STREAM_CLSID%\InProcServer32,,0x00020000,%13%\swapapo.dll
HKCR,CLSID\%SWAP_FX_STREAM_CLSID%\InProcServer32,ThreadingModel,,"Both"
; Swap Mode effect APO COM registration
HKCR,CLSID\%SWAP_FX_MODE_CLSID%,,,%MFX_FriendlyName%
HKCR,CLSID\%SWAP_FX_MODE_CLSID%\InProcServer32,,0x00020000,%13%\swapapo.dll
HKCR,CLSID\%SWAP_FX_MODE_CLSID%\InProcServer32,ThreadingModel,,"Both"
; Swap Stream effect APO registration
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"FriendlyName",,%SFX_FriendlyName%
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"Copyright",,%Copyright%
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"MajorVersion",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"MinorVersion",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"Flags",0x00010001,%APO_FLAG_DEFAULT%
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"MinInputConnections",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"MaxInputConnections",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"MinOutputConnections",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"MaxOutputConnections",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"MaxInstances",0x00010001,0xffffffff
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"NumAPOInterfaces",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_STREAM_CLSID%,"APOInterface0",,"{FD7F2B29-24D0-4B5C-B177-592C39F9CA10}"
; Swap Mode effect APO registration
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"FriendlyName",,%MFX_FriendlyName%
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"Copyright",,%Copyright%
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"MajorVersion",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"MinorVersion",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"Flags", 0x00010001,%APO_FLAG_DEFAULT%
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"MinInputConnections",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"MaxInputConnections",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"MinOutputConnections",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"MaxOutputConnections",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"MaxInstances",0x00010001,0xffffffff
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"NumAPOInterfaces",0x00010001,1
HKR,AudioEngine\AudioProcessingObjects\%SWAP_FX_MODE_CLSID%,"APOInterface0",,"{FD7F2B29-24D0-4B5C-B177-592C39F9CA10}"
...
[Strings]
MfgName = "TODO-Set-Manufacturer"
ProviderName = "TODO-Set-Provider"
Apo.ComponentDesc = "Audio Proxy APO Sample"
; Driver developers would replace these CLSIDs with those of their own APOs
SWAP_FX_STREAM_CLSID = "{B48DEA3F-D962-425a-8D9A-9A5BB37A9904}"
SWAP_FX_MODE_CLSID = "{06687E71-F043-403A-BF49-CB591BA6E103}"
DELAY_FX_STREAM_CLSID = "{77802b45-a5a0-455a-8204-3dba30eee7b4}"
DELAY_FX_MODE_CLSID = "{b6c7032b-1f17-4cc6-bcdb-fd96deabc8a9}"
KWS_FX_ENDPOINT_CLSID = "{9D89F614-F9D6-40DD-9F21-5E69FA3981ED}"
; see audioenginebaseapo.idl for APO_FLAG enum values
APO_FLAG_DEFAULT = 0x0000000e
SFX_FriendlyName = "Audio Proxy APO Sample (stream effect)"
MFX_FriendlyName = "Audio Proxy APO Sample (mode effect)"
KWS_FriendlyName = "Keyword Spotter APO Sample (endpoint effect)"
Copyright = "Sample"
最终在注册表中的信息如下:
- HKCR:代表HKEY_CLASSES_ROOT
- HKR:HKLM/SYSTEM/CurrentControlSet/Control/Class/%ClassGuid%/%DeviceIndex%
详见:http://www.pnpon.com/article/detail-403.html
HKEY_CLASSES_ROOT/CLSID
SWAP_FX_MODE_CLSID
SWAP_FX_STREAM_CLSID
COMM ProgID简介: http://www.pnpon.com/article/detail-332.html
HKR - AudioEngine
这里的%ClassGuid%为version中的GUID={5989fce8-9cd0-467d-8a6a-5419e31529d4},所以分别为: