Click here to Skip to main content
Click here to Skip to main content

Simple Voice Chat

, 19 Jan 2002
Rate this:
Please Sign up or sign in to vote.
A simple peer to peer voice chat application using sockets
<!-- Download Links --> <!-- Add the rest of your HTML here -->


This is a simple voice chat program implemented in an ActiveX control (OVoiceChatt Control) using windows sockets in non compressed PCM format. You just need to give your name and the IP address of the computer on which you want to establish a voice chat session.

There is a simple test application (OVoiceChattClient) which has implemented the control.

Run the OVoiceChatClient.exe and enter you name and the ip address of the computer same application should be running on that computer as well. .A request for the voice chat goes to that computer and if that person accepts it then the voice chat starts.

To use in a program.

Below is some sample code that demonstrates using the control in your code.

In the header:

COVoiceChatt m_ctlVoice;

In the implementation:

BEGIN_EVENTSINK_MAP(COVoiceChattClientDlg, CDialog)
    ON_EVENT(COVoiceChattClientDlg, IDC_OVOICECHATTCTRL1, 1 /* GetVoiceInvitation */, \
                 OnGetVoiceInvitation, VTS_BSTR VTS_BSTR)
    ON_EVENT(COVoiceChattClientDlg, IDC_OVOICECHATTCTRL1, 2 /* GetReqStatus */, \
                 OnGetReqStatus, VTS_I4)
    ON_EVENT(COVoiceChattClientDlg, IDC_OVOICECHATTCTRL1, 3 /* GetVoiceEndNotice */, \
                 OnGetVoiceEndNoticeOvoicechattctrl1, VTS_NONE)

void COVoiceChattClientDlg::OnGetVoiceInvitation(LPCTSTR ip, LPCTSTR nick) 
    CString str=nick;
    str+=" wants to have voice chat with you";

void COVoiceChattClientDlg::OnGetReqStatus(long status) 
        AfxMessageBox("request rejected");

void COVoiceChattClientDlg::OnButton1() 

void COVoiceChattClientDlg::OnButtonEnd() 

void COVoiceChattClientDlg::OnGetVoiceEndNoticeOvoicechattctrl1() 
    AfxMessageBox("Voice Conversation Has Been Ended");       


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

imran lodhi

United States United States
No Biography provided

Comments and Discussions

Questionnot working for me on visual studio 2008 and windows 7 Pinmemberreimo8-Sep-11 3:36 
QuestionJust Downloaded VoiceChat plEASE EXPLAIN INSTALL PinmemberDAZMeanZit21-Aug-11 2:23 
QuestionJust Downloaded VoiceChat PinmemberDAZMeanZit21-Aug-11 2:22 
QuestionUrgent Pinmemberhina_ghazal3-Nov-08 0:31 
GeneralCxImage Version 6.00 and Demo application PinmemberMustafa Alahwel23-Oct-08 7:30 
Generalneeded help Pinmemberhariharasudhan felix24-Jul-06 0:07 
Generalis this example given file is a real time example or not Pinmembermanu90904-May-06 3:30 
QuestionHow To check the CD Writter,Printer, Download Size Status such as How Copies writted and printed Pinmemberalexmcada3-Oct-05 2:31 
AnswerRe: How To check the CD Writter,Printer, Download Size Status such as How Copies writted and printed PinmemberDuncan Edwards Jones3-Oct-05 2:54 
Generalencryption Pinmembervalroft12-May-05 11:00 
GeneralShaking Voice PinmemberSohailB27-Apr-05 4:06 
Generalthank you georgi ! Pinmembervalroft30-Mar-05 20:19 
GeneralErrors in Ole control PinmemberGeorgi Petrov5-Mar-05 1:21 
Generalerror in buliding the OVoiceChatt Control... PinmemberComVexd22-Jun-04 16:01 
GeneralRe: error in buliding the OVoiceChatt Control... PinmemberComVexd22-Jun-04 16:11 
Generalneed help Pinmembersaima11-Jun-04 5:24 
Generalneed help Pinmembersaima11-Jun-04 5:18 
QuestionHaving link error LNK2019? PinmemberDanny J6-Feb-04 16:48 
Generalhelp me PinsussAnonymous11-Aug-03 16:01 
QuestionHow OCX control into win32 aPP PinsussMarcos_Martinez2-Jul-03 23:01 
GeneralPl Help to run this app Pinmemberdharani11-Jun-03 21:45 
General[Q] error code... Pinmemberhss04217-Apr-03 5:56 
GeneralRe: [Q] error code... Pinmemberhaogege8-Mar-04 16:03 
Generalresend the whole project Pinsusspon.vignesh4-Mar-03 2:02 
GeneralVB Pinmemberfasiasharf27-Dec-02 22:58 
GeneralCannot open output device in NT, works in 2000 PinsussAnonymous6-Aug-02 1:57 
GeneralRe: Cannot open output device in NT, works in 2000 PinsussAnonymous22-Aug-02 22:07 
GeneralProblem in running the voice chatt PinsussAnonymous5-Aug-02 21:06 
QuestionHow to handle "Cannot Open Sound Input Device" PinmemberAnonymous14-Jun-02 0:48 
GeneralInstant Messanger PinmemberAnonymous30-May-02 0:29 
GeneralRe: Instant Messanger PinmemberMember 443557825-Aug-08 3:40 
Generalthanks,how to work with the Execute file?(yanbiao) Pinmemberyanbiao29-May-02 20:16 
GeneralRe: thanks,how to work with the Execute file?(yanbiao) PinmemberComVexd22-Jun-04 16:28 
GeneralNeed client TCP in C++ for windows Pinmemberjerome lebaorn20-Apr-02 9:07 
Generalcannot open file "mfc42u.lib" PinmemberFlorian R20-Apr-02 5:04 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; PinmemberRobert.H17-Nov-03 18:34 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; PinsussAnonymous13-Feb-04 4:51 
GeneralRe: cannot open file "mfc42u.lib" Pinmemberhaogege8-Mar-04 15:59 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; PinsussAnonymous20-Jul-04 18:12 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; PinmemberGloria Cheng20-Jul-04 18:59 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; Pinmemberh02145783-Nov-04 6:31 
GeneralQuestion abt executable file PinmemberKhatri7-Mar-02 1:37 
GeneralThe same projects need PinmemberVityusha21-Feb-02 3:38 
Generalthank imran lodhi Pinmembersinomaverick2-Feb-02 14:48 
Generalthanx for the code Pinmemberkhan24-Jan-02 3:44 
GeneralRe: thanx for the code PinmemberIUnKnown28-Jan-02 6:20 
GeneralRe: thanx for the code Pinmembersinomaverick2-Feb-02 16:39 
GeneralSame problem Please solutions... PinmemberRadu Adrian Moldovan19-Mar-02 3:02 
GeneralRun Problems PinmemberEd Dixon21-Jan-02 13:24 
GeneralRe: Run Problems PinmemberMOLDOVAN Radu Adrian17-Mar-02 22:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150327.1 | Last Updated 20 Jan 2002
Article Copyright 2002 by imran lodhi
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid