Home > Software engineering >  Windows sound card collection, the size of the sample point problem
Windows sound card collection, the size of the sample point problem

Time:11-26

Use waveinopen series functions, do sound card collection, 16 k, a sampling point 2 bytes, found in the notebook sample point is a small side, on the desktop is big end, the same code, are win10 system, x86 platform, the only sound card is different, one is the Realtek High Definition Audio ", one is the Realtek Audio (R), and then I use the open source library portaudio do collection, the result is the same, the size of the reverse, so is the issue of sound card driver? Is there a way to distinguish between the size of the end?

CodePudding user response:

The PCM is small end of the standard model, need to pay attention to is, if it's about two channel data is about cross placed

CodePudding user response:

Forgot to say, is a single channel, normal are small end, don't know why I run on the desktop is big end, and no parameter can be set size end

CodePudding user response:

/* 
The Function check_for_endianness () returns 1, if architecture
Is little endian, 0 in case of big endian.
*/

Int check_for_endianness ()
{
Unsigned int x=1;
Char * c=(char *) & amp; x;
Return (int) * c;
}

CodePudding user response:

This is a normal end and small end judgment CPU architecture, I am sure that my test laptops and desktops are small side, but the acquisition of 16 bit sampling points is a big end a small side
  • Related