Commit Graph

32 Commits

Author SHA1 Message Date
Jonathan Thomas
186a4ca5c1 Refactoring Audio Device detection (don't crash on Windows, find actual sample rate and device details) (#883)
* Close down ZMQ context to stop the zmq threads (related to sentry bug: OPENSHOT-3X)

* Add Support for Windows 7/8.1 (#881)

Adding protection around getting current sample rate for win 7, if audio device not found. Also added mutex for Singleton method. Also, making whitespace consistent on AudioPlaybackThread.cpp

* Big refactor of audio device opening - with multiple sample rates attempted, for better recovery from a missing or unsupported sample rate. Debug logs added for testing.

* Additional failure logging for windows audio device init

* Refactor of Audio Device Initialization (#882)

* Huge refactor of audio device initialization:
- Attempt requested audio device first, and then iterate through all known audio types and devices, and common sample rates. The idea is to ignore an invalid default or invalid requested device, and keep looking until we find a valid one
- New public method to return active, open audio device
- Added methods for AudioDeviceInfo struct, to make it callable from Python
- Some code clean-up and whitespace fixes
- New unit tests for AudioDeviceManagerSingleton

* Ignore audio device unit tests on systems with "No Driver" returned in the audio error message

* Ignore audio device unit tests if any error is found during initialization (i.e. build servers don't have audio cards)

* Trying to update GitHub libomp errors during build checks

* Remove zmq context shutdown call, due to the method missing on newer versions of zmq.hpp

* Downgrading GitHub Ubuntu latest image to Ubuntu 20.04, for compatibility with Catchv2

* Initialize all audio device manager variables correctly, and ignore unit test on low or missing sample rate systems (i.e. GitHub build servers)
2022-12-19 13:15:43 -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)
2f3615f706 Move Exceptions.h includes to .cpp files 2021-01-26 10:52:04 -05:00
FeRD (Frank Dana)
f55c563ba5 Merge branch 'develop' into debug-to-stderr 2020-10-19 16:38:54 -04:00
FeRD (Frank Dana)
aa40ea29e0 Update include paths in all source/header files 2020-10-18 07:43:37 -04:00
FeRD (Frank Dana)
e5e7b27e14 Merge branch 'develop' into debug-to-stderr 2020-09-17 22:14:05 -04:00
Frank Dana
e500cae9f5 Replace sleep()/usleep() with std::chrono calls (#473) 2020-09-02 02:07:54 -04:00
FeRD (Frank Dana)
b3e5eec16b Merge branch 'develop' into debug-to-stderr 2020-06-17 08:39:57 -04:00
Frank Dana
799e43a0a2 Merge branch 'develop' into zmqfix 2020-03-26 07:34:58 -04:00
Chiller Dragon
0a5dfd93ad Fix zmq version check (#478) 2020-03-25 20:58:11 -04:00
FeRD (Frank Dana)
54f5fea201 ZeroMQ's std::string support is too new 2020-03-25 11:42:19 -04:00
Frank Dana
48028ef033 Merge branch 'develop' into debug-to-stderr 2020-03-23 08:18:19 -04:00
Frank Dana
4fad197fbe Add version gating for Zmq and Qt deprecations (#470)
* ZmqLogger: Avoid deprecated send() in later ZMQ
* QtImageReader: byteCount() deprecated in QT 5.10+
2020-03-23 08:16:02 -04:00
FeRD (Frank Dana)
fc18366843 ZmqLogger: Add optional dumping to stderr
Add an openshot::Settings boolean `DEBUG_TO_STDERR`, which when
set true will direct all AppendDebugMethod() messages to std::clog,
in addition to (possibly) being sent over the ZeroMQ wire.
2020-02-01 02:00:43 -05:00
SuslikV
dfbcb4730b Disable debug logger on close
The logger can be closed from the external thread (openshot-qt), while
same logger instance is still in use in libopenshot.

This change prevents crash on attempts to use debug logger if it was
closed.

Co-authored-by: Frank Dana <ferdnyc@users.noreply.github.com>
2019-08-12 14:09:26 +03:00
Jonathan Thomas
12fce8040f Merge pull request #266 from ferdnyc/zmq-default-params
Default values for ZMQ logging calls
2019-07-29 16:30:22 -05:00
Jonathan Thomas
cf0e827a24 Adding logging support for resvg (which will output on stderr) 2019-07-23 17:11:55 -05:00
FeRD (Frank Dana)
2dc2fffa45 ZmqLogger: default AppendDebugMethod()'s extra params
Give the AppendDebugMethod() declaration a set of default values for
all parameters after the first. (It uses `""` and `-1.0`, which are
what callers were passing in anyway.) This way, callers have the
_option_ to eschew this kind of thing:
```
ZmqLogger::Instance()->AppendDebugMethod("Message", "start", start,
"length", length, "", -1, "", -1, "", -1, "", -1);
```
instead, they can use the functionally equivalent:
```
ZmqLogger::Instance()->AppendDebugMethod("Message", "start", start,
"length", length);
```
Passing meaningless args is the compiler's job, not the programmer's.
2019-07-03 14:06:44 -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
9d755c6d68 Revert "Check in code to handle missing clock_gettime() on most versions of M…" 2018-05-19 01:24:24 -05:00
Richard Alloway
eb6b48669b Merge branch 'master' into ZmgLogger_hires_timestamp 2018-05-18 13:43:15 -04:00
Rich Alloway
01f20286ed Check in code to handle missing clock_gettime() on most versions of Mac OS X 2018-04-23 11:11:18 -04:00
Jonathan Thomas
2a59184772 Revert "Prepend current time (hires) to messages logged via ZmqLogger" 2018-04-20 02:03:37 -05:00