Audio: Don't try to fill and queue null buffer
Fixes skipping audio after interrupting and resuming the program via eg. a debugger.
This commit is contained in:
		
							parent
							
								
									3daf805350
								
							
						
					
					
						commit
						a8bff666eb
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -1057,6 +1057,10 @@ private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				AL::Buffer::ID buf = AL::Source::unqueueBuffer(alSrc);
 | 
									AL::Buffer::ID buf = AL::Source::unqueueBuffer(alSrc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									/* If something went wrong, try again later */
 | 
				
			||||||
 | 
									if (buf == AL::Buffer::ID(0))
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if (buf == lastBuf)
 | 
									if (buf == lastBuf)
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					/* Reset the processed sample count so
 | 
										/* Reset the processed sample count so
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue