@rudolpho
i just added these few lines to the dbcommands header and the functions worked fine .
static void (*Import1409)( int iID, DWORD* dwBitsPerSecond, DWORD* Frequency, DWORD* Duration, LPSTR* pData, DWORD* dwDataSize, bool bLockData, WAVEFORMATEX* wfx ); //dbgetsounddata
static void (*Import1410)( int iID, DWORD dwBitsPerSecond, DWORD Frequency, DWORD Duration, LPSTR pData, DWORD dwDataSize, WAVEFORMATEX wfx ); //dbsetsounddata
*((void **)&Import1409) = GetProcAddress( mod, "?GetSoundData@@YAXHPAK00PAPAD0_NPAUtWAVEFORMATEX@@@Z" );
*((void **)&Import1410) = GetProcAddress( mod, "?SetSoundData@@YAXHKKKPADKUtWAVEFORMATEX@@@Z" );
void dbGetSoundData(int p1, DWORD* p2, DWORD* p3, DWORD* p4, LPSTR* p5, DWORD* p6, bool p7, WAVEFORMATEX* p8)
{
Import1409( p1 , p2 , p3 , p4 , p5 , p6 , p7 , p8);
}
void dbSetSoundData(int p1, DWORD p2, DWORD p3, DWORD p4, LPSTR p5, DWORD p6, WAVEFORMATEX p7)
{
Import1410( p1 , p2 , p3 , p4 , p5 , p6 , p7 );
}
if you use the sdk ive got you must use the controlcommands() function before the command used.
also these commands need stripping out to just use the dbsound dll
so the final dll is not so big.
trouble we are having is that your compiler is different .
you ought to download the express edition of vis studio and just edit resources in a seperate program or i will do them .
edit ..
the commands are used like this then ,also look at the commented out bits that enables you to get data out of the waveformatex struct.
MYCOMMAND DWORD getwavduration(int sound)
{
ControlCommands();
dbGetSoundData(sound,&BitsPerSecond,&Freq,&Dur,&Data,&DataSize,true,&wfxx);
//waveformatex info
//WORD tag = wfxx.wFormatTag ;
//WORD chan = wfxx.nChannels ;
//DWORD sps = wfxx.nSamplesPerSec ;
//DWORD abps = wfxx.nAvgBytesPerSec ;
//WORD ba = wfxx.nBlockAlign ;
//WORD bps = wfxx.wBitsPerSample ;
//WORD cb= wfxx.cbSize = 0;
return Dur;
}
edit2 ..........................
attached is the commands header with just the sound stuff might be a bit clearer.
how would i perform manipulation on the data when the datatype is a
LPSTR ?
chunks
toshiba satellite 1.6 core duo + nvidia geforce go 7300
windows xp pro.