chipaudette
Well-known member
I haven't been the one maintaining the OpenAudio library...I haven't been the maintainer for years and years, so its examples look quite different than I remember them. I'm having difficulty finding an example that uses AudioSettings to change the sample rate or block size. That's unfortunate.
Back when I wrote the original version of the library, you had to pass your AudioSettings to each audio class via its constructor when you were instantiating it. I am assuming that this is still true for the OpenAudio library, but I could be wrong.
Looking at your code, I see that you create the AudioSettings but that you do not pass it to your other audio classes when creating them. So, I would suggest changing your two instantiating lines to be:
If that alone doesn't work, I would also suggest that you try adding the I2S input block, even if you don't connect it to anything. My memory from long ago is that it sometimes it is involved with certain timing events. So, try adding:
Good luck!
Chip
Back when I wrote the original version of the library, you had to pass your AudioSettings to each audio class via its constructor when you were instantiating it. I am assuming that this is still true for the OpenAudio library, but I could be wrong.
Looking at your code, I see that you create the AudioSettings but that you do not pass it to your other audio classes when creating them. So, I would suggest changing your two instantiating lines to be:
Code:
AudioOutputI2S_F32 i2sOut(audio_settings);
AudioSynthWaveformSine_F32 sine(audio_settings);
If that alone doesn't work, I would also suggest that you try adding the I2S input block, even if you don't connect it to anything. My memory from long ago is that it sometimes it is involved with certain timing events. So, try adding:
Code:
AudioInputI2S_F32 i2sIn(audio_settings);
Good luck!
Chip