mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Merge pull request #3151 from MerryMage/looping-bug
Audio/HLE/Source: Fix looped state not updating
This commit is contained in:
		
						commit
						16dcec05d1
					
				
					 1 changed files with 5 additions and 6 deletions
				
			
		|  | @ -277,11 +277,7 @@ bool Source::DequeueBuffer() { | ||||||
|         return false; |         return false; | ||||||
| 
 | 
 | ||||||
|     Buffer buf = state.input_queue.top(); |     Buffer buf = state.input_queue.top(); | ||||||
| 
 |  | ||||||
|     // if we're in a loop, the current sound keeps playing afterwards, so leave the queue alone
 |  | ||||||
|     if (!buf.is_looping) { |  | ||||||
|     state.input_queue.pop(); |     state.input_queue.pop(); | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     if (buf.adpcm_dirty) { |     if (buf.adpcm_dirty) { | ||||||
|         state.adpcm_state.yn1 = buf.adpcm_yn[0]; |         state.adpcm_state.yn1 = buf.adpcm_yn[0]; | ||||||
|  | @ -321,7 +317,10 @@ bool Source::DequeueBuffer() { | ||||||
|     state.current_buffer_id = buf.buffer_id; |     state.current_buffer_id = buf.buffer_id; | ||||||
|     state.buffer_update = buf.from_queue && !buf.has_played; |     state.buffer_update = buf.from_queue && !buf.has_played; | ||||||
| 
 | 
 | ||||||
|  |     if (buf.is_looping) { | ||||||
|         buf.has_played = true; |         buf.has_played = true; | ||||||
|  |         state.input_queue.push(buf); | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     LOG_TRACE(Audio_DSP, "source_id=%zu buffer_id=%hu from_queue=%s current_buffer.size()=%zu", |     LOG_TRACE(Audio_DSP, "source_id=%zu buffer_id=%hu from_queue=%s current_buffer.size()=%zu", | ||||||
|               source_id, buf.buffer_id, buf.from_queue ? "true" : "false", |               source_id, buf.buffer_id, buf.from_queue ? "true" : "false", | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue