MickMad
Well-known member
Yes. In fact after I get the callback, I set the new MCLK and set the new sample rate to my I2S Ics and the audio resumes on the PC:
Code:void audioformat_change() // change sample rate requests { Serial.println("audioformat_change_callback"); dac.muteAudio(1, 1); RADIOMODES mode = radio.mode; Serial.printf("New samplerate: %d\n", usb_audio_sampling_frequency); recorder.halt(); // stop everything here setupI2SCLOCKS(usb_audio_sampling_frequency); radio.audio_sample_rate = usb_audio_sampling_frequency; radio.prop(P_DIGITAL_IO_OUTPUT_SAMPLE_RATE, usb_audio_sampling_frequency); // if (mode != RADIO_OFF) // radio.powerUp(); dac.muteAudio(0, 0); audio_rate_change = false; }
mh, I'm trying a simple sketch where I connected an AudioSynthWaveformSine object to both USB audio outputs but all I get is empty packets.
Anyway, I'll try it with I2S objects too and see if it works.