OutputThread: move code to CloseOutput()
This commit is contained in:
		@@ -382,6 +382,13 @@ private:
 | 
				
			|||||||
	void Close(bool drain);
 | 
						void Close(bool drain);
 | 
				
			||||||
	void Reopen();
 | 
						void Reopen();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/**
 | 
				
			||||||
 | 
						 * Close the output plugin.
 | 
				
			||||||
 | 
						 *
 | 
				
			||||||
 | 
						 * Mutex must not be locked.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						void CloseOutput(bool drain);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	AudioFormat OpenFilter(AudioFormat &format, Error &error_r);
 | 
						AudioFormat OpenFilter(AudioFormat &format, Error &error_r);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -251,12 +251,7 @@ AudioOutput::Close(bool drain)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	mutex.unlock();
 | 
						mutex.unlock();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (drain)
 | 
						CloseOutput(drain);
 | 
				
			||||||
		ao_plugin_drain(this);
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		ao_plugin_cancel(this);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ao_plugin_close(this);
 | 
					 | 
				
			||||||
	CloseFilter();
 | 
						CloseFilter();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mutex.lock();
 | 
						mutex.lock();
 | 
				
			||||||
@@ -265,6 +260,17 @@ AudioOutput::Close(bool drain)
 | 
				
			|||||||
		    plugin.name, name);
 | 
							    plugin.name, name);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					inline void
 | 
				
			||||||
 | 
					AudioOutput::CloseOutput(bool drain)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (drain)
 | 
				
			||||||
 | 
							ao_plugin_drain(this);
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							ao_plugin_cancel(this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ao_plugin_close(this);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
AudioOutput::ReopenFilter()
 | 
					AudioOutput::ReopenFilter()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user