cwAudioDeviceTest.cpp : Change static_cast<> to reinterpet_cast<>

This commit is contained in:
kevin 2021-01-20 13:06:57 -05:00
parent 577e61ca82
commit ab37affd10

View File

@ -67,13 +67,13 @@ namespace cw
void _cmApPortCb2( void* arg, audioPacket_t* inPktArray, unsigned inPktCnt, audioPacket_t* outPktArray, unsigned outPktCnt ) void _cmApPortCb2( void* arg, audioPacket_t* inPktArray, unsigned inPktCnt, audioPacket_t* outPktArray, unsigned outPktCnt )
{ {
cmApPortTestRecd* p = static_cast<cmApPortTestRecd*>(arg); cmApPortTestRecd* p = reinterpret_cast<cmApPortTestRecd*>(arg);
for(unsigned i=0; i<inPktCnt; ++i) for(unsigned i=0; i<inPktCnt; ++i)
static_cast<cmApPortTestRecd*>(inPktArray[i].cbArg)->iCbCnt++; reinterpret_cast<cmApPortTestRecd*>(inPktArray[i].cbArg)->iCbCnt++;
for(unsigned i=0; i<outPktCnt; ++i) for(unsigned i=0; i<outPktCnt; ++i)
static_cast<cmApPortTestRecd*>(outPktArray[i].cbArg)->oCbCnt++; reinterpret_cast<cmApPortTestRecd*>(outPktArray[i].cbArg)->oCbCnt++;
if( p->amHz > 0 && outPktCnt > 0 ) if( p->amHz > 0 && outPktCnt > 0 )
{ {