- [FIX] Corregits un cabàs de warnings
This commit is contained in:
@@ -14,11 +14,11 @@ static char* song_ptr = NULL;
|
||||
static char* song = NULL;
|
||||
|
||||
uint32_t interpret_note(uint8_t* buffer, const char note, const char param ) {
|
||||
const uint32_t length = ( param == -1 ? default_length : ((float)lengths[param])/10000.0f ) * tempo;
|
||||
const uint32_t length = ( param == -1 ? default_length : ((float)lengths[uint8_t(param)])/10000.0f ) * tempo;
|
||||
if( note == 100 ) { memset( buffer, 0, length ); return length; }
|
||||
const uint16_t period = periods[note + octave*12];
|
||||
|
||||
for( int i = 0; i < length; i++ ) buffer[i] = ( (i % period) < (period >> 1) ? volume : -volume );
|
||||
for( unsigned int i = 0; i < length; i++ ) buffer[i] = ( (i % period) < (period >> 1) ? volume : -volume );
|
||||
return length;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user