S
Skyhorse
What are the following codes doing? What are the meaning of & 0xffe00000, &
3, 0xf, 0x3?
Is there any difference between & 3 and & 0x3?
inline BOOL CheckAudioHeader(DWORD dwHeader)
{
if ( (dwHeader & 0xffe00000) != 0xffe00000)
return FALSE;
if (!((dwHeader >> 17) & 3))
return FALSE;
if ( ((dwHeader >> 12) & 0xf) == 0xf)
return FALSE;
if ( ((dwHeader >> 10) & 0x3) == 0x3)
return FALSE;
#ifdef _WIN32_WCE
if ( ((dwHeader >> 12) & 0xf) == 0x0)
return FALSE;
#endif
return TRUE;
}
Thanks
3, 0xf, 0x3?
Is there any difference between & 3 and & 0x3?
inline BOOL CheckAudioHeader(DWORD dwHeader)
{
if ( (dwHeader & 0xffe00000) != 0xffe00000)
return FALSE;
if (!((dwHeader >> 17) & 3))
return FALSE;
if ( ((dwHeader >> 12) & 0xf) == 0xf)
return FALSE;
if ( ((dwHeader >> 10) & 0x3) == 0x3)
return FALSE;
#ifdef _WIN32_WCE
if ( ((dwHeader >> 12) & 0xf) == 0x0)
return FALSE;
#endif
return TRUE;
}
Thanks