c# - NAudio recording is somewhere filtering the high frequencies? -
i recording freqs 17k , try decode them goertzel filters.
i think nadio filtering high freqs although there no filters @ in program.
i recorded same sound file audacity , see fine spectrum.
now, same thing c# program kind of code of recording sound:
void mywavein_dataavailable(object sender, waveineventargs e) { mymemorystream.write(e.buffer, 0, e.bytesrecorded);//this playing mymemorystream (int index = 0; index < e.bytesrecorded; index += 2)//here convert in loop stream floating number samples { short sample = (short)((e.buffer[index + 1] << 8) | e.buffer[index + 0]); samples32extended.add(sample); samples32.add(sample / 32768f);//ieee 32 floating number } }
then, generate binary file in order read in matlab see spectrum that:
float[] samples32array = samples32.toarray(); using(binarywriter writer = new binarywriter(file.open("c:/users/alon/desktop/myrecordings/myrecordbin.bin", filemode.create))) { foreach (var value in samples32array) { writer.write(value); } }
then, spectrum matlab that:
i don't have clue of happening.. must you.. thanks
Comments
Post a Comment