Commit Graph

51 Commits

Author SHA1 Message Date
Max Kellermann 394f69bee1 output/Control: allow copy elision (fix -Wpessimizing-move) 2020-11-15 19:55:11 +01:00
Stapper ba5531f9dd Fixes #994 - moveoutput: new AudioOutputControl created from copyMoving an output to a partition is now done via MultipleOutputs::AddCopy(),using a new AudioOutputControl constructor. Tags and always_on settings willpersist when moving outputs between partitions. 2020-11-15 19:47:53 +01:00
Max Kellermann 4cb5e69811 output/Interface: add virtual method Interrupt()
This allows interrupting the output thread (for some plugins which
implement this method).  This way, operations can be canceled
properly, instead of waiting for some external entity.
2020-10-02 10:20:39 +02:00
Rosen Penev ab9f5d2067 replace assert.h with cassert
The former was deprecated with C++14.

According to the C++11 and C++17 standards, both files are identical.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:25:38 -07:00
Rosen Penev 1923cf3844 remove redundant const qualification
Found with readability-const-return-type

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-04 15:16:28 -08:00
Max Kellermann 1e07d15428 output/Control: add missing nullptr check to LockRelease() 2020-01-20 17:34:38 +01:00
Max Kellermann c16233fa74 add "moveoutput" command 2020-01-18 22:21:27 +01:00
Max Kellermann 7732db0aee output/Control: move code to method StopThread() 2020-01-18 21:46:18 +01:00
Max Kellermann 37f984ba74 output/Control: avoid sending KILL twice 2020-01-18 21:43:17 +01:00
Max Kellermann 2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann d663f81420 include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
Max Kellermann a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann 973c87b351 event/Call, ...: use wait() with predicate 2019-05-07 20:01:45 +02:00
Max Kellermann 23d56cb6a1 output/Control: pass std::unique_lock<> to Cond::wait() 2019-04-26 18:28:44 +02:00
Max Kellermann b42f19f514 output/Control: implicitly call BeginDestroy() in destructor 2019-04-26 14:28:30 +02:00
Max Kellermann b51bae5500 thread/*Cond: rename methods to match std::condition_variable 2019-04-25 19:46:43 +02:00
Max Kellermann ce49d99c2f check.h: remove obsolete header
Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann e097fef79e output/control: add command RELEASE
With the new command, the decision to pause or close the output moves
into the output thread.
2018-11-12 12:09:37 +01:00
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 1624a5eb8d output/Control: add another Cond attribute, replacing audio_output_client_notify 2018-06-23 19:11:48 +02:00
Max Kellermann 1bca29f9e2 output/Control: rename "cond" to "wake_cond"
Prepare for adding another Cond attribute.
2018-06-23 19:10:23 +02:00
Max Kellermann e3ef3e8d71 output/Control: unlock mutex during expensive operations 2018-01-04 10:36:18 +01:00
Max Kellermann 7574dfd339 output/Control: move code from FinishDestroy() to destructor 2018-01-04 10:34:27 +01:00
Max Kellermann 0227af5bb7 output/Filtered: remove BeginDestroy()
All it does is "sometimes" close the mixer, but that is also done in
the destructor.
2018-01-04 10:29:27 +01:00
Max Kellermann ef71df60f6 output/Multiple: use std::unique_ptr<FilteredAudioOutput> 2018-01-04 10:14:26 +01:00
Max Kellermann 7e4e32cfe0 output/Filtered: eliminate FinishDestroy()
This is implicitly done by the destructor.
2018-01-04 10:05:31 +01:00
Max Kellermann 9f8649884b output/Control: dispose the FilteredAudioOutput
Fixes shutdown memory leak.
2018-01-04 10:01:34 +01:00
Max Kellermann 051b8fbb31 output/Thread: add "noexcept" 2018-01-04 09:54:35 +01:00
Max Kellermann b0ea32f660 output/Control: remove unused method StopThread() 2018-01-04 09:20:22 +01:00
Max Kellermann 8322ae5a4c output/Control: use class ScopeUnlock() 2018-01-04 08:41:19 +01:00
Max Kellermann 86a06a7acc output/Interface: add "attributes" map
These attributes are printed in the "outputs" response, and the new
command "outputset" allows setting new values.

No attributes are currently implemented.
2017-12-19 11:57:52 +01:00
Max Kellermann 39dc83bd82 output/Print: print the plugin name 2017-12-19 11:52:10 +01:00
Max Kellermann 914df18bf9 Main, ...: catch any exception, not just std::runtime_error 2017-12-19 10:56:23 +01:00
Max Kellermann 55e6629fb4 output/Control: catch and log StartThread() exceptions 2017-10-30 08:39:44 +01:00
Max Kellermann 06c7e55188 output/Filtered: add methods SupportsEnableDisable(), SupportsPause() 2017-08-08 15:54:49 +02:00
Max Kellermann 5431fca99b output/Filtered: add attribute "log_name" 2017-08-08 14:02:58 +02:00
Max Kellermann 47c9d6ac64 output/Internal: rename source to Filtered.cxx 2017-08-07 21:50:13 +02:00
Max Kellermann d0157af13e filter/Internal: rename struct AudioOutput to FilteredAudioOutput
Prepare to add an abstract class AudioOutput, to be implemented by
plugins, to get rid of the C-style vtable.
2017-08-07 18:47:39 +02:00
Max Kellermann 07d1b3780d output/Control: move two AudioOutput methods to Finish.cxx 2017-08-07 18:13:57 +02:00
Max Kellermann 27d68d8fdd output/Internal: move the Mutex to struct AudioOutputControl
struct AudioOutput should not know or care about multi-threading.
2017-08-07 17:44:46 +02:00
Max Kellermann 6e2b348758 output/Internal: move the "open" flag to struct AudioOutputControl 2017-06-15 22:52:46 +02:00
Max Kellermann 613dd67784 output/Internal: move the AudioOutputSource to struct AudioOutputControl 2017-06-08 22:13:47 +02:00
Max Kellermann 3010d182fc output/Internal: move "really_enabled" flag to class AudioOutputControl 2017-06-08 09:55:49 +02:00
Max Kellermann 1fa1790da5 output/Internal: move the "pause" flag to struct AudioOutputControl 2017-05-23 11:23:10 +02:00
Max Kellermann ebecee3d85 output/Internal: move "client" to struct AudioOutputControl 2017-05-23 00:32:03 +02:00
Max Kellermann 3907ddbcc4 output/{Internal,Control}: add "noexcept" 2017-05-23 00:17:23 +02:00
Max Kellermann 5eef146871 output/Internal: move several flags to struct AudioOutputControl 2017-05-22 23:40:20 +02:00
Max Kellermann 2e65686fc0 output/Control: add method Configure()
Prepare to move some configuration settings from AudioOutput to
AudioOutputControl.
2017-05-22 23:36:45 +02:00
Max Kellermann 89b900432e output/Internal: move thread-specific stuff to AudioOutputControl
The AudioOutput struct (which is exposed to all plugins) should not be
aware that it's being controlled by another thread.
2017-04-28 22:04:30 +02:00
Max Kellermann 8bb9d0960b output/Control: add struct AudioOutputControl
Will move attributes from struct AudioOutput that are specific to the
OutputThread.  The new struct AudioOutputControl is a holder for the
AudioOutput pointer.

This prepares for making the output list more dynamic, to allow moving
outputs to between partitions.
2017-04-28 22:04:24 +02:00