Tag: pulseaudio

如何找到正确的RAW格式

我有这个代码 SNDFILE *sf; SF_INFO info; int num_channels; int num, num_items; int *buf; int f,sr,c; int i,j; FILE *out; /* Open the WAV file. */ info.format = (SF_FORMAT_RAW | SF_FORMAT_PCM_16); info.samplerate = 44100; info.channels = 2; sf = sf_open(“test.raw”,SFM_READ,&info); if (sf == NULL) { printf(“Failed to open the file. ( %d )\n”,sf_perror(sf)); exit(-1); } /* Print […]