output/Internal: merge REOPEN and OPEN
This commit is contained in:
		@@ -48,13 +48,12 @@ struct AudioOutput {
 | 
				
			|||||||
		NONE,
 | 
							NONE,
 | 
				
			||||||
		ENABLE,
 | 
							ENABLE,
 | 
				
			||||||
		DISABLE,
 | 
							DISABLE,
 | 
				
			||||||
		OPEN,
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/**
 | 
							/**
 | 
				
			||||||
		 * This command is invoked when the input audio format
 | 
							 * Open the output, or reopen it if it is already
 | 
				
			||||||
		 * changes.
 | 
							 * open, adjusting for input #AudioFormat changes.
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
		REOPEN,
 | 
							OPEN,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		CLOSE,
 | 
							CLOSE,
 | 
				
			||||||
		PAUSE,
 | 
							PAUSE,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -138,9 +138,7 @@ AudioOutput::Open(const AudioFormat audio_format, const MusicPipe &mp)
 | 
				
			|||||||
	if (!thread.IsDefined())
 | 
						if (!thread.IsDefined())
 | 
				
			||||||
		StartThread();
 | 
							StartThread();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	CommandWait(open
 | 
						CommandWait(Command::OPEN);
 | 
				
			||||||
		    ? Command::REOPEN
 | 
					 | 
				
			||||||
		    : Command::OPEN);
 | 
					 | 
				
			||||||
	const bool open2 = open;
 | 
						const bool open2 = open;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (open2 && mixer != nullptr) {
 | 
						if (open2 && mixer != nullptr) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -590,12 +590,10 @@ AudioOutput::Task()
 | 
				
			|||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		case Command::OPEN:
 | 
							case Command::OPEN:
 | 
				
			||||||
			Open();
 | 
								if (open)
 | 
				
			||||||
			CommandFinished();
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		case Command::REOPEN:
 | 
					 | 
				
			||||||
				Reopen();
 | 
									Reopen();
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									Open();
 | 
				
			||||||
			CommandFinished();
 | 
								CommandFinished();
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user