Sample rate issue when starting up sonic pi

Hi, we know that different sample rate between input and output may cause sonic pi fail to start. However the macbook pro is so stupid that it won’t remember my setting, and I have to set the. sample rate again and again, and for some reason I don’t know, the input sample rate returns to 48khz even if I haven’t restart the computer. Basically each time when I want to start up sonic pi, I have to check sample rate and set them manually to 44khz, making them the same. This is quite annoying. Anyone has the same problem?

Have you tried using Sonic Pi’s audio settings config file to set the sound card sample rate?
(The file at .sonic-pi/config/audio-settings.toml has the following line you can uncomment and edit):

# sound_card_sample_rate = 48000

oh thank you, let me try

it works! Idk why the first time it’s not working. But now it’s ok.

BTW, do you know why my mcp input sample rate keeps reseting to the default 48khz by itseltf?

I don’t quite remember, but I think Sonic Pi caches the sample rate before setting it to your preferred value, and then resets when Sonic pi closes - is that what you mean?

no I mean in the audio midi setup, the input sample rate always jump back to 48khz, I don’t know why.

Sure, but what I was getting at was maybe before you start Sonic Pi, the sample rate is 48KHz, then Sonic Pi requests 44 KHz, and when Sonic Pi exits, as it shuts down it sets the sample rate back to 48 KHz for you - the result of which is what you see when you look at the audio midi setup? (If that’s not what you’re talking about, apologies!)

oh it’s not sonic pi making the change, actually I have just modified the config, now sonic can change sample rate at the start. but before I did that, sonic simply fail to start due to the inconsistent sample rate. and the reason that input sample rate is changed back to 48khz is just a myth. I change it, it just jumps back after hours or half a day I don’t know, during this period I kept my sonic running so it can’t be sonic which changed it.