Max Kellermann 
							
						 
					 
					
						
						
							
						
						3fa6dc71e2 
					 
					
						
						
							
							output/Source: add assertion  
						
						
						
						
					 
					
						2016-12-26 20:10:00 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						6fec269844 
					 
					
						
						
							
							output/SharedPipeConsumer: add thread-safety documentation  
						
						
						
						
					 
					
						2016-12-26 20:09:10 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						b6004b6837 
					 
					
						
						
							
							output/Source: release the mutex while the filter runs  
						
						... 
						
						
						
						The filter can take some time to finish, even more so on a weak
machine with a saturated CPU.  By not holding the mutex during that
time, we can reduce PlayerThread latency a lot, because that thread
needs to synchronize a lot with all outputs. 
						
						
					 
					
						2016-12-26 20:02:15 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						86d3b25aec 
					 
					
						
						
							
							output/Source: add Fill(), ReadTag(), PeekData(), ConsumeData()  
						
						... 
						
						
						
						Don't expose MusicChunk instances, provide higher-level access to
chunk contents. 
						
						
					 
					
						2016-12-26 13:53:22 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						8a407bfbb0 
					 
					
						
						
							
							output/Thread: move code to new class AudioOutputSource  
						
						
						
						
					 
					
						2016-12-26 13:35:19 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						d30a590d9e 
					 
					
						
						
							
							configure.ac: use MPD_AUTO for libsndio and Haiku  
						
						
						
						
					 
					
						2016-12-26 13:35:19 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						f95e404be1 
					 
					
						
						
							
							outputThread: optimize Command::OPEN  
						
						... 
						
						
						
						Try harder to skip steps (reopen filter, reopen output) if the
AudioOutput is already open. 
						
						
					 
					
						2016-12-24 14:05:11 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						ffb8b4fc68 
					 
					
						
						
							
							output/Internal: add method ClearTailChunk()  
						
						
						
						
					 
					
						2016-12-22 14:46:59 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						f86d6b0162 
					 
					
						
						
							
							output/Control: move pipe initialization to the OutputThread  
						
						... 
						
						
						
						Un-protect the SharedPipeConsumer instance, and make it available in
the OutputThread only.  This gives more well-defined mutex protection. 
						
						
					 
					
						2016-12-22 14:04:38 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						71c72ed072 
					 
					
						
						
							
							output/Control: use Command::OPEN to unpause, remove special case  
						
						
						
						
					 
					
						2016-12-22 14:04:38 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						a8d343e07b 
					 
					
						
						
							
							output/Thread: update in_audio_format before ReopenFilter()  
						
						
						
						
					 
					
						2016-12-22 14:04:34 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						d020172181 
					 
					
						
						
							
							output/Thread: keep the device open if the audio format hasn't changed  
						
						... 
						
						
						
						Add another condition to Reopen() which allows keeping it open. 
						
						
					 
					
						2016-12-21 17:45:01 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						e5c9f6c1fe 
					 
					
						
						
							
							output/Internal: add attribute request.audio_format  
						
						... 
						
						
						
						Make in_audio_format accessible only from within the OutputThread, and
add a new one for inter-thread communication. 
						
						
					 
					
						2016-12-21 17:00:29 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						176dc11748 
					 
					
						
						
							
							output/Thread: ao_filter_chunk() throws exception on error  
						
						... 
						
						
						
						Move the error logging to AudioOutput::PlayChunk(). 
						
						
					 
					
						2016-12-20 17:40:11 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						c2abd02b9b 
					 
					
						
						
							
							output/Thread: use ConstBuffer::skip_front()  
						
						
						
						
					 
					
						2016-12-20 17:38:08 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						12ecfdd423 
					 
					
						
						
							
							output/Thread: convert pointer to reference  
						
						
						
						
					 
					
						2016-12-20 17:35:38 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						67cfbfc2f3 
					 
					
						
						
							
							output/SharedPipeConsumer: update API documentation  
						
						
						
						
					 
					
						2016-12-20 16:35:14 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						fc83d38e67 
					 
					
						
						
							
							input/curl: wrap CURLM* in new class CurlMulti  
						
						
						
						
					 
					
						2016-12-19 16:41:12 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						7063c423eb 
					 
					
						
						
							
							input/curl: rename class CurlMulti to CurlGlobal  
						
						
						
						
					 
					
						2016-12-19 16:37:01 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						36b93993cf 
					 
					
						
						
							
							input/curl: wrap CURL* in new class CurlEasy  
						
						
						
						
					 
					
						2016-12-19 14:42:04 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						ceffc5aa72 
					 
					
						
						
							
							input/curl: remove duplicate InitEasy() call  
						
						
						
						
					 
					
						2016-12-19 14:38:50 +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 
							
						 
					 
					
						
						
							
						
						7e1b53480e 
					 
					
						
						
							
							output/MultipleOutputs: parallelize EnableDisable()  
						
						
						
						
					 
					
						2016-12-14 08:41:42 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						6425b4f9f5 
					 
					
						
						
							
							output/MultipleOutputs: parallelize AudioOutput destruction  
						
						... 
						
						
						
						Reduce latency by stopping all AudioOutputs asynchronously. 
						
						
					 
					
						2016-12-14 08:35:07 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						fb907f5f76 
					 
					
						
						
							
							output/Thread: KILL implicitly closes and disables the AudioOutput  
						
						... 
						
						
						
						Reduce shutdown latency by two commands per output. 
						
						
					 
					
						2016-12-14 08:29:09 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						b107a1583f 
					 
					
						
						
							
							output/MultipleOutputs: move code to AudioOutput::EnableDisableWait()  
						
						
						
						
					 
					
						2016-12-14 08:00:43 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						ced3f320eb 
					 
					
						
						
							
							output/MultipleOutputs: reduce lock/unlock calls in EnableDisable()  
						
						... 
						
						
						
						Use ScopeLock to manage the lock; don't unlock after obtaining the
