Solved

How to stream mic audio through network?

Posted on 2004-10-01
9
1,461 Views
Last Modified: 2010-08-05
i want to stream mic-in audio through network
how to do it?
that i need to use?
0
Comment
Question by:selas
  • 4
9 Comments
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 500 total points
ID: 12206654
0
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 12206660
lol .. 'you CAN check my example ..' :D
oh . the binaries are in the VoIP.zip file :) VoIP_src.zip are only the sources
0
 

Expert Comment

by:alc4emy5t
ID: 12245269
Well you could use indy IdTCPClient IdTCPServer and the readstream writestream functions

procedure SendToServer;
var
  Client: TIdTCPClient;
  AudioStream: TMemoryStream;
begin
  AudioStream := TMemoryStream.Create;
 
  While Playing do
  begin
    AudioStream.Position := 0;
    ....Code to put Audio into stream...

   Client := TIdTCPClient.Create(nil);
   Client.Host := SERVER_HOST;
   Client.Port := SERVER_PORT;

   Client.WriteStream(AudioStream, True, True);
  end;
  AudioStream.Free;
end;

procedure OnExecute(AThread: TIdThread);
var
  AudioStream: TMemoryStream;
  iSize: Integer;
begin
  AudioStream := TMemoryStream.Create;
 
  iSize := AThread.Connection.ReadInteger;
  AThread.Connection.ReadStream(AudioStream, iSize);
 
  ...Code the move the streamed audio into a buffer..
  AudioStream.Free;
end;

Its probably not an ideal solution, but would do the job. you could tell to write directly to a audio buffer of type TMemoryStream and when the buffer reaches a predetermined size the player started reading from the buffer until the end is reached or the buffer is empty and it needs to wait
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 12

Expert Comment

by:Lee_Nover
ID: 12248792
alc4emy5t: you haven't checked my example :P
0
 

Author Comment

by:selas
ID: 12346814
//   ....Code to put Audio into stream...

what code should be to add mic audio to stream?

and i get error on -> While Playing do
0
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 13343085
my example for streaming audio is the exact thing he asked about .. a working example that's been used by many :)
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question