DemoRunner fails to initialise audio I/O

Hi,

When I set the sample rate of the Macbook Air speakers to 48Khz using Audio MIDI Setup, the DemoRunner input/output devices are initialized as << none >>.
Upon reopening the DemoRunner, the input/output devices are correctly initialised to “Macbook Air Speakers” and “Macbook Air Microphone” with the sample rate set to 44.1KHz.

Furthermore, while the DemoRunner is running, if you modify the samplerate in the Audio Midi Setup, the samplerate within the DemoRunner fails to follow along with the settings in the Audio Midi Setup.

Tested with:

  • macOS 14.3.1
  • M1
  • JUCE 7.0.10

Best,

Jelle

1 Like

I’m unable to repro with Macbook Pro / M1 Pro, macOS 14.3.1, JUCE develop.

Changing the sample rate appears to work in both directions: setting the rate in Audio Midi Setup updates the DemoRunner and vice versa.

Do you have other Macs you can use for testing? Maybe there’s something unusual about the environment on the Macbook Air.

We concluded the same behaviour on another mac mini m1 machine.

Have you tried to set the samplerate of the macbook air speakers to 48K before launching the DemoRunner?

Yes, after the DemoRunner launches, I see “MacBook Pro Speakers” and “MacBook Pro Microphone” selected, with a samplerate of 48KHz and a buffer size of 512 samples.

Hmm that’s strange, I’ll investigate it a bit more and let you know my findings.

Thanks for testing.

@reuk

I just played a bit more with it, and I found that in order to reproduce it, I have to change the samplerate a few times in Audio Midi Setup before launching DemoRunner.

Could you try this:

  1. Close DemoRunner
  2. Set Macbook Air Speakers samplerate to 44.1K from within Audio Midi Setup
  3. Set Macbook Air Speakers samplerate to 48K from within Audio Midi Setup
  4. Launch DemoRunner

After step 4, the DemoRunner shows input and output devices as << none >>.

  1. Close and relaunch DemoRunner

After step 5, the DemoRunner shows “MacBook Pro Speakers” and “MacBook Pro Microphone”.

I can repro something similar. It looks like this only happens when there are different sample rates set for the speakers and microphone in Audio Midi Settings before launching the DemoRunner.

Do you think this is a JUCE bug?

Likely, but will need a bit more investigation.

1 Like

Thanks, I’ll help wherever I can.

1 Like

Thanks for reporting this issue. We’ve pushed a fix to the develop branch:

Please test this out and let us know if you encounter any new issues.

1 Like