NAudio is a C# library for audio processing. Hopefully, you are familiar with it or have heard of it before. The project I am working with are based on the demo projects here:
[login to view URL]
I will supply two projects to work with. One project plays an audio file and displays the frequency of the note playing (in a text block). The frequency detection function works and is accurate.
There is a problem with this - the audio ticks. The frequency class is called on a timer and so it seems the routine uses data from a buffer of the audio stream and removes this part of data from the stream. This is what causes the audio crackle on every timer tick. The solution to this should be to create two instances of "AudioFileReader" or "WaveFileReader" (NAudio classes) and use only one for the detection of the pitch. The second one should be passed straight through to "WaveOut" or "WasapiOut". I have done this. However, my resulting application introduces a massive 5-second delay between the audio out and the display of the frequency.
The second project I will supply is similar but uses the NAudio demo graphic equalizer. This project uses binding in the xaml code. I tried to add a text block and bind it to the frequency (running the frequency routine on a timer like before). This project has the same issues. There is a crackle in the audio on the timer tick. Also, the frequency does not appear in the text block.
This task is to fix these problems:
1. Improve the first project to read out the frequency without delay and without crackling the audio
2. Implement the frequency detection function within the second project
Please see screenshots for more information