Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, I am writing a real time application for voice chat. Currently I am able to record & playback voice simultaneously but with 1-2 seconds delay which is quite ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    2

    How to capture & playback voice using c/c++ without any delay & but at the same time?

    Hi all,
    I am writing a real time application for voice chat. Currently I am able to record & playback voice simultaneously but with 1-2 seconds delay which is quite high for real time. For this I have to use two different terminals & run 2 different programs one to record & tranfer & other to receive & playback voice. I am able to do this by following commands,

    record: cat /dev/dsp > file_name
    playback: cat file_name > /dev/dsp

    delay is only because of above commands...

    Can anyone please tell me any other effective method in c/c++ to record & playback of voice at the same time.

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Quote Originally Posted by rvsachin View Post
    Can anyone please tell me any other effective method in c/c++ to record & playback of voice at the same time.
    Can't you just raise the volume for the channel "Microphone"?

    If you want to write audio with the smallest lag, I recommend ALSA.
    It needs some effort though.
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Sep 2009
    Posts
    2
    nop, increasing volume will not work...
    my problem is actually the method i am using to record & playback. It is delaying whole process. Also I can't use same programm to record & write using /dev/dsp....

    would you please elaborate more on ALSA procedure...??how can I do it using it..? & what are the commands for it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...