Skip to content

Commit

Permalink
More ifdef gating...
Browse files Browse the repository at this point in the history
  • Loading branch information
psobot committed Jul 25, 2024
1 parent 2af430a commit dca533b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pedalboard/io/AudioStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ Or use :py:meth:`AudioStream.write` to stream audio in chunks::
[](const AudioStream &stream) {
std::ostringstream ss;
ss << "<pedalboard.io.AudioStream";
#ifdef JUCE_MODULE_AVAILABLE_juce_audio_devices
auto audioDeviceSetup = stream.getAudioDeviceSetup();

if (stream.getNumInputChannels() > 0) {
Expand All @@ -820,14 +821,19 @@ Or use :py:meth:`AudioStream.write` to stream audio in chunks::
} else {
ss << " not running";
}
#endif
ss << " at " << &stream;
ss << ">";
return ss.str();
})
.def_property_readonly(
"buffer_size",
[](AudioStream &stream) {
#ifdef JUCE_MODULE_AVAILABLE_juce_audio_devices
return stream.getAudioDeviceSetup().bufferSize;
#else
return 0;
#endif
},
"The size (in frames) of the buffer used between the audio "
"hardware "
Expand Down

0 comments on commit dca533b

Please sign in to comment.