"really_enabled" flag; keep the same lock during EnableWait() /
DisableWait(). 
						
						
					 
					
						2016-12-14 07:54:05 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						a9d7293818 
					 
					
						
						
							
							output/Thread: wake up the player thread periodically while playing  
						
						... 
						
						
						
						Without this, the pipe would run empty very often, which may result in
an xrun if the roundtrip to the PlayerThread and back takes too long.
By waking up the PlayerThread before the pipe runs empty, we make MPD
much more latency tolerant, which is a major optimization. 
						
						
					 
					
						2016-12-13 22:39:49 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						265ad4b96a 
					 
					
						
						
							
							output/Thread: eliminate redundant nullptr check  
						
						
						
						
					 
					
						2016-12-13 22:20:41 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						92eeb4969f 
					 
					
						
						
							
							output/Thread: don't wake up the player after receiving command in Play()  
						
						... 
						
						
						
						If we have a pending command, then the player thread is already awake.
Even if not, we'll wake it up as soon as we have finished the command. 
						
						
					 
					
						2016-12-13 22:17:06 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						6fcddaf8fa 
					 
					
						
						
							
							output/Thread: use AtScopeExit() to revert the in_playback_loop flag  
						
						
						
						
					 
					
						2016-12-13 22:15:52 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						41fd583fbc 
					 
					
						
						
							
							output/Thread: eliminate one ScopeLock  
						
						
						
						
					 
					
						2016-12-13 21:57:03 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						ceba6816de 
					 
					
						
						
							
							output/Thread: split Open()  
						
						... 
						
						
						
						Simplify the code, eliminate duplicate rollback code and eliminate the
"goto" kludge. 
						
						
					 
					
						2016-12-13 21:46:27 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						093cb475bb 
					 
					
						
						
							
							output/Thread: simplify the retry_audio_format declaration  
						
						
						
						
					 
					
						2016-12-13 21:34:43 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						d44790b35f 
					 
					
						
						
							
							output/Thread: reduce locking further in Open()  
						
						
						
						
					 
					
						2016-12-13 21:26:28 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						f8164a3dd1 
					 
					
						
						
							
							output/Thread: unlock mutex during OpenFilter()  
						
						
						
						
					 
					
						2016-12-13 21:24:14 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						c20126598f 
					 
					
						
						
							
							output/Thread: remove unused variable  
						
						
						
						
					 
					
						2016-12-13 21:24:05 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						6c818bb37a 
					 
					
						
						
							
							AudioFormat: add method WithMask(), shortcut for ApplyMask()  
						
						
						
						
					 
					
						2016-12-13 20:57:46 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						df91f3738a 
					 
					
						
						
							
							output/Thread: remove a useless out_audio_format setting  
						
						... 
						
						
						
						Now that I can see the Reopen() method clearly, it is obvious that the
out_audio_format setting will get overwritten by the following Open()
call. 
						
						
					 
					
						2016-12-13 20:43:29 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						b5b268f606 
					 
					
						
						
							
							output/Thread: remove another redundant "open" check  
						
						
						
						
					 
					
						2016-12-13 20:41:54 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						ce6b8c94a2 
					 
					
						
						
							
							output/Thread: convert redundant runtime check to assertion  
						
						
						
						
					 
					
						2016-12-13 20:29:16 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						6e643fe58b 
					 
					
						
						
							
							output/Thread: don't deinitialize the pipe in Close()  
						
						
						
						
					 
					
						2016-12-13 20:28:19 +01:00 
						 
				 
			
				
					
						
							
							
								Max Kellermann 
							
						 
					 
					
						
						
							
						
						2bf91a0487 
					 
					
						
						
							
							output/Internal: merge REOPEN and OPEN  
						
						
						
						
					 
					
						2016-12-13 20:07:00 +01:00