Click here to Skip to main content
13,043,092 members (53,751 online)
Click here to Skip to main content
Add your own
alternative version


62 bookmarked
Posted 19 Jan 2002

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

You may also be interested in...

Comments and Discussions

Questionnot working for me on visual studio 2008 and windows 7 Pin
reimo8-Sep-11 2:36
memberreimo8-Sep-11 2:36 
QuestionJust Downloaded VoiceChat plEASE EXPLAIN INSTALL Pin
DAZMeanZit21-Aug-11 1:23
memberDAZMeanZit21-Aug-11 1:23 
QuestionJust Downloaded VoiceChat Pin
DAZMeanZit21-Aug-11 1:22
memberDAZMeanZit21-Aug-11 1:22 
QuestionUrgent Pin
hina_ghazal2-Nov-08 23:31
memberhina_ghazal2-Nov-08 23:31 
GeneralCxImage Version 6.00 and Demo application Pin
Mustafa Alahwel23-Oct-08 6:30
memberMustafa Alahwel23-Oct-08 6:30 
Generalneeded help Pin
hariharasudhan felix23-Jul-06 23:07
memberhariharasudhan felix23-Jul-06 23:07 
Generalis this example given file is a real time example or not Pin
manu90904-May-06 2:30
membermanu90904-May-06 2:30 
QuestionHow To check the CD Writter,Printer, Download Size Status such as How Copies writted and printed Pin
alexmcada3-Oct-05 1:31
memberalexmcada3-Oct-05 1:31 
AnswerRe: How To check the CD Writter,Printer, Download Size Status such as How Copies writted and printed Pin
Duncan Edwards Jones3-Oct-05 1:54
memberDuncan Edwards Jones3-Oct-05 1:54 
Generalencryption Pin
valroft12-May-05 10:00
membervalroft12-May-05 10:00 
GeneralShaking Voice Pin
SohailB27-Apr-05 3:06
memberSohailB27-Apr-05 3:06 
Generalthank you georgi ! Pin
valroft30-Mar-05 19:19
membervalroft30-Mar-05 19:19 
GeneralErrors in Ole control Pin
Georgi Petrov5-Mar-05 0:21
memberGeorgi Petrov5-Mar-05 0:21 
Generalerror in buliding the OVoiceChatt Control... Pin
ComVexd22-Jun-04 15:01
memberComVexd22-Jun-04 15:01 
GeneralRe: error in buliding the OVoiceChatt Control... Pin
ComVexd22-Jun-04 15:11
memberComVexd22-Jun-04 15:11 
Generalneed help Pin
saima11-Jun-04 4:24
membersaima11-Jun-04 4:24 
Generalneed help Pin
saima11-Jun-04 4:18
membersaima11-Jun-04 4:18 
QuestionHaving link error LNK2019? Pin
Danny J6-Feb-04 15:48
memberDanny J6-Feb-04 15:48 
Generalhelp me Pin
Anonymous11-Aug-03 15:01
sussAnonymous11-Aug-03 15:01 
QuestionHow OCX control into win32 aPP Pin
Marcos_Martinez2-Jul-03 22:01
sussMarcos_Martinez2-Jul-03 22:01 
GeneralPl Help to run this app Pin
dharani11-Jun-03 20:45
memberdharani11-Jun-03 20:45 
General[Q] error code... Pin
hss04217-Apr-03 4:56
memberhss04217-Apr-03 4:56 
GeneralRe: [Q] error code... Pin
haogege8-Mar-04 15:03
memberhaogege8-Mar-04 15:03 
Generalresend the whole project Pin
pon.vignesh4-Mar-03 1:02
susspon.vignesh4-Mar-03 1:02 
GeneralVB Pin
fasiasharf27-Dec-02 21:58
memberfasiasharf27-Dec-02 21:58 
GeneralCannot open output device in NT, works in 2000 Pin
Anonymous6-Aug-02 0:57
sussAnonymous6-Aug-02 0:57 
GeneralRe: Cannot open output device in NT, works in 2000 Pin
Anonymous22-Aug-02 21:07
sussAnonymous22-Aug-02 21:07 
GeneralProblem in running the voice chatt Pin
Anonymous5-Aug-02 20:06
sussAnonymous5-Aug-02 20:06 
QuestionHow to handle "Cannot Open Sound Input Device" Pin
Anonymous13-Jun-02 23:48
memberAnonymous13-Jun-02 23:48 
GeneralInstant Messanger Pin
Anonymous29-May-02 23:29
memberAnonymous29-May-02 23:29 
GeneralRe: Instant Messanger Pin
Member 443557825-Aug-08 2:40
memberMember 443557825-Aug-08 2:40 
Generalthanks,how to work with the Execute file?(yanbiao) Pin
yanbiao29-May-02 19:16
memberyanbiao29-May-02 19:16 
GeneralRe: thanks,how to work with the Execute file?(yanbiao) Pin
ComVexd22-Jun-04 15:28
memberComVexd22-Jun-04 15:28 
GeneralNeed client TCP in C++ for windows Pin
jerome lebaorn20-Apr-02 8:07
memberjerome lebaorn20-Apr-02 8:07 
Generalcannot open file "mfc42u.lib" Pin
Florian R20-Apr-02 4:04
memberFlorian R20-Apr-02 4:04 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; Pin
Robert.H17-Nov-03 17:34
memberRobert.H17-Nov-03 17:34 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; Pin
Anonymous13-Feb-04 3:51
sussAnonymous13-Feb-04 3:51 
GeneralRe: cannot open file "mfc42u.lib" Pin
haogege8-Mar-04 14:59
memberhaogege8-Mar-04 14:59 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; Pin
Anonymous20-Jul-04 17:12
sussAnonymous20-Jul-04 17:12 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; Pin
Gloria Cheng20-Jul-04 17:59
memberGloria Cheng20-Jul-04 17:59 
GeneralRe: cannot open file &quot;mfc42u.lib&quot; Pin
h02145783-Nov-04 5:31
memberh02145783-Nov-04 5:31 
GeneralQuestion abt executable file Pin
Khatri7-Mar-02 0:37
memberKhatri7-Mar-02 0:37 
GeneralThe same projects need Pin
Vityusha21-Feb-02 2:38
memberVityusha21-Feb-02 2:38 
Generalthank imran lodhi Pin
sinomaverick2-Feb-02 13:48
membersinomaverick2-Feb-02 13:48 
Generalthanx for the code Pin
khan24-Jan-02 2:44
memberkhan24-Jan-02 2:44 
GeneralRe: thanx for the code Pin
IUnKnown28-Jan-02 5:20
memberIUnKnown28-Jan-02 5:20 
GeneralRe: thanx for the code Pin
sinomaverick2-Feb-02 15:39
membersinomaverick2-Feb-02 15:39 
GeneralSame problem Please solutions... Pin
Radu Adrian Moldovan19-Mar-02 2:02
memberRadu Adrian Moldovan19-Mar-02 2:02 
GeneralRun Problems Pin
Ed Dixon21-Jan-02 12:24
memberEd Dixon21-Jan-02 12:24 
GeneralRe: Run Problems Pin
MOLDOVAN Radu Adrian17-Mar-02 21:47
memberMOLDOVAN Radu Adrian17-Mar-02 21:47 

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

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

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