Hi,
I am wanting to know wether there is some way I can get rid of these < 1ms
XRuns ?
I run an unmodded kernel with no latency patches.
Versions :
Advanced Linux Sound Architecture Driver Version 0.9.0beta8a.
Compiled on Oct 15 2001 for kernel 2.4.10 with versioned symbols.
I just changed my app to double buffered playback to try to get rid of
them.
I now get regular sub ms XRUNS which are more annoying then regular single
buffered XRUNS (which tended to be larger but far fewer between and
regular - during live melody generation, you can cover this up with a
snare and base a beat on that, but now with lots of < 1ms XRuns I get
more regular clicking).
Some simple info about the ALSA sub system :
format set to 2
DevDSP::buffer set to 131065
DevDSP::period set to 32766
frameCount=32768
I use the following write loop - all audio is mono :
while ((frameCount=dd->audio.readAudio()) && dd->audio.active){
int written;
written=snd_pcm_writei(dd->pcm,
&(*dd->audio.windows.current())[0],
frameCount);
if (written == -EAGAIN || written >= 0) {
snd_pcm_wait(dd->pcm, 1000);
} else if (written == -EPIPE) {
cerr <<"DevDsp::play : ALSA write error : "<<
snd_strerror(written)<<endl;
cerr<<"XRUN"<<endl;
xrun(dd->pcm); /* modded from aplay */
} else if (written < 0) {
cerr <<"DevDsp::play : ALSA write error : "<<
snd_strerror(written)<<endl;
exit(-1);
}
*dd->audio.windows.next();
}
A generic log output would look like so (the program is accessing a
file using fstat and the audio is double buffered) :
vectorBassAudio: lastmod time : 1006386254
vectorBassAudio: lastmod time : 1006386817
DevDsp::play : ALSA write error : Broken pipe
XRUN
xrun!!! (at least 0.764 ms long)
vectorBassAudio: lastmod time : 1006390762
DevDsp::play : ALSA write error : Broken pipe
XRUN
xrun!!! (at least 0.792 ms long)
vectorBassAudio: lastmod time : 1006386945
vectorBassAudio: lastmod time : 1006387694
vectorBassAudio: lastmod time : 1006386254
vectorBassAudio: lastmod time : 1006386817
DevDsp::play : ALSA write error : Broken pipe
XRUN
xrun!!! (at least 0.858 ms long)
--
Matt
For electronic musicians ...
Vector Bass : http://mffmvectorbass.sourceforge.net/
For developers ...
3D Audio Library : http://mffm3daudiolib.sourceforge.net/
Multimedia Time Code : http://mffmtimecode.sourceforge.net/
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel