yet more unsigned integers
calculateCrossFadeChunks() still returns int, although the caller uses it as an unsigned value. Since the function body checks for negative values, it is safe to cast to unsigned. crossFade() takes signed parameters, although it callers pass unsigned integers. Change declaration to unsigned. git-svn-id: https://svn.musicpd.org/mpd/trunk@7291 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
		 Max Kellermann
					Max Kellermann
				
			
				
					committed by
					
						 Eric Wong
						Eric Wong
					
				
			
			
				
	
			
			
			 Eric Wong
						Eric Wong
					
				
			
						parent
						
							f7e97c9a89
						
					
				
				
					commit
					2bd2957a7a
				
			| @@ -76,7 +76,7 @@ static void quitDecode(PlayerControl * pc, DecoderControl * dc) | |||||||
| 	wakeup_main_task(); | 	wakeup_main_task(); | ||||||
| } | } | ||||||
|  |  | ||||||
| static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af, | static unsigned calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af, | ||||||
| 					 float totalTime) | 					 float totalTime) | ||||||
| { | { | ||||||
| 	long chunks; | 	long chunks; | ||||||
| @@ -95,7 +95,7 @@ static int calculateCrossFadeChunks(PlayerControl * pc, AudioFormat * af, | |||||||
| 	if (chunks < 0) | 	if (chunks < 0) | ||||||
| 		chunks = 0; | 		chunks = 0; | ||||||
|  |  | ||||||
| 	return (int)chunks; | 	return (unsigned)chunks; | ||||||
| } | } | ||||||
|  |  | ||||||
| static int waitOnDecode(PlayerControl * pc, DecoderControl * dc, | static int waitOnDecode(PlayerControl * pc, DecoderControl * dc, | ||||||
| @@ -365,7 +365,7 @@ static void advanceOutputBufferTo(OutputBuffer * cb, int to) | |||||||
|  |  | ||||||
| static void crossFade(OutputBufferChunk * a, OutputBufferChunk * b, | static void crossFade(OutputBufferChunk * a, OutputBufferChunk * b, | ||||||
| 		      AudioFormat * format, | 		      AudioFormat * format, | ||||||
| 		      int fadePosition, int crossFadeChunks) | 		      unsigned int fadePosition, unsigned int crossFadeChunks) | ||||||
| { | { | ||||||
| 	pcm_mix(a->data, | 	pcm_mix(a->data, | ||||||
| 		b->data, | 		b->data, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user