» resources assert file not found
resources assert file not found
|February 24, 2014
Posted by forumadmin
i have a problem with resources in my audio plugin
here is my resource file
// 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"
i have an assert issue : “file not found” when using this code :
IBitmap onoff1 = pGraphics->LoadIBitmap(ONOFFBYPASS_ID, ONOFFBYPASS_FN, 1);
if i use WAIT_ID instead of ONOFFBYPASS_ID, everything works
in debug assert this code raises a flag:
IBitmap IGraphics::LoadIBitmap(int ID, const char* name, int nStates, bool framesAreHoriztonal)
LICE_IBitmap* lb = s_bitmapCache.Find(ID);
lb = OSLoadBitmap(ID, name);
bool imgResourceFound = lb;
assert(imgResourceFound); **//imgResourceFound = false**
return IBitmap(lb, lb->getWidth(), lb->getHeight(), nStates, framesAreHoriztonal);
i tried to :
- switch ID values (109 <-> 108)
- change the names
- check 10 times the paths
but nothing works
it doesn’t makes sense, especially because i have 2 other audio plugins with the same part of code that are working ok…
sorry can’t provide sample code as it would mean installing VST SDK, WDL-OK…so a bit too much i guess.
please help anyway
More Related Questions
- Designing extensible software (plugin architecture) I need some resources that talk about how to design your software to be extensible, i.e. so that other people can write add-ons/plug-ins that adds functionality to it.
What do you […]
- How to create and use resources in .NET How do I create a resource that I can reference and use in various parts of my program easily?
My specific problem is that I have a NotifyIcon that I want to change the icon of depending […]
- How can I discover the "path" of an embedded resource? I am storing a PNG graphic as an Embedded Resource in an assembly.
From within the same assembly I have some code like:
Bitmap image = new Bitmap(typeof(MyClass), […]
- How do I replace embedded resources in a .NET assembly programmatically? I am trying to replace a Resource of an exe(.NET, C#) file using C# code.
I have found this article: http://rongchaua.net/blog/c-how-to-edit-resource-of-an-assembly/ and made this code […]
- C#, Localization, Resources, and MonoDevelop I've searched for a clear answer on this, but can't seem to find one. I may just be missing it on StackOverflow, and searching discussions regarding SharpDevelop and MonoDevelop have […]
- Loop through embedded resources of different languages/cultures in C# One level up from this question, what would be the way to store all (and loop through) available resources and associated cultures, to allow user selection of a specific culture?
- Accessing a resource via codebehind in WPF I have a custom collection defined in my window resources as follows (in a Sketchflow app so the window is actually a UserControl):
- Build resource assemblies with AssemblyBuilder Scenario: I want to create satellite assemblies which are resource assemblies.
This assembly has only compiled resources in it (ResourceWriter).
The goal is to create […]
- Using libsamplerate with libsndfile This code is part of my attempts to better understand audio coding. Here, a file is opened with libsndfile, converted with libsamplerate to a new sample rate, and the result played with […]
- Using IDisposable object in method that returns IEnumerable<T> Imagine you have a method that internally uses an IDisposable object (for example a streamreader), and yield returns items as they are read from the file. Like this: