Coming back to this thread since I've solved the issue, and even though it's an openFrameworks thing, it might be helpful to others looking here.
I cloned openFrameworks from GitHub (
https://github.com/openframeworks/openFrameworks) and made the following changes:
In the libs/openFrameworks/sound directory, I changed lines lines 96 and 224 from ofSoundStream.h, and line 25 from ofBaseSoundStream.h, replacing UNSPECIFIED with JACK (to be honest, I'm not sure if this is really necessary).
Then, in a test app with ofxPd, in testApp.h I included the following line inside the testApp class:
ofSoundStream soundStream;
plus the sample variable rate like this:
int samplerate;
and in testApp.cpp, inside the setup function, I created an instance of the ofSoundStreamSettings like this:
ofSoundStreamSettings settings;
I initialized the sample rate:
sampleRate = 48000;
then I setup JACK like this:
auto devices = soundStream.getDeviceList(ofSoundDevice::Api::JACK);
settings.setOutDevice(devices[0]);
and finally I made the ofSoundStreamSettings like this:
settings.setOutListener(this);
settings.sampleRate = sampleRate;
settings.numOutputChannels = 2;
settings.numInputChannels = 0;
settings.bufferSize = ofxPd::blockSize()*ticksPerBuffer;
soundStream.setup(settings);
ofSoundStreamSetup(2, numInputs, this, sampleRate, ofxPd::blockSize()*ticksPerBuffer, 3);