当前位置: 首页>>代码示例>>C++>>正文


C++ PlayFile函数代码示例

本文整理汇总了C++中PlayFile函数的典型用法代码示例。如果您正苦于以下问题:C++ PlayFile函数的具体用法?C++ PlayFile怎么用?C++ PlayFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PlayFile函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PlayFile

int CXenoChannel::ReputCard_init(EVTBLK *evtblk)
{
	int nChan = evtblk->nReference;
	if ( Reserved & 0x08 ) return 0;

	Reserved |= 0x08;	// ÖÃ״̬¡°ÕýÔÚ¡±
	m_pOwner->SetItem( nChan, "³äֵʧ°Ü", DS_FAIL );
	
	if ( XenoError == XENO_REJECT || XenoError == XENO_EXPIRED )
		return PlayFile( FILE_XENO_NOTCARD, FT_PROMPT, FALSE );
	else
		return PlayFile( FILE_XENO_NOCARD, FT_PROMPT, FALSE );
}
开发者ID:pics860,项目名称:callcenter,代码行数:13,代码来源:ChannelXeno.cpp

示例2: PlayFile

// 接收留言
int CInfoChannel::RcvLvWord_init(EVTBLK *evtblk)
{
	int nChan = evtblk->nReference;
	if ( Reserved & 0x08 ) return 0;
	
	if ( Reserved == 0 )
	{
		Reserved |= (0x08 | 0x01);
		return PlayFile( FILE_PAGE_RCVLVWRD, FT_PROMPT, FALSE );
	}
	
	BjPlaying	= TRUE;
	Reserved |= (0x08 | 0x02);
	return PlayFile( FILE_PAGE_BJMUSIC, FT_PROMPT, FALSE );
}
开发者ID:pics860,项目名称:callcenter,代码行数:16,代码来源:ChannelInfo.cpp

示例3: Lock

// Request to move to previous item
void Playlist::Prev() {
	std::set<PlaylistInterface *>::const_iterator i;
	std::set<playlist_interface *>::const_iterator j;

	Lock();

	unsigned olditem = curritem;
	if(curritem > queue.size()) {
		curritem = queue.size();
	}
	if(curritem > 1) {
		curritem--;
	}
	if(curritem != 0) {
		PlayFile(queue[curritem - 1]);
	}

	// Tell the subscribing interfaces about the change
	if(curritem != olditem) {
		if(interfaces.size() > 0) {
			for(i = interfaces.begin(); i != interfaces.end(); i++) {
				(*i)->CbSetCurrent(curritem);
			}
		}
		if (cinterfaces.size() > 0) {
			for(j = cinterfaces.begin(); j != cinterfaces.end(); j++) {
				(*j)->cbsetcurrent((*j)->data, curritem);
			}
		}
	}

	Unlock();
}
开发者ID:ether8unny,项目名称:alsaplayer,代码行数:34,代码来源:Playlist.cpp

示例4: LaunchAVI

//-----------------------------------------------------------------------------
bool LaunchAVI(HWND hWnd, char * dest)
{
	CoInitialize(NULL);
	bool ret = PlayFile(hWnd, dest);
	CoUninitialize();
	return ret;
}
开发者ID:tramboi,项目名称:ArxFatalis,代码行数:8,代码来源:EERIE_AVI.cpp

示例5: ASSERT

BOOL COXMetaFile::PlayFile(CDC* pDC, CRect* pClientRect)
{	
	BOOL bReturn;
	CRect rectBounds;
	int nOldMapMode = pDC->GetMapMode();
	CSize OldWndExt, OldViewExt;

	rectBounds.SetRectEmpty();
	if(pDC->IsPrinting())
	{	
		rectBounds.right = pDC->GetDeviceCaps(HORZRES);
		rectBounds.bottom= pDC->GetDeviceCaps(VERTRES);
	}
	else
		rectBounds = * pClientRect;
	ASSERT(rectBounds!=(0,0,0,0));
	if(!m_hEMF) 
		return FALSE;
	pDC->SetMapMode(MM_ISOTROPIC);
	// draw the MetaFile
	// Ajust size of Window to MetaFile
	OldWndExt = pDC->SetWindowExt(GetSize());
	OldViewExt = pDC->SetViewportExt(rectBounds.right, rectBounds.bottom);
	bReturn = PlayFile(pDC);
	pDC->SetWindowExt(OldWndExt);
	pDC->SetViewportExt(OldViewExt);
	pDC->SetMapMode(nOldMapMode);
	return bReturn;
}
开发者ID:Spritutu,项目名称:AiPI-1,代码行数:29,代码来源:OXMetaFile.cpp

示例6: pt

BOOL CMediaWnd::OnDropFiles(CStringList& pFiles, const CPoint& ptScreen, BOOL bDrop)
{
	if ( bDrop == FALSE ) return TRUE;

	CPoint pt( ptScreen );

	m_wndFrame.ScreenToClient( &pt );
	CWnd* pDropped = m_wndFrame.ChildWindowFromPoint( pt );

	BOOL bEnqueue;
	if ( pDropped != NULL )
		bEnqueue = ( pDropped->IsKindOf( RUNTIME_CLASS(CMediaListCtrl) ) );
	else
		bEnqueue = FALSE;

	for ( POSITION pos = pFiles.GetHeadPosition() ; pos ; )
	{
		CString strFile = pFiles.GetNext( pos );

		if ( bEnqueue )
			EnqueueFile( strFile );
		else
			PlayFile( strFile );
	}

	return TRUE;
}
开发者ID:ericfillipe1,项目名称:shareaza-code,代码行数:27,代码来源:WndMedia.cpp

示例7: SsmSetDtmfStopPlay

int CPagerChannel::PlyLvWord_init(EVTBLK *evtblk)
{
	int nChan = evtblk->nReference;
	if ( Reserved & 0x08 ) return 0;
	
	Reserved |= 0x08;	// 置状态“正在”
	SsmSetDtmfStopPlay( nChan, FALSE );
	
	_variant_t TheValue = m_pRecordset->GetCollect( "xPCMName" );
	if ( VT_NULL == TheValue.vt ) return SsmPutUserEvent( E_PROC_PlayEnd, nChan, 0 );
	
	CString xUsrFile = (LPCTSTR)(_bstr_t)TheValue;
	xUsrFile.TrimLeft(); xUsrFile.TrimRight();
	
	int nPos = xUsrFile.Find( ';' );
	if ( nPos > 0 )
	{
		SsmClearFileList( nChan );
		
		// 设置5秒断点以播放插曲
		SsmAddToFileList( nChan, xUsrFile.Left(nPos).GetBuffer(0), 6, 0, 5 * 8000 );
		// 播放插曲
		SsmAddToFileList( nChan, xUsrFile.Right(xUsrFile.GetLength() - nPos -1).GetBuffer(0), 6, 0, 0xFFFFFFFF );
		// 恢复断点以播放主题曲
		SsmAddToFileList( nChan, xUsrFile.Left(nPos).GetBuffer(0), 6, 5 * 8000, 0xFFFFFFFF );
		
		if ( SsmPlayFileList( nChan ) ) return SsmPutUserEvent( E_PROC_PlayEnd, nChan, 0 );
		return 0;
	}
	
	if ( PlayFile( (LPCTSTR)xUsrFile, NULL, FALSE ) ) return SsmPutUserEvent( E_PROC_PlayEnd, nChan, 0 );
	return 0;
}
开发者ID:pics860,项目名称:callcenter,代码行数:33,代码来源:ChannelPager.cpp

示例8: OpenFileDialog

static VOID
OpenFileDialog(HWND hwnd)
{
    OPENFILENAME OpenFileName;
    TCHAR szFile[MAX_PATH + 1] = _T("\0");
    TCHAR szFilter[MAX_PATH], szCurrentDir[MAX_PATH];

    ZeroMemory(&OpenFileName, sizeof(OpenFileName));

    LoadString(hInstance, IDS_ALL_TYPES_FILTER, szFilter, sizeof(szFilter) / sizeof(TCHAR));

    if (!GetCurrentDirectory(sizeof(szCurrentDir) / sizeof(TCHAR), szCurrentDir))
    {
        _tcscpy(szCurrentDir, _T("c:\\"));
    }

    OpenFileName.lStructSize     = sizeof(OpenFileName);
    OpenFileName.hwndOwner       = hwnd;
    OpenFileName.hInstance       = hInstance;
    OpenFileName.lpstrFilter     = szFilter;
    OpenFileName.lpstrFile       = szFile;
    OpenFileName.nMaxFile        = sizeof(szFile) / sizeof((szFile)[0]);
    OpenFileName.lpstrInitialDir = szCurrentDir;
    OpenFileName.Flags           = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_HIDEREADONLY | OFN_SHAREAWARE;
    OpenFileName.lpstrDefExt     = _T("\0");

    if (GetOpenFileName(&OpenFileName))
    {
        PlayFile(hwnd, OpenFileName.lpstrFile);
    }
}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:31,代码来源:mplay32.c

示例9: SsmClearRxDtmfBuf

int CInfoChannel::PlayXFile_init(EVTBLK *evtblk)
{
	int nChan = evtblk->nReference;
	if ( Reserved & 0x08 ) return 0;
	
	Reserved |= 0x08;	// 置状态“正在”
	SsmClearRxDtmfBuf(nChan);
	
	if ( m_pRecordset->adoEOF ) return SsmPutUserEvent( E_PROC_PlayEnd, nChan, 1 );
	
	_variant_t TheValue = m_pRecordset->GetCollect( "xvoicepath" );
	CString xUsrFile = (LPCTSTR)(_bstr_t)TheValue;
	xUsrFile.TrimLeft(); xUsrFile.TrimRight();
	
	Reserved |= 0x08;	// 置状态“正在”
	if ( PlayFile( (LPCTSTR)xUsrFile, NULL, TRUE ) )
	{
		CHAR sError[1024];
		SsmGetLastErrMsg( sError );
		theApp.Message( MSG_ERROR, sError );
		
		return SsmPutUserEvent( E_PROC_PlayEnd, nChan, 0 );
	}
	
	return 0;
}
开发者ID:pics860,项目名称:callcenter,代码行数:26,代码来源:ChannelInfo.cpp

示例10: SpectrumWindowProc

// window procedure
LRESULT CALLBACK SpectrumWindowProc(HWND h, UINT m, WPARAM w, LPARAM l)
{
	switch (m) {
		case WM_LBUTTONDOWN:
		case WM_RBUTTONDOWN:
		case WM_MOUSEMOVE:
			if (w&MK_LBUTTON) SetLoopStart(LOWORD(l)*bpp); // set loop start
			if (w&MK_RBUTTON) SetLoopEnd(LOWORD(l)*bpp); // set loop end
			return 0;

		case WM_MBUTTONDOWN:
			BASS_ChannelSetPosition(chan,LOWORD(l)*bpp,BASS_POS_BYTE); // set current pos
			return 0;

		case WM_TIMER:
			InvalidateRect(h,0,0); // refresh window
			return 0;

		case WM_PAINT:
			if (GetUpdateRect(h,0,0)) {
				PAINTSTRUCT p;
				HDC dc;
				if (!(dc=BeginPaint(h,&p))) return 0;
				BitBlt(dc,0,0,WIDTH,HEIGHT,wavedc,0,0,SRCCOPY); // draw peak waveform
				DrawTimeLine(dc,loop[0],0xffff00,12); // loop start
				DrawTimeLine(dc,loop[1],0x00ffff,24); // loop end
				DrawTimeLine(dc,BASS_ChannelGetPosition(chan,BASS_POS_BYTE),0xffffff,0); // current pos
				EndPaint(h,&p);
			}
			return 0;

		case WM_CREATE:
			win=h;
			// initialize output
			if (!BASS_Init(-1,44100,0,win,NULL)) {
				Error("Can't initialize device");
				return -1;
			}
			if (!PlayFile()) { // start a file playing
				BASS_Free();
				return -1;
			}
			SetTimer(h,0,100,0); // set update timer (10hz)
			break;

		case WM_DESTROY:
			KillTimer(h,0);
			if (scanthread) { // still scanning
				killscan=TRUE;
				WaitForSingleObject((HANDLE)scanthread,1000); // wait for the thread
			}
			BASS_Free();
			if (wavedc) DeleteDC(wavedc);
			if (wavebmp) DeleteObject(wavebmp);
			PostQuitMessage(0);
			break;
	}
	return DefWindowProc(h, m, w, l);
}
开发者ID:Emulai,项目名称:ICT397-Project,代码行数:60,代码来源:custloop.c

示例11: stopPlay

void PlaybackHandler::playFile(QString filename)
{
    if (m_pAudioOut != nullptr)
    {
        stopPlay();
    }
    
    PlayFile(filename);
}
开发者ID:ipr,项目名称:qModPlay,代码行数:9,代码来源:PlaybackHandler.cpp

示例12: PlayFile

int CCorpChannelDx::ExitPlay_init(EVTBLK *evtblk)
{
    int nChan = evtblk->nReference;
    if ( Reserved & 0x08 ) return 0;

    Reserved |= 0x08;	// 置状态“正在”
    m_pOwner->SetItem( nChan, "谢谢使用", DS_PLAY );

    return PlayFile( FILE_PAGE_GOODBYE, "中国电信", FALSE );
}
开发者ID:shilinxu,项目名称:honglt-myproject,代码行数:10,代码来源:ChannelCorpDx.cpp

示例13: PlayFile

void MpvHandler::PlayPause(QString fileIfStopped)
{
    if(playState < 0) // not playing, play plays the selected playlist file
        PlayFile(fileIfStopped);
    else
    {
        const char *args[] = {"cycle", "pause", NULL};
        AsyncCommand(args);
    }
}
开发者ID:ThreeGe,项目名称:Baka-MPlayer,代码行数:10,代码来源:mpvhandler.cpp

示例14: PlayFile

void CFlashPlayerDlg::OnNext() 
{
	if(m_playlist.GetSize() <= 1)
		return;
	if( m_current < m_playlist.GetSize() - 1)
		m_current++;
	else
		m_current = 0;
	PlayFile();
}
开发者ID:william0wang,项目名称:meditor,代码行数:10,代码来源:FlashPlayerDlg.cpp

示例15: SetLinker

// 发送传真
int CMailChannel::RcvFxByte_init(EVTBLK *evtblk)
{
	int nChan = evtblk->nReference;
	if ( Reserved & 0x08 ) return 0;
	
	CChannel* pChannel = m_pHomeWnd->FindChannel( CHN_SOFTFAX, S_CALL_STANDBY );
	if ( pChannel == NULL ) return ShExitCode_init( evtblk, EXIT_BUSY );
	
	Reserved |= 0x08; SetLinker( pChannel->m_nChan );
	return PlayFile( FILE_MAIL_RCVFAX, FT_PROMPT, FALSE );
}
开发者ID:pics860,项目名称:callcenter,代码行数:12,代码来源:channelmail.cpp


注:本文中的PlayFile函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。