Click here to Skip to main content
15,895,256 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CString convertion problem Pin
Max++13-Apr-08 16:07
Max++13-Apr-08 16:07 
GeneralRe: CString convertion problem Pin
Cedric Moonen13-Apr-08 20:36
Cedric Moonen13-Apr-08 20:36 
GeneralRe: CString convertion problem Pin
CPallini13-Apr-08 5:20
mveCPallini13-Apr-08 5:20 
QuestionRe: CString convertion problem Pin
David Crow14-Apr-08 4:43
David Crow14-Apr-08 4:43 
GeneralRe: CString convertion problem Pin
Hamid_RT14-Apr-08 19:55
Hamid_RT14-Apr-08 19:55 
Generalabout the error in just-in-time Pin
wendyyue12-Apr-08 22:13
wendyyue12-Apr-08 22:13 
AnswerRe: about the error in just-in-time Pin
Bram van Kampen13-Apr-08 6:01
Bram van Kampen13-Apr-08 6:01 
GeneralAudio Processing Questions (2) Pin
Akin Ocal12-Apr-08 21:24
Akin Ocal12-Apr-08 21:24 
Hi , sorry for a new thread. I needed to open it since I made some progress.

By the way , I implemented my callback function without buffering as below. So can you check it ?
Especially I am not sure about getting floats from BYTEs and , replacing new floats back after making some signal processing.

STDMETHODIMP BufferCB( double SampleTime, BYTE * pBuffer, long BufferSize )
{

unsigned int i,j ;
short nCurrentSampleValue = 0 ,temp = 0;
float fCurrentSampleValue = 0,fNewSampleValue =0 ;
long nSampleCount ;
short nRatioOfDataTypes ;

nRatioOfDataTypes = sizeof(short)/sizeof(BYTE) ;
nSampleCount = BufferSize / nRatioOfDataTypes;

for(i=0;i<nSampleCount;i++)
{
nCurrentSampleValue = 0 ;
fCurrentSampleValue = 0 ;
for(j=0;j<nRatioOfDataTypes ;j++)
{
temp = 0x0000 ;
temp = ((short)pBuffer[i*nRatioOfDataTypes+j]) ;
temp = temp << (8*(nRatioOfDataTypes-j-1)) ;
nCurrentSampleValue |= temp ;
fCurrentSampleValue = ((float)nCurrentSampleValue) / 32768 ;
}

fNewSampleValue = MAKE_SOME_SIGNAL_PROCESS(fCurrentSampleValue);
////////////////////////////////////////////
temp = (short) (fNewSampleValue*32768);
pBuffer[i*nRatioOfDataTypes] = (BYTE) (temp & 0xFF00) ;
pBuffer[i*nRatioOfDataTypes+1] = (BYTE) (temp & 0x00FF) ;
////////////////////////////////////////////
}
}

Finally can you send me any sample code for buffering or make any suggestion about that ?

Thank you very much...
Best Regards
General#pragma comment lib Pin
George_George12-Apr-08 21:03
George_George12-Apr-08 21:03 
GeneralRe: #pragma comment lib Pin
Randor 12-Apr-08 21:35
professional Randor 12-Apr-08 21:35 
GeneralRe: #pragma comment lib Pin
George_George12-Apr-08 21:36
George_George12-Apr-08 21:36 
GeneralStackWalk 32 bit Version of StakWalk64 Pin
ForNow12-Apr-08 16:17
ForNow12-Apr-08 16:17 
GeneralRe: StackWalk 32 bit Version of StakWalk64 Pin
Randor 12-Apr-08 19:48
professional Randor 12-Apr-08 19:48 
GeneralRe: StackWalk 32 bit Version of StakWalk64 Pin
ForNow12-Apr-08 20:00
ForNow12-Apr-08 20:00 
GeneralRe: StackWalk 32 bit Version of StakWalk64 Pin
Randor 12-Apr-08 20:38
professional Randor 12-Apr-08 20:38 
GeneralRe: StackWalk 32 bit Version of StakWalk64 Pin
ForNow12-Apr-08 21:09
ForNow12-Apr-08 21:09 
QuestionA question related sprintf function, formatting an ASCII val to hex[modified] Pin
Mushtaque Nizamani12-Apr-08 15:55
Mushtaque Nizamani12-Apr-08 15:55 
GeneralRe: A question related sprintf function, formatting an ASCII val to he Pin
Randor 12-Apr-08 19:39
professional Randor 12-Apr-08 19:39 
GeneralRe: A question related sprintf function, formatting an ASCII val to he Pin
Mushtaque Nizamani12-Apr-08 20:01
Mushtaque Nizamani12-Apr-08 20:01 
QuestionHow "bump a line down" in the console? Pin
mwholt12-Apr-08 9:48
mwholt12-Apr-08 9:48 
General"Data Source Name Too Long" Pin
Joseph Marzbani12-Apr-08 7:36
Joseph Marzbani12-Apr-08 7:36 
GeneralRe: "Data Source Name Too Long" Pin
ftbk12-Apr-08 7:41
ftbk12-Apr-08 7:41 
GeneralRe: "Data Source Name Too Long" [modified] Pin
Joseph Marzbani12-Apr-08 7:48
Joseph Marzbani12-Apr-08 7:48 
QuestionRe: "Data Source Name Too Long" Pin
David Crow14-Apr-08 4:46
David Crow14-Apr-08 4:46 
GeneralOnNewWindow2 on multithread Pin
ftbk12-Apr-08 6:26
ftbk12-Apr-08 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.