diff --git a/lib_util/masa_file_writer.c b/lib_util/masa_file_writer.c index 6daa2d2092cc9e8a51b8aba077d90e353920e2e9..5667968ece8b39c4a1a8ecc783a9efcea63b2011 100644 --- a/lib_util/masa_file_writer.c +++ b/lib_util/masa_file_writer.c @@ -100,7 +100,6 @@ static void delayMasaMetadata( ) { int16_t dir, sf, band; - uint16_t temp; uint8_t currentNumberOfDirections; /* Move meta to delay and output. Always use two directions as the metadata is prepared to contain zero energy second direction @@ -109,33 +108,35 @@ static void delayMasaMetadata( { for ( band = 0; band < MASA_FREQUENCY_BANDS; band++ ) { + uint16_t temp_u16; + uint8_t temp_u8; for ( dir = 0; dir < MASA_MAXIMUM_DIRECTIONS; dir++ ) { - temp = delayStorage->directionIndex[dir][sf][band]; + temp_u16 = delayStorage->directionIndex[dir][sf][band]; delayStorage->directionIndex[dir][sf][band] = extOutMeta->directionIndex[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band]; extOutMeta->directionIndex[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->directionIndex[dir][sf][band]; - extOutMeta->directionIndex[dir][sf][band] = temp; + extOutMeta->directionIndex[dir][sf][band] = temp_u16; - temp = delayStorage->directToTotalRatio[dir][sf][band]; + temp_u8 = delayStorage->directToTotalRatio[dir][sf][band]; delayStorage->directToTotalRatio[dir][sf][band] = extOutMeta->directToTotalRatio[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band]; extOutMeta->directToTotalRatio[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->directToTotalRatio[dir][sf][band]; - extOutMeta->directToTotalRatio[dir][sf][band] = temp; + extOutMeta->directToTotalRatio[dir][sf][band] = temp_u8; - temp = delayStorage->spreadCoherence[dir][sf][band]; + temp_u8 = delayStorage->spreadCoherence[dir][sf][band]; delayStorage->spreadCoherence[dir][sf][band] = extOutMeta->spreadCoherence[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band]; extOutMeta->spreadCoherence[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->spreadCoherence[dir][sf][band]; - extOutMeta->spreadCoherence[dir][sf][band] = temp; + extOutMeta->spreadCoherence[dir][sf][band] = temp_u8; } - temp = delayStorage->surroundCoherence[sf][band]; + temp_u8 = delayStorage->surroundCoherence[sf][band]; delayStorage->surroundCoherence[sf][band] = extOutMeta->surroundCoherence[sf + DELAY_MASA_PARAM_DEC_SFR][band]; extOutMeta->surroundCoherence[sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->surroundCoherence[sf][band]; - extOutMeta->surroundCoherence[sf][band] = temp; + extOutMeta->surroundCoherence[sf][band] = temp_u8; - temp = delayStorage->diffuseToTotalRatio[sf][band]; + temp_u8 = delayStorage->diffuseToTotalRatio[sf][band]; delayStorage->diffuseToTotalRatio[sf][band] = extOutMeta->diffuseToTotalRatio[sf + DELAY_MASA_PARAM_DEC_SFR][band]; extOutMeta->diffuseToTotalRatio[sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->diffuseToTotalRatio[sf][band]; - extOutMeta->diffuseToTotalRatio[sf][band] = temp; + extOutMeta->diffuseToTotalRatio[sf][band] = temp_u8; } }