ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Implementing VoIP to a simple program...

<< < (2/2)

hwtan:
What you probably means is to implement transmission of voice packet using ip packets, not VoIP which covers more than just that (SIP and all).

Basically, you will need some way to capture digitialized packets from the sound device and some way to regenerate received packets on the sound device. May be you might want to read up on DirectX (DirectSound). There is a project on CodeProject on this (http://www.codeproject.com/internet/VoIP_For_You.asp). For the network packet, the challenge is in the data compression and how to optimising/adjust the buffer size such that you are able to tolerate some form of jitter in the receive rate and yet acceptable latency over different network due to their bandwidth and latency characteristics.

Codebyte:
Perfect! That is EXACTLY what I need! Thank you, thank you, thank you, thank you! lol! I am going to read up on it some more and then begin "toying" with things! I'll reply later with any questions/comments! Thanks again, Ethan!

Codebyte:
EDIT: June 30th, 2008

Alright, so... Here is my new understanding of what needs to be accomplished.. There will be no VoIP involved but rather the transmission of voice packets (recorded to a filestream using the MCI device or waveIn(), etc...) through a TClientSocket and TServerClient. While i've made tremendous progress on understanding the process of how this works, i'm still stuck because I cannot implement exactly what I need..

Here is what I'm looking to develop:

Client Form
--------------------------------
-Holds a simple TClientSocket that will maintain an active connection with the server. The audio that is captured to the filestream needs to be sent over this socket as well as received from this socket too.
-This form will have a hotkey (like the 'CTRL' button) which, when held down, will record a wave file to a stream. When the hotkey is let go, that wave stream is complete but not deleted. While the wave audio is being recorded when the button is held down, it also needs to be put into buffers and sent through the TClientSocket component. When the button is pressed again, the wave stream simply starts over and repeats the SendStream process

Server Form
--------------------------------
-Acts the same as the Client form but is classified as the server simply because it holds the Active Connection.

I really don't care about encryption/decryption or compression/decompression. The wave stream will take on the GSM 6.0 Audio Format so that the wave file is only writing 1kbps and still maintains audio quality... To be honest, it really doesnt matter what form the wave takes as long as it can be streamed through the Socket at a fast rate.

Logically speaking, it will do this:
1. Ctrl button is pushed
2. Application creates a new wave file stream
3. Application records to the wave file stream
4. Application transmits buffers of size X through the Socket as the wave file stream is being recorded.
5. The receiving application realizes that the Sender is sending a streamed wave file, so it opens a wave file stream that can be read to for playback when all the voice packets have been received.
6. The application then waits for the ctrl button to be pressed again so that it can repeat the same process over and over until the Socket is closed.

This is where I am at.. I've researched alot of things using MSDN Microsoft, but cannot put together what I need for this to work.

On the form, the only thing i really need is a "Record" and "Stop" button for now, everything else is already preset (like the server info for the TClientSocket, etc)... If any of you masterminds understand how to do what i'm talking about, and wouldnt mind helping with the coding behind it, I would be more-than thankful because it seems like everyone points me to a component, which I have nothing against but i'd rather learn how to do this through sample coding so that I get a good grasp of how this works programatically... its not that hard to do, I just dont have experience with the 2 fundamental parts of this project: 1) recording to a file stream with MCI or something, and then 2) streaming/receiving this through the TClientSocket... Please help if you can, some sample source would be amazing! im using CodeGear Rad Studio but I can try to look through Delphi coding or something similiar..

Codebyte:
/bump for the post above since all I did was replace what I had there and it didnt update the post

p.s. - i'm so close that I can taste it... just need someone to help me over the hill.
p.s.s. - just realized, i've worked on this dumb project for around 1 year now... off and on, ugh!

Navigation

[0] Message Index

[*] Previous page

Go to full version