How to transfer audio data in real time?

This is a discussion on How to transfer audio data in real time? within the Networking/Device Communication forums, part of the General Programming Boards category; I wrote two programs:Server and Client, they communicate by audio through TCP protocol, but I find they couldn't communicate in ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    50

    How to transfer audio data in real time?

    I wrote two programs:Server and Client,
    they communicate by audio through TCP protocol,
    but I find they couldn't communicate in real time,
    How to transfer audio data in real time?
    Could you support me some documents.Thanks.

  2. #2
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    > they couldn't communicate in real time
    What? Apart from internet latency, the communication is virtually instantaneous.

    It sounds like you just want to make a sound-file transfer program, in which case, it would be as easy as anything else: read it into a buffer, send it through, let TCP fragment up your data, let the other computer receive it, assemble it, and then save it as a sound file again.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Perhaps read this -> Real-time Transport Protocol - Wikipedia, the free encyclopedia
    And understand why TCP isn't perhaps the best thing to use (hence the invention of RTP).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    50
    If I want to write codes with RTP,
    what files do I need?
    I write codes using VC6

  5. #5
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    > If I want to write codes with RTP, what files do I need?
    Just a standard socket library, and lots of reading of RFC 3550 - RTP: A Transport Protocol for Real-Time Applications
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #6
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,649
    VC6
    Seriously? Do you know how old this is? Why not something from this century? It's only marginally better than using Turbo C/C++.

  7. #7
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,236
    Quote Originally Posted by leetow2003 View Post
    How to transfer audio data in real time?
    Define "real time." If you mean it in the technical sense (absolute guarantees on latency), then you're asking for the impossible. If "real time" means "really quickly" then you need to be more specific.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to transfer a big file only one time?
    By leetow2003 in forum Networking/Device Communication
    Replies: 2
    Last Post: 11-21-2011, 10:30 AM
  2. Host/Server real time data transfer
    By dannyrod01 in forum Networking/Device Communication
    Replies: 9
    Last Post: 05-25-2011, 11:38 PM
  3. How to transfer data structures over net ?
    By jabka in forum C Programming
    Replies: 5
    Last Post: 04-12-2009, 11:46 AM
  4. Cross-process data transfer
    By bennyandthejets in forum Windows Programming
    Replies: 10
    Last Post: 07-22-2003, 04:11 PM
  5. data transfer
    By Blaster in forum Linux Programming
    Replies: 4
    Last Post: 03-12-2003, 07:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21