Re: [hatari-devel] Re: PortAudio replaced

[ Thread Index | Date Index | More Archives ]


Can you try

#define FRAMES_PER_BUFFER 4096  // instead of 512

to see if the sound with SDL2 is better (I see this value very often in examples).



Le 11/01/2022 à 19:13, Laurent Sallafranque a écrit :
Hi thomas,

I've done many tries yesterday evening without success for now.

I've forced the microphone in hard in the code, I've forced frequencies, added some printf, read about SDL sound recording, ...

There must be a little something, but I still haven't found what.

I continue to investigate.



Le 11/01/2022 à 17:49, Thomas Huth a écrit :
Am Mon, 10 Jan 2022 00:11:51 +0100
schrieb Laurent Sallafranque <laurent.sallafranque@xxxxxxx>:


I'll try to complete my reply:

1) Which Linux distro and which SDL version are you using?
Distro: Ubuntu 20.04.3 LTS
sdl :     using SDL2 v2.0.10
Ok, thanks, so that should be fine, I guess. I read somewhere about
problems with microphone input in SDL versions < 2.0.5, but I don't
think that these versions are still in use these days (i.e. in
maintained distros).

2) Do you have multiple microphone inputs on your computer? E.g. a
direct mic on the Laptop and one in the dock? If so, could it be
that SDL uses a different default mic than PortAudio?
Yes, at least 1 mic in front and another one at the rear of the

And the headphone I use for my tests is an USB one with a microphone.
Could you please check whether the input now comses from one of these
other inputs? Maybe we need to add an input selector now...

are these freely available somewhere?
You can find them here (I don't know if it's free or not, but at
least, it's for testing purpose).

If you test with AFM, just stop the equalizer (it makes a very
glitchy sound, I've never found why).
Thanks! I've checked them now, and for me they work with both, SDL and
PortAudio. However, sound quality seems to be a bit worse with SDL, so
that needs some more fine tuning at least...

I can record the sound (tomorrow) if you want.
Thanks, but that likely does not help much to debug this issue... I
guess I'll better revert the patch for now until the problem is


Mail converted by MHonArc 2.6.19+