Hello strat, thanks for answering.
do not worry it's my fault because I did not have explained.
I have seen programs that reproduce frequencies and have the option of reproducing the same frequency with different waveform, triangle, square etc.
I need to do something like that, reproduce the same frequency in different waveform.
As @techknight's said you need function generator library but I searched and didn't found such library. I found a sample code written by Erel in order to produce sine wave by using Audiostreamer object.
Hello strat, thanks for answering.
do not worry it's my fault because I did not have explained.
I have seen programs that reproduce frequencies and have the option of reproducing the same frequency with different waveform, triangle, square etc.
I need to do something like that, reproduce the same frequency in different waveform.
You almost sound like you are trying to create a Synthesizer (https://en.wikipedia.org/wiki/Synthesizer). Unless you have the requirements of a Synthesizer, you will most likely be better off using samples, or simply having the "samples" as files with the wave functions pre-generated within, and you simply read them and play them back at different speeds. Actually, the streamer already appears to have this functionality built in., so you would simply load the samples from a file (ie replace the sin calcs with a file load in the example)