0
0

hello everyone,

at the moment i start building a class around fmodex to use it my bcb is going nuts.

or with more detail:
i’m on my way to build the tiny class below.
when i run a program using the class directly after the start borland brings up the “cpu” window and stops processing the code.

the fatal line is this
FMOD_System_Create(&this->system)

if is use it in a normal procedural code everything is fine, but with this class, no way and i can’t figure out why :/.

maybe someone can help me ?

[code:2kr5ehc9]

include "fmod.h"

include "fmod_errors.h"

//—————————————————————————

class howlingSound {
private:
bool __fastcall resultCheck (FMOD_RESULT);

    bool debugMode;

    FMOD_SYSTEM      *system;
    FMOD_SOUND       *playlist;
    FMOD_RESULT      result;

public:

// bool __fastcall load (char *);
void initiate (void);
__fastcall howlingSound (void);
__fastcall howlingSound (bool);

    __fastcall ~howlingSound (void);

};

__fastcall howlingSound::howlingSound (void) {
this->debugMode = true;
} // END -> __fastcall howlingSound::howlingSound (void)

__fastcall howlingSound::howlingSound (bool debug) {
this->debugMode = debug;
} // END -> __fastcall howlingSound::howlingSound (bool debug)

__fastcall howlingSound::~howlingSound (void) {
} // END -> __fastcall howlingSound::~howlingSound (void)

bool __fastcall howlingSound::resultCheck (FMOD_RESULT fmodRes) {
if (fmodRes != FMOD_OK) {
/if (this->debugMode) {
TStringList *list = new TStringList();
list->Add("[" + (AnsiString)fmodRes + "] " + FMOD_ErrorString(fmodRes));
list->SaveToFile("err.log");
delete list;
}
/ // END -> if (this->debugMode)

    return false;
} // END -> if (fmodRes != FMOD_OK)

return true;

} // END -> bool __fastcall howlingSound::resultCheck (FMOD_RESULT fmodRes)

void howlingSound::initiate (void) {
this->system = 0;

if (this->resultCheck (FMOD_System_Create(&this->system)))
    this->resultCheck (FMOD_System_Init (this->system, 32, FMOD_INIT_NORMAL, 0));

}[/code:2kr5ehc9]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.