Skip to content

Commit 25ca2d0

Browse files
authored
Merge pull request #515 from ferdnyc/audio-path-config
Enable building with a libopenshot-audio that's based on non-bundled JUCE
2 parents 9922479 + affd4b2 commit 25ca2d0

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

include/Qt/AudioPlaybackThread.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ namespace openshot
7575
static AudioDeviceManagerSingleton * Instance();
7676

7777
/// Public device manager property
78-
AudioDeviceManager audioDeviceManager;
78+
juce::AudioDeviceManager audioDeviceManager;
7979

8080
/// Close audio device
8181
void CloseAudioDevice();
@@ -86,9 +86,9 @@ namespace openshot
8686
*/
8787
class AudioPlaybackThread : juce::Thread
8888
{
89-
AudioSourcePlayer player;
90-
AudioTransportSource transport;
91-
MixerAudioSource mixer;
89+
juce::AudioSourcePlayer player;
90+
juce::AudioTransportSource transport;
91+
juce::MixerAudioSource mixer;
9292
AudioReaderSource *source;
9393
double sampleRate;
9494
int numChannels;

src/Frame.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ void Frame::AddImage(std::shared_ptr<QImage> new_image, bool only_odd_lines)
829829
if (ret) {
830830
return;
831831
}
832-
832+
833833
// Get the frame's image
834834
const GenericScopedLock<juce::CriticalSection> lock(addingImageSection);
835835
#pragma omp critical (AddImage)
@@ -979,7 +979,8 @@ void Frame::Play()
979979
return;
980980

981981
juce::AudioDeviceManager deviceManager;
982-
String error = deviceManager.initialise (0, /* number of input channels */
982+
juce::String error = deviceManager.initialise (
983+
0, /* number of input channels */
983984
2, /* number of output channels */
984985
0, /* no XML settings.. */
985986
true /* select default device on failure */);
@@ -992,17 +993,17 @@ void Frame::Play()
992993
juce::AudioSourcePlayer audioSourcePlayer;
993994
deviceManager.addAudioCallback (&audioSourcePlayer);
994995

995-
ScopedPointer<AudioBufferSource> my_source;
996-
my_source = new AudioBufferSource(audio.get());
996+
std::unique_ptr<AudioBufferSource> my_source;
997+
my_source.reset (new AudioBufferSource (audio.get()));
997998

998999
// Create TimeSliceThread for audio buffering
9991000
juce::TimeSliceThread my_thread("Audio buffer thread");
10001001

10011002
// Start thread
10021003
my_thread.startThread();
10031004

1004-
AudioTransportSource transport1;
1005-
transport1.setSource (my_source,
1005+
juce::AudioTransportSource transport1;
1006+
transport1.setSource (my_source.get(),
10061007
5000, // tells it to buffer this many samples ahead
10071008
&my_thread,
10081009
(double) sample_rate,

src/bindings/ruby/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ endif()
7272
set_property(SOURCE openshot.i PROPERTY CPLUSPLUS ON)
7373
set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot)
7474

75+
### Unbreak std::isfinite()
76+
add_compile_definitions(HAVE_ISFINITE=1)
77+
7578
### Suppress a ton of warnings in the generated SWIG C++ code
7679
set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \
7780
-Wno-deprecated-copy -Wno-class-memaccess -Wno-cast-function-type \

0 commit comments

Comments
 (0)