Commit Graph

43 Commits

Author SHA1 Message Date
Jonathan Thomas
9eda757885 Merge branch 'develop' into audio-devices
# Conflicts:
#	src/AudioBufferSource.cpp
#	src/AudioReaderSource.cpp
#	src/AudioReaderSource.h
#	src/Clip.cpp
#	src/Frame.cpp
#	src/Qt/AudioPlaybackThread.h
#	src/audio_effects/Compressor.h
#	src/audio_effects/Delay.h
#	src/audio_effects/Echo.h
#	src/audio_effects/Expander.h
2021-12-02 22:05:19 -06:00
FeRD (Frank Dana)
59108504e3 Code changes for compatibility with JUCE 6.x
- Replace all juce::CriticalSection with std::recursive_mutex
- Replace all juce::AudioSampleBuffer with juce::AudioBuffer<float>
- Eliminate implicit reliance on 'using namespace juce;'
- Replace OpenShotAudio.h includes with targeted juce modules
2021-11-09 06:22:25 -05:00
Frank Dana
59138ea3e4 Adopt license management via Reuse project/tool (#711)
* reuse-managed license/copyright headers

reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> for the online documentation.

* Set jsoncpp license
* Add MIT license for Decklink sources
* Explicitly license examples/
  - Add headers to source files
  - Change blanket licensing in .reuse/dep5 to only cover binary media
  - Import CC-BY-3.0 license and assign to sintel_trailer
2021-10-16 01:26:26 -04:00
FeRD (Frank Dana)
6aab6fd957 Audio: New device name lookup
- A new AudioDevices class replaces the AudioDeviceInfo struct.
  It has a single method, getNames(), which:
  * creates an AudioDeviceManager (NOT using the singleton)
  * scans for available devices
  * returns the results as a std::vector containing
    std::pair<std::string, std::string> objects

  (The AudioDevices device manager is never initialize()d, so
  no devices are opened; it should be safe to use even DURING
  playback, without disruption.)

  By using STL containers (rather than a custom struct) to return
  the results, Python is able to consume the output as a native
  list of tuples.

  AudioDeviceInfo is still present for compatibility, but deprecated.

- Eliminated some unnecessary conversions (like):
  * calls to std::string::c_str, when passing to juce::String.
    juce::String accepts std::string directly.
  * calls to juce::String::toRawUTF8, when creating std::string.
    There's a juce::String::ToStdString, which is better.
2021-08-24 13:11:00 -04:00
FeRD (Frank Dana)
aa40ea29e0 Update include paths in all source/header files 2020-10-18 07:43:37 -04:00
Frank Dana
e500cae9f5 Replace sleep()/usleep() with std::chrono calls (#473) 2020-09-02 02:07:54 -04:00
FeRD (Frank Dana)
6aebb10cea More explicit prefixing in Qt/ and Player classes 2019-09-21 00:14:32 -04:00
FeRD (Frank Dana)
f170fdd009 Update copyright range to current year 2019-06-11 06:48:32 -04:00
FeRD (Frank Dana)
0327c2ab5c Remove license block from documentation comment 2019-06-09 08:31:04 -04:00
Jonathan Thomas
cdb4ae5483 Fixing crash on Mac due to juce::String again 2019-04-29 17:05:13 -05:00
Jonathan Thomas
ef2ed56906 More refactoring for Mac compile breakage 2019-04-24 10:08:22 -05:00
Jonathan Thomas
a69c34ffbb Small refactor to audio device manager initialise (to prevent compile breakage on Mac) 2019-04-24 09:41:52 -05:00
Jonathan Thomas
140fbaddff Added new AudioDeviceInfo struct, and populate a vector of them on QtPlayer initialization. This allows a user to overwrite the preferred audio device by using the setting PLAYBACK_AUDIO_DEVICE_NAME. 2019-04-23 16:45:02 -05:00
Jonathan Thomas
9dbb063ded Persist any error returned by JUCE during initialise() method, such as sample rate issues on Windows (when playback and recording sample rates do not match, which breaks WASAPI) 2019-04-04 00:55:47 -05:00
Jonathan Thomas
851ad86634 Changing some sleep() calls to usleep(), for more accuracy. This is a bit experimental, and hopefully will work on all OSes. 2018-04-14 16:25:58 -05:00
Jonathan Thomas
566c8f5a82 Spelling and typo fixes. Thanks Gelma for the pull request 2018-01-06 02:22:05 -06:00
Jonathan Thomas
c95db460d6 Big update! Updating all "long int" frame number types to int64_t, so all 3 OSes will produce the same depth and precision on frame numbers. Also removing variable bitrate support temporarily, since it causes more problems than it solves. 2017-09-28 16:03:01 -05:00
Jonathan Thomas
f12ffe692b Migrating tr1 to std, adding C++11 support to build scripts, fixing crash in FFmpegReader (caused by shared_ptr, buffer, and last_video_frame corruption). Much improved stability with this change. Thanks to Craig and Peter for the help! 2017-08-20 17:37:39 -05:00
Jonathan Thomas
b3ca56b5ab Another attempted fix for audio device management. Moving CloseAudioDevice() call to only invoke when quiting OpenShot, and only initializing the JUCE audio manager 1 time. This fixes a audio freeze in Windows when the preview window launches. 2017-03-26 23:51:03 -07:00
Jonathan Thomas
6fe901f359 Refactoring closing of audio devices 2017-03-21 14:38:42 -05:00
Jonathan Thomas
3193ee9701 Wrapping AudioDeviceManager in singleton wrapper, to ensure only a single instance can be created. This solves lots of weird issues with the preview dialog. 2017-03-21 10:56:19 -05:00
Jonathan Thomas
e084f65315 Adding TODO for libopenshot related to audioDeviceManager 2017-03-21 00:45:11 -05:00
Jonathan Thomas
85ac4bf6d2 Updating references to frame number / position to long int, there were still quite a few old "int" declarations, which limits the length of frame number. Also, updated precision of KeyFrames to use double (instead of float) for higher precision, which fixed lots of issues with very long videos (since our FrameMapper used a KeyFrame object to create a map to new frames) 2017-01-24 18:39:17 -06:00
Jonathan Thomas
054175ddaa Fixed some audio popping issues related to audio buffer size and also resampling issues inside the FrameMapper class. Also made the Timeline more hardened, if a reader returns an error requesting a frame. 2016-01-30 17:12:41 -06:00
Jonathan Thomas
d48ce2068e Refactored some audio thread code, and improved performance of timeline (by removing a 'omp ordered' statement that doesn't seem needed). Also added some performance improvements in Clip and FrameMapper classes (if the frame is the same as the source frame... just use the source frame) 2016-01-18 15:20:55 -06:00