📄 ac97codec.cpp
字号:
// AC97Codec.cpp: implementation of the CAC97Codec class.
//
//////////////////////////////////////////////////////////////////////
// known codecs IDs
#define VENDOR_ID1 0x7C
#define VENDOR_ID2 0x7E
#include "AC97Codec.h"
#include "AD1819A.h"
#include "LM4548.h"
#include "LM4549.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CAC97Codec* CAC97Codec::CreateCodec(CCX5530Audio *pController)
{
WORD wID1, wID2;
if (!pController)
{
ERRMSG("CAC97Codec::CreateCodec: NULL controller!");
return NULL;
}
if (!pController->ReadAC97(VENDOR_ID1, wID1) || !pController->ReadAC97(VENDOR_ID2, wID2))
{
ERRMSG("CAC97Codec::CreateCodec: error reading vendor IDs!");
return NULL;
}
if (CAD1819A::QueryIDs(wID1, wID2))
{
INFMSG("CAC97Codec::CreateCodec: found AD1819A");
return new CAD1819A(pController);
}
if (CLM4548::QueryIDs(wID1, wID2))
{
INFMSG("CAC97Codec::CreateCodec: found LM4548");
return new CLM4548(pController);
}
if (CLM4549::QueryIDs(wID1, wID2))
{
INFMSG("CAC97Codec::CreateCodec: found LM4549");
return new CLM4549(pController);
}
// add new codecs here when known
ERRMSG2("CAC97Codec::CreateCodec: unknown codec: 0x%4.4x, 0x%4.4x!", wID1, wID2);
return NULL;
}
CAC97Codec::CAC97Codec(CCX5530Audio *pController):
m_pController(pController)
{
}
CAC97Codec::~CAC97Codec()
{
}
bool CAC97Codec::Reset()
{
return true;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -