Strange i/o problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a strange problem: I'm trying to pipe audio input -> output using a I2S device @48000 Hz and 32 frames buffer size and 2 periods, to get as low a latency as possible.

It works nicely if I either:
1. Use capture + playback and record capture to a wav file (sounds fine).
2. Use playback only and generate sine waves.
3. Pipe capture -> playback with a larger buffer size, such as 64.

But if I have capture + playback, I get a very strange output noise akin towards heavy intermodulation distortion.

The rendering thread is (pseudo code):

while (true) {
    if(capture_active) {
       snd_pcm_wait(capture_handle, timeout);
       read_pcm_data_into_buffer(capture_handle, input_buffer);
    }
    do_callback(input_buffer, output_buffer);
    if (playback_active) {
        snd_pcm_wait(playback_handle, timeout);
        write_pcm_data_from_buffer(playback_handle, output_buffer);
    }
}

Any ideas what can go wrong ?
/R


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux