Commit Graph

65 Commits

Author SHA1 Message Date
Max Kellermann c76f4ac89b player/Thread: pause all outputs in single mode
This mostly affects the Pulse output plugin which needs to "cork" the
stream (closes #278).
2018-05-12 14:44:07 +02:00
Max Kellermann 44b200240f player/Thread: never reuse decoder when switching radio streams
When switching to another song manually, the player checks if the
decoder is already decoding that song; if so, it will attempt to reuse
it by seeking it to the new position.  That however fails if the
decoder is not seekable (e.g. a radio stream) which leaves the user
unable to switch to that song with the bogus error message "Not
seekable".
2018-04-25 21:19:26 +02:00
Max Kellermann 8649ea3d6f thread/Thread: use BoundMethod 2018-01-07 17:20:26 +01:00
Max Kellermann de90d401d2 MusicChunk: add magic value IGNORE_REPLAY_GAIN
This fixes spurious replay gain logs when the player inserts silence
chunks, because those silence chunks had no replay gain attached,
resetting the ReplayGainFilter state, flipping it forth and back.
2017-12-03 11:39:12 +01:00
Max Kellermann 396defaea9 MusicChunk: initialize replay_gain_serial on demand 2017-12-03 11:39:07 +01:00
Max Kellermann 18f350cd04 player/Thread: initialize MusicChunk::bit_rate in SendSilence()
This attribute is not particularly important, but it was
uninitialized.
2017-12-03 10:54:14 +01:00
Max Kellermann 28e864e096 player/Thread: log message when decoder is too slow 2017-10-25 20:26:09 +02:00
Max Kellermann a00d412008 player/Thread: initialize play_audio_format, fixes assertion
This fixes an assertion failure caused by resuming playback before the
decoder has finished startup.
2017-08-23 17:43:49 +02:00
Max Kellermann a057b4f6d8 *: add lost of "noexcept" specifications 2017-06-04 12:46:48 +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 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann 2e182e84c3 thread/Mutex: remove ScopeLock, use std::lock_guard directly 2017-01-03 07:11:57 +01:00
Max Kellermann ccb45b6f6e output/Client: new interface to replace direct access to class PlayerControl 2016-12-14 20:29:15 +01:00
Max Kellermann d2e47e014a player/Thread: reduce unlock/lock overhead in PlayerCommand::PAUSE handler 2016-12-14 20:24:52 +01:00
Max Kellermann a5b8d7917f player/Thread: mutex must be locked inside OpenOutput() 2016-12-14 20:23:23 +01:00
Max Kellermann d0e735ee4b player/Thread: mutex must be locked inside CheckDecoderStartup() 2016-12-14 20:13:18 +01:00
Max Kellermann ece5971027 output/Multiple: move Wait() to struct PlayerControl
Eliminate a dependency from MultipleOutputs on PlayerControl.
2016-12-14 19:37:01 +01:00
Max Kellermann 7c6b0d5c31 player/Thread: use class ScopeLock 2016-12-14 13:10:48 +01:00
Max Kellermann 03151310cf player/Control: add method LockApplyBorderPause() 2016-12-14 13:09:48 +01:00
Max Kellermann baa2bc0c38 player/Control: add method LockSetOutputError() 2016-12-14 13:01:17 +01:00
Max Kellermann 9fb7cc796b decoder/Control: add attribute configured_audio_format
Obsoletes the same variable from AudioConfig.cxx.
2016-12-03 14:12:08 +01:00
Max Kellermann cd4bb444ff player/Control: make ReplayGainConfig const 2016-12-03 13:47:13 +01:00
Max Kellermann 3d16f22135 player/Control: use C++11 initializers 2016-12-03 13:08:00 +01:00
Max Kellermann 6cc1ff5eeb decoder/Control: make ReplayGainConfig const 2016-12-03 13:05:25 +01:00
Max Kellermann ee57c3490a {decoder,player}/Control: add ReplayGain{Config,Mode} attributes
Don't use the global variables in class DecoderBridge; instead,
forward these values to the decoder thread via PlayerControl and
DecoderControl.
2016-11-25 12:51:55 +01:00
Max Kellermann 22dcca9832 util/Error: remove obsolete class 2016-11-10 12:58:26 +01:00
Max Kellermann d9cb85df83 output/Plugin: remove 'Error&' parameters, use C++ exceptions only 2016-11-09 12:36:21 +01:00
Max Kellermann 445e82be75 output/Multiple: migrate from class Error to C++ exceptions 2016-11-09 12:31:23 +01:00
Max Kellermann 4cd21f1e07 decoder/Control: throw exception on Seek() error 2016-11-07 09:05:28 +01:00
Max Kellermann 308010794a decoder/Control: convert error from Error to std::exception_ptr
Prepare full C++ exception support in the decoder thread.
2016-09-08 17:16:03 +02:00
Max Kellermann 0ce72cbf9d player/Control: convert error from Error to std::exception_ptr
Prepare full C++ exception support in the player thread.
2016-09-08 12:15:14 +02:00
Max Kellermann 6e52ab285a player/Control: use class Error as C++ exception, throw it 2016-09-08 12:07:22 +02:00
Max Kellermann 1897409476 player/Control: update API documentation 2016-09-08 12:07:22 +02:00
Max Kellermann b67e7df38e Merge tag 'v0.19.17'
release v0.19.17
2016-07-09 00:46:09 +02:00
Max Kellermann d3c7fac606 thread/Thread: throw std::system_error on error 2016-06-17 19:11:20 +02:00
Max Kellermann 8b903626c2 Merge tag 'v0.19.16'
release v0.19.16
2016-06-13 19:03:59 +02:00
Max Kellermann ac7ce73526 player/Thread: cancel audio when decoder startup on seek fails
Fixes assertion failure in MultipleOutputs::Open() after seeking to a
failing song during playback.
2016-04-21 14:03:27 +02:00
Max Kellermann fb547260d1 player/Control: Play*() returns Error information 2016-02-28 13:31:41 +01:00
Max Kellermann 1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann e5c6fe1bb2 player/control: unpause in Play()
Fix regression by commit 45f6129a

See http://bugs.musicpd.org/view.php?id=4477
2016-02-26 17:33:21 +01:00
Max Kellermann 45f6129ae7 player/Control: don't stop playback in Play()
Instead of stopping playback completely, only CANCEL the queued song
if necessary, and use the SEEK command to play the selected song.
SEEK will take care for current playback state.
2015-12-29 13:49:15 +01:00
Max Kellermann 0368282486 player/Control: add code comments 2015-11-13 16:02:07 +01:00
Max Kellermann 4404f20cf4 player/Control: Seek*() returns Error information 2015-11-11 19:56:09 +01:00
Max Kellermann faca8bc02a decoder/Control: Seek() returns Error information 2015-11-11 19:56:08 +01:00
Max Kellermann c6d1d360a3 player/Control: use class ScopeLock 2015-11-11 17:43:56 +01:00
Max Kellermann afc1236b06 player/Control: move code to ClearError() 2015-11-11 17:41:02 +01:00
Max Kellermann bedd5f00f8 player/Control: move code to SeekLocked() 2015-11-11 16:56:24 +01:00
Max Kellermann 36239895bd player/Control: add Lock prefix to locking method names 2015-11-11 16:50:57 +01:00
Max Kellermann 3b71e2abef player/Thread: call DecoderCommand::SEEK only on existing decoder
If the decoder was just started, it already seeks to the desired
position.
2015-11-05 00:41:54 +01:00
Max Kellermann 30cad0c5f1 player/Thread: move code to WaitDecoderStartup() 2015-11-05 00:39:30 +01:00