Solved

How to stream mic audio through network?

Posted on 2004-10-01
9
1,415 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
Comment Utility
0
 
LVL 12

Expert Comment

by:Lee_Nover
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 12

Expert Comment

by:Lee_Nover
Comment Utility
alc4emy5t: you haven't checked my example :P
0
 

Author Comment

by:selas
Comment Utility
//   ....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
Comment Utility
my example for streaming audio is the exact thing he asked about .. a working example that's been used by many :)
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now