1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| unsigned int SizeMemory;
int errorCodeStreaming1 = 0;
int errorCodeStreaming2 = 0;
int errorCodeStreaming3 = 0;
unsigned int channelCount = 2;
unsigned int FetchBlockSize = 32768000;
unsigned int BufferSize = 8;
unsigned long *ptrMemory1;
unsigned long *ptrMemory2;
unsigned long *ptrMemory3;
char conv[16];
char FilenameDebug[100];
char test[16];
strcpy_s(FilenameDebug,100,"E:\\Debug.ini");
SizeMemory = (1*FetchBlockSize*channelCount*BufferSize)+(4096*channelCount);
ptrMemory1 = (unsigned long *)malloc(SizeMemory);
ptrMemory2 = (unsigned long *)malloc(SizeMemory);
ptrMemory3 = (unsigned long *)malloc(SizeMemory);
if(ptrMemory1==NULL)
{
errorCodeStreaming1 = -1;
}
if(ptrMemory2==NULL)
{
errorCodeStreaming2 = -1;
}
if(ptrMemory3==NULL)
{
errorCodeStreaming3 = -1;
}
_itoa_s(errorCodeStreaming1, conv, 10);
WritePrivateProfileStringA((LPCSTR)"Debug","errorCodeStreaming1",conv,(LPCSTR)FilenameDebug);
_itoa_s(errorCodeStreaming2, conv, 10);
WritePrivateProfileStringA((LPCSTR)"Debug","errorCodeStreaming2",conv,(LPCSTR)FilenameDebug);
_itoa_s(errorCodeStreaming3, conv, 10);
WritePrivateProfileStringA((LPCSTR)"Debug","errorCodeStreaming3",conv,(LPCSTR)FilenameDebug);
_itoa_s(SizeMemory, conv, 10);
WritePrivateProfileStringA((LPCSTR)"Debug","SizeMemory",conv,(LPCSTR)FilenameDebug);
_itoa_s(unsigned long(ptrMemory1), conv, 10);
WritePrivateProfileStringA((LPCSTR)"Debug","ptrMemory1",conv,(LPCSTR)FilenameDebug);
_itoa_s(unsigned long(ptrMemory2), conv, 10);
WritePrivateProfileStringA((LPCSTR)"Debug","ptrMemory2",conv,(LPCSTR)FilenameDebug);
_itoa_s(unsigned long(ptrMemory3), conv, 10);
WritePrivateProfileStringA((LPCSTR)"Debug","ptrMemory3",conv,(LPCSTR)FilenameDebug);
free(ptrMemory1);
free(ptrMemory2);
free(ptrMemory3); |