shithub: sf2mid

Download patch

ref: 1d506023c7b62d91572df862f7b116dc15661842
parent: 1961b134aff2e1226c070d2b006b889b7e80dc5d
author: Bernhard Schelling <[email protected]>
date: Wed Sep 13 21:47:43 EDT 2023

Suppress conversion warnings (#52) (#72)

--- a/tsf.h
+++ b/tsf.h
@@ -984,7 +984,7 @@
 	#else
 	// Inline convert the samples from short to float
 	float *res, *out; const short *in;
-	*pSmplCount = chunkSmpl->size / sizeof(short);
+	*pSmplCount = chunkSmpl->size / (unsigned int)sizeof(short);
 	*pFloatBuffer = (float*)TSF_MALLOC(*pSmplCount * sizeof(float));
 	if (!*pFloatBuffer || !stream->read(stream->data, *pFloatBuffer, chunkSmpl->size)) return 0;
 	for (res = *pFloatBuffer, out = res + *pSmplCount, in = (short*)res + *pSmplCount; out != res;)