python-sounddevice icon indicating copy to clipboard operation
python-sounddevice copied to clipboard

glitch when record with MME/WDM host API

Open bactone opened this issue 3 years ago • 1 comments

how to fix the glitch when record with MME/WDM host API, I compare the recorded signal using MME/WDM api and ASIO api, and the former gets lot of glitch, here bellow are two fig to show the difference: image image the code I use is:

# for MME record
my_recording = sd.playrec(pt_l, device=(3, 14), samplerate=fs, channels=1, blocking=True,
                          input_mapping=[1], output_mapping=[1], dtype='int32')
# for ASIO record
my_recording = sd.playrec(pt_l, device=(44, 44), samplerate=fs, channels=1, blocking=True,
                          input_mapping=[1], output_mapping=[1], dtype='int32')

bactone avatar Apr 16 '22 01:04 bactone

It looks like MME has a much coarser quantization, and it is indeed weird.

Do you really need the data type 'int32'? I think its support may not be the best for all host APIs. You should try 'float32' (which is the default), which might be better supported. Does this show the same effect?

mgeier avatar Apr 21 '22 18:04 mgeier