我的音频插件资源存在问题
这是我的资源文件
// Unique IDs for each image resource.
#define BCKG_ID 101
#define CANT_ID 102
#define COM10_ID 103
#define COM20_ID 104
#define COM40_ID 105
#define COM80_ID 106
#define SAVE_ID 107
#define WAIT_ID 108
#define ONOFFBYPASS_ID 109
#define ONOFFPRESSED_ID 110
// Image resource locations for this plug.
#define BCKG_FN "resources/img/background.png"
#define CANT_FN "resources/img/cant.png"
#define COM10_FN "resources/img/combo10.png"
#define COM20_FN "resources/img/combo20.png"
#define COM40_FN "resources/img/combo40.png"
#define COM80_FN "resources/img/combo80.png"
#define SAVE_FN "resources/img/savwav.png"
#define WAIT_FN "resources/img/waiting.png"
#define ONOFFBYPASS_FN "resources/img/onoff-bypass.png"
#define ONOFFPRESSED_FN "resources/img/onoff-pressed.png"
我在使用此代码时遇到断言问题:“找不到文件”:
IBitmap onoff1 = pGraphics->LoadIBitmap(ONOFFBYPASS_ID, ONOFFBYPASS_FN, 1);
如果我使用 WAIT_ID 而不是 ONOFFBYPASS_ID ,一切正常
在debug assert中,这段代码会引发一个标志:
IBitmap IGraphics::LoadIBitmap(int ID, const char* name, int nStates, bool framesAreHoriztonal)
{
LICE_IBitmap* lb = s_bitmapCache.Find(ID);
if (!lb)
{
lb = OSLoadBitmap(ID, name);
#ifndef NDEBUG
bool imgResourceFound = lb;
#endif
assert(imgResourceFound); **//imgResourceFound = false**
s_bitmapCache.Add(lb, ID);
}
return IBitmap(lb, lb->getWidth(), lb->getHeight(), nStates, framesAreHoriztonal);
}
我试图:
但没有任何作用
它没有意义,特别是因为我有2个其他音频插件具有相同的代码部分正常工作 ......
抱歉无法提供示例代码,因为它意味着安装VST SDK,WDL-OK ......所以我猜有点太多了。
无论如何请帮助
杰夫
答案 0 :(得分:0)
哦,我做了一个菜鸟错误:我忘了添加
ONOFFBYPASS_ID PNG ONOFFBYPASS_FN
ONOFFPRESSED_ID PNG ONOFFPRESSED_FN
到MyProg.rc
现在一切正常
杰夫