Skip to content

Commit

Permalink
[CLANG] format
Browse files Browse the repository at this point in the history
  • Loading branch information
nots1dd committed Sep 30, 2024
1 parent 6f3ef49 commit 729193b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
raven
build/
rAVenDync/
build.sh
19 changes: 12 additions & 7 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ void SwitchVisualizationModeBackward() { currentMode = (currentMode - 1) % NUM_M
void callback(void* bufferData, unsigned int frames)
{

float (*fs)[2] = bufferData;
float(*fs)[2] = bufferData;

for (size_t i = 0; i < frames; i++)
{
memmove(in, in + 1, (N - 1) * sizeof(in[0]));
in[N - 1] = (fs[i][0]+fs[i][1])/2;
in[N - 1] = (fs[i][0] + fs[i][1]) / 2;
}

fft(in, 1, out, N);
Expand Down Expand Up @@ -651,12 +651,14 @@ int main(int argc, char* argv[])
break;
}

if (IsFileDropped()) {
if (IsFileDropped())
{
PauseMusicStream(music);
FilePathList droppedFiles = LoadDroppedFiles();
printf("File dropped\n");
if (droppedFiles.count > 0) {
const char *file_path = droppedFiles.paths[0];
if (droppedFiles.count > 0)
{
const char* file_path = droppedFiles.paths[0];
printf("%s", droppedFiles.paths[0]);
StopMusicStream(music);
UnloadMusicStream(music);
Expand All @@ -680,14 +682,17 @@ int main(int argc, char* argv[])
{
PauseMusicStream(music);
OpenFileDialog();
if (is_song_file(selected_song)) {
if (is_song_file(selected_song))
{
UnloadMusicStream(music);
music = LoadMusicStream(selected_song);
PlayMusicStream(music);
SetMusicVolume(music, currentVolume);
extract_metadata(selected_song, &metadata);
AttachAudioStreamProcessor(music.stream, callback);
} else {
}
else
{
printf("NOT A VALID SONG FILE\n");
ResumeMusicStream(music);
}
Expand Down

0 comments on commit 729193b

Please sign in to comment.