29 Nov
2011
29 Nov
'11
3:14 p.m.
Martin schmidt wrote:
my problem is, the sound has an Echo (in german Hall-Effekt).
int write_to_audiostream(short*buf) { memcpy(audiobuffer[audiobuffercounter],buf,audio_buffersize*sizeof(short)); int w= snd_pcm_writei (pcm_handle, audiobuffer[audiobuffercounter], 2* audio_buffersize);
This looks correct (as long as the buffer is correctly filled). Do you ever check w?
audiobuffercounter = ++audiobuffercounter % 10;
It is a bad idea to disable compiler warnings, or to not heed them.
in a Timer-Event
Why a timer? How is the timer synchronized to the sample clock?
Regards, Clemens