PlaySound.cpp ( 文件浏览 )
文件源自:
VideoNet_src p2p 视频会议
源码简介:
VideoNet_src p2p 视频会议
- keepall 发布于 2016-08-23 22:16
- 浏览次数:416
- 下载次数: 0
- 下载需 20 积分
-
- 侵权举报
//////////////////////////////////////////////////////////////////////////// // // // Project : VideoNet version 1.1. // Description : Peer to Peer Video Conferencing over the LAN. // Author : Nagareshwar Y Talekar ( nsry2002@yahoo.co.in) // Date : 15-6-2004. // // // File description : // Name : PlaySound.cpp // Details : For playing the data, received from remote host. // // ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "VideoNet.h" #include "VideoNetDlg.h" #include "PlaySound.h" #include <mmsystem.h> #include <mmreg.h> #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// IMPLEMENT_DYNCREATE(PlaySound1, CWinThread) BEGIN_MESSAGE_MAP(PlaySound1, CWinThread) ON_THREAD_MESSAGE(WM_PLAYSOUND_STARTPLAYING, OnStartPlaying) ON_THREAD_MESSAGE(WM_PLAYSOUND_STOPPLAYING, OnStopPlaying) ON_THREAD_MESSAGE(WM_PLAYSOUND_PLAYBLOCK, OnWriteSoundData) ON_THREAD_MESSAGE(MM_WOM_DONE, OnEndPlaySoundData) ON_THREAD_MESSAGE(WM_PLAYSOUND_ENDTHREAD,OnEndThread) END_MESSAGE_MAP() PlaySound1::PlaySound1() { } PlaySound1::PlaySound1(CDialog *dialog) { log.Open("playsound.log",CFile::modeCreate | CFile::modeWrite); dlg=dialog; //GetDevProperty(); /* memset(&m_WaveFormatEx,0x00,sizeof(m_WaveFormatEx)); m_WaveFormatEx.wfx.wFormatTag = WAVE_FORMAT_GSM610; m_WaveFormatEx.wfx.nChannels = 1; m_WaveFormatEx.wfx.wBitsPerSample = 0; m_WaveFormatEx.wfx.cbSize = 2; m_WaveFormatEx.wfx.nSamplesPerSec = SAMPLEPSEC; m_WaveFormatEx.wfx.nAvgBytesPerSec = 1625; //(SAMPLEPSEC/320)*65 ; m_WaveFormatEx.wfx.nBlockAlign = 65; m_WaveFormatEx.wSamplesPerBlock=320; */ memset(&m_WaveFormatEx,0x00,sizeof(m_WaveFormatEx)); m_WaveFormatEx.wFormatTag = WAVE_FORMAT_PCM; m_WaveFormatEx.nChannels = 1; m_WaveFormatEx.wBitsPerSample = 8; m_WaveFormatEx.cbSize = 0; m_WaveFormatEx.nSamplesPerSec = SAMPLEPSEC; m_WaveFormatEx.nAvgBytesPerSec = SAMPLEPSEC ; m_WaveFormatEx.nBlockAlign = 1; Playing = FALSE; log.WriteString("\n In the constructor of Play sound"); } PlaySound1::~PlaySound1() { } void PlaySound1::GetDevProperty() { CString format; WAVEOUTCAPS wavecap; int propno[]= { WAVECAPS_LRVOLUME , WAVECAPS_PITCH , WAVECAPS_PLAYBACKRATE, WAVECAPS_SYNC , WAVECAPS_VOLUME, WAVECAPS_SAMPLEACCURATE , }; CString propstr[]={ "WAVECAPS_LRVOLUME ", "WAVECAPS_PITCH ", "WAVECAPS_PLAYBACKRATE", "WAVECAPS_SYNC" , "WAVECAPS_VOLUME", "WAVECAPS_SAMPLEACCURATE" , }; // Special property format.Empty(); format="\nSpecial properties... \n"; for(int j=0;j<6;j++) { if( (w[!==More==!]
...
展开> <收缩
Sponsored links
源码文件列表
温馨提示: 点击源码文件名可预览文件内容哦 ^_^名称 | 大小 | 修改日期 |
---|---|---|
/res/ | 0 Bytes | 2002-05-04 09:55:30 |
/encoder/ | 0 Bytes | 2002-05-06 16:43:08 |
/decoder/ | 0 Bytes | 2002-05-06 16:43:08 |
/videonet.ico | 9.90 KB | 2002-05-07 02:29:12 |
/VideoNet.aps | 48.61 KB | 2002-05-07 15:47:08 |
/ConnectDlg.h | 1.29 KB | 2002-05-07 14:19:06 |
/DSocket.h | 1.74 KB | 2002-05-07 16:11:08 |
/Mixer.h | 1.27 KB | 2002-05-07 03:26:40 |
/PlaySound.h | 1.86 KB | 2002-05-07 04:12:28 |
/RecordSound.h | 1.67 KB | 2002-05-08 14:19:28 |
/RequestDlg.h | 1.38 KB | 2002-05-07 14:20:42 |
/resource.h | 1.89 KB | 2002-05-07 03:11:50 |
/StdAfx.h | 1.02 KB | 2002-05-04 09:55:30 |
/VideoCapture.h | 1.94 KB | 2002-05-07 01:48:42 |
/VideoNet.h | 1.18 KB | 2002-05-04 09:55:30 |
/VideoNetDlg.h | 2.77 KB | 2002-05-07 15:47:04 |
/Volume.h | 1.11 KB | 2002-05-07 03:31:24 |
/ConnectDlg.cpp | 1.83 KB | 2002-05-07 20:46:54 |
/DSocket.cpp | 7.00 KB | 2002-05-07 16:11:08 |
/Mixer.cpp | 4.25 KB | 2002-05-07 03:24:10 |
/PlaySound.cpp | 5.86 KB | 2002-05-08 14:33:12 |
/RecordSound.cpp | 5.94 KB | 2002-05-08 14:18:32 |
/RequestDlg.cpp | 2.52 KB | 2002-05-07 14:25:18 |
/StdAfx.cpp | 494 Bytes | 2002-05-07 13:23:34 |
/VideoCapture.cpp | 5.80 KB | 2002-05-07 02:55:28 |
/VideoNet.cpp | 1.75 KB | 2002-05-07 13:26:16 |
/VideoNetDlg.cpp | 19.47 KB | 2002-05-08 19:40:58 |
/Volume.cpp | 1.78 KB | 2002-05-07 03:25:30 |
/VideoNet.clw | 3.09 KB | 2002-05-08 19:43:40 |
/VideoNet.opt | 51.50 KB | 2002-05-08 19:52:46 |
/VideoNet.dsp | 12.69 KB | 2002-05-08 19:52:08 |
/VideoNet.dsw | 539 Bytes | 2002-05-04 09:55:32 |
/VideoNet.rc | 9.84 KB | 2002-05-07 15:47:08 |
/decoder/decdef.h | 2.70 KB | 2002-05-07 03:51:06 |
/decoder/decstruct.h | 1.56 KB | 2002-05-07 03:55:10 |
/decoder/DGlobal.h | 3.61 KB | 2002-05-07 03:52:28 |
/decoder/GetBits.h | 1.59 KB | 2002-05-07 03:55:10 |
/decoder/GetBlk.h | 1.69 KB | 2002-05-07 03:55:10 |
/decoder/GetHdr.h | 1.49 KB | 2002-05-07 03:55:10 |
/decoder/GetPic.h | 2.21 KB | 2002-05-07 03:54:40 |
/decoder/GetVlc.h | 1.66 KB | 2002-05-07 03:55:10 |
/decoder/Idct.h | 1.88 KB | 2002-05-07 04:03:40 |
/decoder/Idctref.h | 1.40 KB | 2002-05-07 04:03:40 |
/decoder/Indices.h | 1.74 KB | 2002-05-07 04:03:40 |
/decoder/Recon.h | 2.70 KB | 2002-05-07 04:03:40 |
/decoder/Sac.h | 1.50 KB | 2002-05-07 04:03:40 |
/decoder/Sactbls.h | 2.04 KB | 2002-05-07 04:03:40 |
/decoder/Tmndec.h | 3.94 KB | 2002-05-07 04:03:14 |
/decoder/DGlobal.cpp | 7.52 KB | 2002-05-07 03:55:08 |
/decoder/GetBits.cpp | 5.88 KB | 2002-05-07 03:55:08 |
/decoder/GetBlk.cpp | 10.31 KB | 2002-05-07 03:55:10 |
/decoder/GetHdr.cpp | 5.32 KB | 2002-05-07 03:55:10 |
/decoder/GetPic.cpp | 31.76 KB | 2002-05-07 03:55:10 |
/decoder/GetVlc.cpp | 10.92 KB | 2002-05-07 03:55:10 |
/decoder/Idct.cpp | 6.65 KB | 2002-05-07 04:03:40 |
/decoder/Idctref.cpp | 4.32 KB | 2002-05-07 04:03:40 |
/decoder/Indices.cpp | 4.21 KB | 2002-05-07 04:03:40 |
/decoder/main.cpp | 2.11 KB | 2002-05-06 00:27:46 |
/decoder/Recon.cpp | 21.69 KB | 2002-05-07 04:03:40 |
/decoder/Sac.cpp | 6.86 KB | 2002-05-07 04:03:40 |
/decoder/Sactbls.cpp | 12.36 KB | 2002-05-07 04:03:40 |
/decoder/Tmndec.cpp | 8.59 KB | 2002-05-08 16:28:10 |
/decoder/YuvToRgb.cpp | 5.42 KB | 2002-05-06 02:58:48 |
/decoder/h263 | 2.08 KB | 2002-05-05 14:38:24 |
/decoder/convert.h | 936 Bytes | 2002-05-07 03:41:52 |
/decoder/convert.cpp | 5.07 KB | 2002-05-07 03:41:34 |
/encoder/quant.cpp | 2.98 KB | 2002-05-07 03:38:50 |
/encoder/config.h | 5.60 KB | 2002-05-07 03:37:30 |
/encoder/countbit.h | 1.69 KB | 2002-05-07 03:34:20 |
/encoder/ctables.h | 3.63 KB | 2002-05-07 03:34:32 |
/encoder/dct.h | 929 Bytes | 2002-05-07 03:34:56 |
/encoder/def.h | 4.66 KB | 2002-05-07 03:37:30 |
/encoder/Global.h | 1.76 KB | 2002-05-07 03:37:30 |
/encoder/huffman.h | 1.51 KB | 2002-05-07 03:37:30 |
/encoder/libr263.h | 2.27 KB | 2002-05-07 03:37:30 |
/encoder/mot_est.h | 1.38 KB | 2002-05-07 03:38:00 |
/encoder/owntypes.h | 1.17 KB | 2002-05-07 03:38:22 |
/encoder/pred.h | 1.73 KB | 2002-05-07 03:38:40 |
/encoder/quant.h | 974 Bytes | 2002-05-07 03:38:58 |
/encoder/rlib.h | 1.91 KB | 2002-05-07 03:55:08 |
/encoder/stream.h | 890 Bytes | 2002-05-07 03:40:02 |
/encoder/struct.h | 5.19 KB | 2002-05-07 03:40:12 |
/encoder/coder.cpp | 30.84 KB | 2002-05-08 16:28:10 |
/encoder/countbit.cpp | 17.74 KB | 2002-05-07 03:34:12 |
/encoder/dct.cpp | 23.50 KB | 2002-05-07 03:37:30 |
/encoder/Global.cpp | 1.32 KB | 2002-05-07 03:35:20 |
/encoder/huffman.cpp | 6.06 KB | 2002-05-07 03:35:56 |
/encoder/libr263.cpp | 8.04 KB | 2002-05-08 19:46:38 |
/encoder/mot_est.cpp | 12.30 KB | 2002-05-07 03:55:08 |
/encoder/pred.cpp | 12.27 KB | 2002-05-07 03:38:32 |
/encoder/coder.h | 1.81 KB | 2002-05-07 03:37:30 |
/encoder/rlib.cpp | 3.02 KB | 2002-05-07 03:39:34 |
/encoder/stream.cpp | 4.41 KB | 2002-05-08 16:28:10 |
/res/VideoNet.rc2 | 400 Bytes | 2002-05-04 09:55:30 |
/res/VideoNet.ico | 1.05 KB | 2002-05-04 09:55:30 |
Sponsored links