That would be a good feature...
There is an experimental feature in the MIDI handler to change the sample rate at runtime, though I seem to recall this doesn't yet work as expected.
There are a few global objects available in the firmware code, e.g.: 'settings' for the ApplicationSettings object and 'codec' for CodecController.
This bit of code should dynamically change the SR:
settings.audio_samplingrate = 96000;