This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Filtering function using 2 for loops instead of one with a modulo because it turned out to be way more efficient | |
// indexVal is the position of the current sample, it decreases each loop but staying in [0;currentSize] | |
void filter(){ | |
for(int w = indexVal ; w < currentSize ; w++){ | |
toReturn[0] += currentCoeffs[w-indexVal] * bufferL[w]; | |
toReturn[1] += currentCoeffs[w-indexVal] * bufferR[w]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
I don't really know why but this didn't work for me, the program always got stuck in the while loop of the I2SFifoRead function. | |
Even with sound coming, with waiting that we have at least 99 values in the FIFO, with using variables instead of | |
directly putting the reading of one FIFO in the writing of another | |
I don't know why it's not working but I'm submitting my code nevertheless, maybe something was wrong with my installation / compilation chain | |
*/ | |
void I2SFifoWrite (u32 i2sBaseAddr, u32 audioData) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is an animated solution to the part 1 of Day 5 of the 2022 Advent Of Code challenge. | |
The problem can be found here: https://adventofcode.com/2022/day/5 | |
The input file for this program is the file named "input.txt" in the same folder as this file. | |
First time trying to draw something in the terminal, so it's a bit messy, but it works. | |
I'm trying to get better at Python, so please feel free to suggest anything that I could have done better (or a question). |