diff --git a/include/Qt/AudioPlaybackThread.h b/include/Qt/AudioPlaybackThread.h index 348a0f48..9a159448 100644 --- a/include/Qt/AudioPlaybackThread.h +++ b/include/Qt/AudioPlaybackThread.h @@ -75,7 +75,7 @@ namespace openshot static AudioDeviceManagerSingleton * Instance(); /// Public device manager property - AudioDeviceManager audioDeviceManager; + juce::AudioDeviceManager audioDeviceManager; /// Close audio device void CloseAudioDevice(); @@ -86,9 +86,9 @@ namespace openshot */ class AudioPlaybackThread : juce::Thread { - AudioSourcePlayer player; - AudioTransportSource transport; - MixerAudioSource mixer; + juce::AudioSourcePlayer player; + juce::AudioTransportSource transport; + juce::MixerAudioSource mixer; AudioReaderSource *source; double sampleRate; int numChannels; diff --git a/src/Frame.cpp b/src/Frame.cpp index 9577a7f9..ae9f1a4b 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -829,7 +829,7 @@ void Frame::AddImage(std::shared_ptr new_image, bool only_odd_lines) if (ret) { return; } - + // Get the frame's image const GenericScopedLock lock(addingImageSection); #pragma omp critical (AddImage) @@ -979,7 +979,8 @@ void Frame::Play() return; juce::AudioDeviceManager deviceManager; - String error = deviceManager.initialise (0, /* number of input channels */ + juce::String error = deviceManager.initialise ( + 0, /* number of input channels */ 2, /* number of output channels */ 0, /* no XML settings.. */ true /* select default device on failure */); @@ -992,8 +993,8 @@ void Frame::Play() juce::AudioSourcePlayer audioSourcePlayer; deviceManager.addAudioCallback (&audioSourcePlayer); - ScopedPointer my_source; - my_source = new AudioBufferSource(audio.get()); + std::unique_ptr my_source; + my_source.reset (new AudioBufferSource (audio.get())); // Create TimeSliceThread for audio buffering juce::TimeSliceThread my_thread("Audio buffer thread"); @@ -1001,8 +1002,8 @@ void Frame::Play() // Start thread my_thread.startThread(); - AudioTransportSource transport1; - transport1.setSource (my_source, + juce::AudioTransportSource transport1; + transport1.setSource (my_source.get(), 5000, // tells it to buffer this many samples ahead &my_thread, (double) sample_rate, diff --git a/src/bindings/ruby/CMakeLists.txt b/src/bindings/ruby/CMakeLists.txt index 2faa10fc..18964486 100644 --- a/src/bindings/ruby/CMakeLists.txt +++ b/src/bindings/ruby/CMakeLists.txt @@ -72,6 +72,9 @@ endif() set_property(SOURCE openshot.i PROPERTY CPLUSPLUS ON) set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot) +### Unbreak std::isfinite() +add_compile_definitions(HAVE_ISFINITE=1) + ### Suppress a ton of warnings in the generated SWIG C++ code set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \ -Wno-deprecated-copy -Wno-class-memaccess -Wno-cast-function-type \