Audio: Prevent div-by-zero
This commit is contained in:
		
							parent
							
								
									8161b00804
								
							
						
					
					
						commit
						5f290c5b11
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -1071,7 +1071,8 @@ private:
 | 
				
			||||||
					ALint size = AL::Buffer::getSize(buf);
 | 
										ALint size = AL::Buffer::getSize(buf);
 | 
				
			||||||
					ALint chan = AL::Buffer::getChannels(buf);
 | 
										ALint chan = AL::Buffer::getChannels(buf);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					procFrames += ((size / (bits / 8)) / chan);
 | 
										if (bits != 0 && chan != 0)
 | 
				
			||||||
 | 
											procFrames += ((size / (bits / 8)) / chan);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if (sourceExhausted)
 | 
									if (sourceExhausted)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue