Commit Graph

92 Commits

Author SHA1 Message Date
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
Rosen Penev 015cbff93d [cppcheck] convert several functions to use std::all_of
std::all_of becomes constexpr in C++20. I'm not sure it results in better
performance.

Found with useStlAlgorithm

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-08 14:01:12 -07: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
Max Kellermann 9cbfa66886 command/partition: don't create null output in new partitions
No output at all is fine.  If the partition needs an output, it must
be moved there, but having just a null output isn't helpful.
2020-01-20 14:55:10 +01:00
Max Kellermann 4df98466df output/multiple: add "client" field, replacing the "client" parameter
By eliminating GetAnyClient(), we can have instances with no outputs
at all.
2020-01-20 14:51:08 +01:00
Max Kellermann c16233fa74 add "moveoutput" command 2020-01-18 22:21:27 +01:00
Max Kellermann 2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann 2f3e94f8d0 output/MultipleOutputs: add method IsOpen() 2019-09-26 14:52:19 +02:00
Max Kellermann f616bfe354 output/MultipleOutputs: add method HasName() 2019-09-26 14:48:31 +02:00
Max Kellermann f2c3d86612 output: use StringIsEqual() 2019-09-26 14:48:31 +02: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 4473816384 output/Control: add LockEnableDisableAsync() 2019-04-26 18:28:09 +02:00
Max Kellermann 2c8d004f78 output/Control: add LockWaitForCommand() 2019-04-26 18:25:36 +02:00
Max Kellermann 684bd9153e output/MultipleOutputs: simplify locking in CheckPipe()
Instead of keeping all open outputs locked, let ClearTailChunk() stall
playback until MultipleOutputs::CheckPipe() has updated the MusicPipe.
2019-04-26 18:13:14 +02:00
Max Kellermann ec456fc57c output/MultipleOutputs: make variable more local 2019-04-26 18:13:02 +02:00
Max Kellermann 376f4a2b16 output/MultipleOutputs: wrap AudioOutputControl in std::unique_ptr<> 2019-04-26 14:28:59 +02:00
Max Kellermann b42f19f514 output/Control: implicitly call BeginDestroy() in destructor 2019-04-26 14:28:30 +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 f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 1a9659ef45 output/Init: pass global configuration in struct AudioOutputDefaults 2018-08-19 07:52:23 +02:00
Max Kellermann 4531e4cc55 filter/LoadChain: move code to class FilterFactory
Eliminate a use of GetGlobalConfig().
2018-08-18 20:57:02 +02:00
Max Kellermann 9ff2606bb8 config/Data: use std::forward_list to manage params and blocks 2018-07-18 11:03:19 +02:00
Max Kellermann 0c8ffa1ac3 output/MultipleOutputs: use struct ConfigData 2018-07-17 23:13:35 +02:00
Max Kellermann 5b192beaa5 config/Global: remove ConfigBlock::SetUsed() call, let caller do that
This fixes an old bug which caused the "unused" warnings to be
unreliable; only the first block in the list was marked as being
"used", no matter if it was really used, and the rest was never marked
as "used", suppressing all warnings for them.
2018-07-17 21:08:41 +02:00
Max Kellermann 816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann 09d4176210 output/multiple: use WaitAll() in EnableDisable() 2018-06-23 19:23:56 +02:00
Max Kellermann 30d41e45e2 output/multiple: remove unnecessary IsBusy() check from WaitAll()
AudioOutputControl::WaitForCommand() doesn't need this check.
2018-06-23 19:23:18 +02: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 efb8a9bd2c player, decoder, output: wrap MusicPipe in std::shared_ptr/std::unique_ptr 2018-06-23 18:45:57 +02:00
Max Kellermann 2be905b2e2 MusicPipe: eliminate the unused MusicBuffer reference
This requires re-adding the reference to struct DecoderControl, which
was removed recently by commit
9f14e7a98d
2018-06-23 18:36:24 +02:00
Max Kellermann 88f1233d7b MusicPipe, output/multiple: include cleanup 2018-06-23 17:44:32 +02:00
Max Kellermann 54d295c247 MusicChunkPtr: managed MusicChunk pointer
Make all uses of MusicChunk safe.
2018-06-22 23:11:52 +02:00
Max Kellermann e81b089612 MusicPipe: automatically clear in destructor
We can implement this now that we have a MusicBuffer reference.
2018-06-22 23:09:13 +02:00
Max Kellermann 9f14e7a98d MusicPipe: add MusicBuffer reference
This tiny amount of overhead allows omitting the MusicBuffer in
Clear().
2018-06-22 22:59:44 +02:00
Max Kellermann 7574dfd339 output/Control: move code from FinishDestroy() to destructor 2018-01-04 10:34:27 +01:00
Max Kellermann ef71df60f6 output/Multiple: use std::unique_ptr<FilteredAudioOutput> 2018-01-04 10:14:26 +01:00
Max Kellermann f52b3b4e04 output/Multiple: dispose the AudioOutputControl instances
Fixes shutdown memory leak.
2018-01-04 10:11:23 +01:00
Max Kellermann c40354bbcb player/Outputs: abstract interface wrapping class MultipleOutputs 2017-12-29 16:39:05 +01:00
Max Kellermann c04aafb4e3 output/Multiple: add "noexcept" 2017-12-29 16:29:49 +01:00
Max Kellermann 914df18bf9 Main, ...: catch any exception, not just std::runtime_error 2017-12-19 10:56:23 +01: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 ebecee3d85 output/Internal: move "client" to struct AudioOutputControl 2017-05-23 00:32:03 +02:00
Max Kellermann 194f733ca7 output/MultipleOutputs: use LoadOutputControl() in AddNullOutput() 2017-05-23 00:31:31 +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 e5847f1ddf output/MultipleOutputs: move code to LoadOutputControl() 2017-05-22 23:35:32 +02:00
Max Kellermann 4faef28cc5 Merge tag 'v0.20.7'
release v0.20.7
2017-05-15 23:01:49 +02:00
Max Kellermann 71f0ed8b74 *: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +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