properer int16_t to float scaling in .xm sampling
This commit is contained in:
		@@ -303,7 +303,7 @@ static void audio_sample_and_mixin_channel(const struct audio_channel *channel,
 | 
			
		||||
 | 
			
		||||
            /* convert floats to int16_t */
 | 
			
		||||
            for (int p = 0; p < samples_per_channel * 2; ++p)
 | 
			
		||||
                ((int16_t *)buffer)[p] = (int16_t)(((float *)buffer)[p] * 32768.0f);
 | 
			
		||||
                ((int16_t *)buffer)[p] = (int16_t)(((float *)buffer)[p] * (float)INT16_MAX);
 | 
			
		||||
 | 
			
		||||
            /* panning and mixing */
 | 
			
		||||
            audio_mixin_streams(channel,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user