JUCE Convolution Class (Impulse) not working in Android Bluetooth Headphones?

I have created a simple Audio Player Android application that provides various DSP effects. All the effects are working great, but the IMPULSE effect I created with the DSP Convolution Class does not work with Bluetooth headphones. The sound gets distorted and extremeley chopped. The Impulse Convolution works fine with the phone’s built-in speaker, but it gets distorted when I switch to Bluetooth.

How can I fix this ? How can Bluetooth effect JUCE convolution DSP ?

With Bluetooth headphones you may be working with a very low sample rate (such as 16.000 Hz) or with only one channel (mono).
If your implementation assumes that you have at least 2 channels or if you make assumptions about the sample rate, it will not work with all Bluetooth headphones.
Perhaps you want to check the number of available channels and the actual sample rate when using the Bluetooth headphones. (For example, you can start the AudioPluginHost and check how the headphones appear in its Audio IO settings).

1 Like

Thanks. I have read the sample rate may decrease when the bluetooth device is connected, but I’ve heared that it may swithc stereo to mono. Is it possible while stereo effects seem to work properly?

By the way yes, in my code I assume I have 2 channels by default.

I’ve tried first constructing convolution with different fixed latency values, but propably that’s not the solution because it didn’t fix the problem.
I could see the cpu load increases obviously when convolution processes, then I the second thing I was going to try was increasing buffer size in the sounds processing algorithm, which I haven’t done yet.

Certainly I’ll check if somenthing is wrong with number of channels or sample rate when bluetooth is connected.

Hmm I understood, thanks for advice again. I’ll check IO settings too for the bluetooth device in juce audio plugin host.

By the way, do you mean here there will be differences between different devices?

If your implementation assumes that you have at least 2 channels or if you make assumptions about the sample rate, it will not work with all Bluetooth headphones.

I couldn’t understand exactly, how can assuming that the setup has 2 channels cause this kind of problem? I think I don’t have enough knowledge abot this, I’ll be very pleased if you can explain :sweat_smile: :smiley: :pray:

Actually I have just reported what I observed when I tried to use one of my own plugins with a Bluetooth headphone. I cannot tell if these observations have anything to do with the problem you have reported.
A mono headset will probably totally crash your plugin if you make the assumption that the input or output will always be stereo. The low sample rate might cause problems / aliasing artifacts if you assume anywhere in your code that you can use the full hearing range. (For the Bluetooth headphones that I use for testing, the sample rate of 16.000 Hz means that only the sub Nyquist range of up to 8.000 Hz can be effectively used).

1 Like

I understand. I’ve checked the sample rate and channels with juce plugin host application. Your advice helped a lot to find the reason of the problem. Now I know the problem is about sample rate.
Thanks.