Migrating from analogread to adc1_get_raw

Hi,

I making a project using an ESP32 WROVER from freenove.
I was using "analogRead" to read the voltage at GPIO36 (pin 4 on my board).
This worked just fine.

However, I have since added audio to my project using I2S via the included "driver/i2s.h".
This would not run if I used analogRead, telling me I had to switch to the newer "driver_ng".
As far as I understand it, this means I should switch to using "adc1_get_raw()" instead of "analogRead".

I have done it, initialized the ADC Channel using this code :

adc1_config_width(ADC_WIDTH_BIT_12);
adc1_config_channel_atten(ADC1_CHANNEL_0, ADC_ATTEN_DB_0);

then reading the value using this code :
int value = adc1_get_raw(ADC1_CHANNEL_0);

ADC1_CHANNEL_0 should be GPIO36 just as before.
But this new approach always returns 0 whatever the voltage is applied to the PIN.

Does anyone know what I may be doing wrong ?
Thanks.