I was trying to write a program that waits for 10 seconds for voice input from the mic ,and then echoes it back.
The problem is that when playing back the recorded data , it is played so slowly that it is impossible to recognize...
I know that the recording part is OK , because when trying to playback without any buffering scheme using some code I found on the net the playback worked just fine , so probably it's me doing something wrong.
I attached three files :
sound.h which includes mostly structs for the SoundOut.c file.
SoundOut.c which deals with the play back.
main.c includes most of the recording code and uses SoundOut.c to playback.
note that the second option for playback [without any buffering scheme] is commented , and when I use it everything works just fine.
please reply even if you only got an idea about what can be wrong , because I'm out of ideas.
realcr.
PS (EDIT) - If anyone have ever seen a working example that does something related to what I'm trying to do please point me to that example if you can. It is really difficult to find any example of C sound API on the net.