⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 soundprovider_recorder.cpp

📁 这是一款2d游戏引擎
💻 CPP
字号:
/*  $Id: soundprovider_recorder.cpp,v 1.1 2003/09/19 20:57:23 mbn Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 of the License, or (at your option) any later version.
**
**  This library is distributed in the hope that it will be useful,
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
**  Lesser General Public License for more details.
**
**  You should have received a copy of the GNU Lesser General Public
**  License along with this library; if not, write to the Free Software
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
**
*/

#include "Sound/precomp.h"
#include "API/Sound/SoundProviders/soundprovider_recorder.h"
#include "soundprovider_recorder_generic.h"
#ifdef WIN32
#include "Win32/soundprovider_recorder_directsound.h"
#else
#include "Unix/soundprovider_recorder_oss.h"
#endif

/////////////////////////////////////////////////////////////////////////////
// CL_SoundProvider_Recorder construction:

CL_SoundProvider_Recorder::CL_SoundProvider_Recorder(
	int frequency) : impl(new CL_SoundProvider_Recorder_Generic)
{
	impl->frequency = frequency;
}

CL_SoundProvider_Recorder::~CL_SoundProvider_Recorder()
{
	delete impl;
}

/////////////////////////////////////////////////////////////////////////////
// CL_SoundProvider_Recorder operations:

CL_SoundProvider_Session *CL_SoundProvider_Recorder::begin_session()
{
#ifdef WIN32
	return new CL_SoundProvider_Recorder_DirectSound_Session(impl->frequency);
#else
	return new CL_SoundProvider_Recorder_OSS_Session(impl->frequency);
#endif
}

void CL_SoundProvider_Recorder::end_session(CL_SoundProvider_Session *session)
{
	delete session;
}

/////////////////////////////////////////////////////////////////////////////
// CL_SoundProvider_Recorder implementation:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -