@@ -170,12 +170,12 @@ void SwitchVisualizationModeBackward() { currentMode = (currentMode - 1) % NUM_M
170
170
void callback (void * bufferData , unsigned int frames )
171
171
{
172
172
173
- float (* fs )[2 ] = bufferData ;
173
+ float (* fs )[2 ] = bufferData ;
174
174
175
175
for (size_t i = 0 ; i < frames ; i ++ )
176
176
{
177
177
memmove (in , in + 1 , (N - 1 ) * sizeof (in [0 ]));
178
- in [N - 1 ] = (fs [i ][0 ]+ fs [i ][1 ])/ 2 ;
178
+ in [N - 1 ] = (fs [i ][0 ] + fs [i ][1 ]) / 2 ;
179
179
}
180
180
181
181
fft (in , 1 , out , N );
@@ -651,12 +651,14 @@ int main(int argc, char* argv[])
651
651
break ;
652
652
}
653
653
654
- if (IsFileDropped ()) {
654
+ if (IsFileDropped ())
655
+ {
655
656
PauseMusicStream (music );
656
657
FilePathList droppedFiles = LoadDroppedFiles ();
657
658
printf ("File dropped\n" );
658
- if (droppedFiles .count > 0 ) {
659
- const char * file_path = droppedFiles .paths [0 ];
659
+ if (droppedFiles .count > 0 )
660
+ {
661
+ const char * file_path = droppedFiles .paths [0 ];
660
662
printf ("%s" , droppedFiles .paths [0 ]);
661
663
StopMusicStream (music );
662
664
UnloadMusicStream (music );
@@ -680,14 +682,17 @@ int main(int argc, char* argv[])
680
682
{
681
683
PauseMusicStream (music );
682
684
OpenFileDialog ();
683
- if (is_song_file (selected_song )) {
685
+ if (is_song_file (selected_song ))
686
+ {
684
687
UnloadMusicStream (music );
685
688
music = LoadMusicStream (selected_song );
686
689
PlayMusicStream (music );
687
690
SetMusicVolume (music , currentVolume );
688
691
extract_metadata (selected_song , & metadata );
689
692
AttachAudioStreamProcessor (music .stream , callback );
690
- } else {
693
+ }
694
+ else
695
+ {
691
696
printf ("NOT A VALID SONG FILE\n" );
692
697
ResumeMusicStream (music );
693
698
}
0 commit comments