Hello guys.
I'm have NI USB-9234 Hardware and I downloaded DAQmx (20.1ver).
I want to collect the sound data from microphone(PCB 378B02) that linked the USB-9234's channel 1 by using DAQmx C Reference function.
It is working good but when loud sound occurring to the microphone, recorded *.wav file have some crackling noise.
Here is my source code. ( I referenced the example code. Path : ..NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Sound Pressure)
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk(DAQmxCreateAIMicrophoneChan(taskHandle, "Dev1/ai0", "", DAQmx_Val_PseudoDiff, DAQmx_Val_Pascals, 50, 124.0, DAQmx_Val_Internal, 0.005, NULL));
DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandle,"",25600,DAQmx_Val_Rising,DAQmx_Val_ContSamps, 1000));
DAQmxErrChk(DAQmxRegisterEveryNSamplesEvent(taskHandle,DAQmx_Val_Acquired_Into_Buffer, 1000,0,EveryNCallback,NULL));
DAQmxErrChk(DAQmxRegisterDoneEvent(taskHandle,0,DoneCallback,NULL));
I wonder if my DAQmx function is not correct.
Anyone who know the microphone setting, please let me know