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

📄 snd_wave_mixer_private.h

📁 hl2 source code. Do not use it illegal.
💻 H
字号:
//=========== (C) Copyright 1999 Valve, L.L.C. All rights reserved. ===========
//
// The copyright to the contents herein is the property of Valve, L.L.C.
// The contents may be used and/or copied only with the written permission of
// Valve, L.L.C., or in accordance with the terms and conditions stipulated in
// the agreement/contract under which the contents have been supplied.
//
// Purpose: 
//
// $Workfile:     $
// $Date:         $
//
//-----------------------------------------------------------------------------
// $Log: $
//
// $NoKeywords: $
//=============================================================================

#ifndef SND_WAVE_MIXER_PRIVATE_H
#define SND_WAVE_MIXER_PRIVATE_H
#pragma once

#include "snd_audio_source.h"
#include "snd_wave_mixer.h"
#include "sound_private.h"
#include "snd_wave_source.h"

class IWaveData;

class CAudioMixerWave : public CAudioMixer
{
public:
							CAudioMixerWave( IWaveData *data );
	virtual					~CAudioMixerWave( void );

	int						MixDataToDevice( IAudioDevice *pDevice, channel_t *pChannel, int sampleCount, int outputRate, int outputOffset );
	int						SkipSamples( int startSample, int sampleCount, int outputRate, int outputOffset );
	bool					ShouldContinueMixing( void );

	virtual void			Mix( IAudioDevice *pDevice, channel_t *pChannel, void *pData, int outputOffset, int inputOffset, fixedint fracRate, int outCount, int timecompress ) = 0;
	virtual int				GetOutputData( void **pData, int sampleCount, char copyBuf[AUDIOSOURCE_COPYBUF_SIZE] );

	virtual CAudioSource*	GetSource( void );
	virtual int				GetSamplePosition( void );
	virtual float			ModifyPitch( float pitch );
	virtual float			GetVolumeScale( void );
	
	// Move the current position to newPosition
	virtual void			SetSampleStart( int newPosition );
	
	// End playback at newEndPosition
	virtual void			SetSampleEnd( int newEndPosition );

	virtual void			SetStartupDelaySamples( int delaySamples );
protected:
	double				m_sample;

	IWaveData			*m_pData;
	double 				m_forcedEndSample;
	bool				m_finished;
	int					m_delaySamples;
};


#endif // SND_WAVE_MIXER_PRIVATE_H

⌨️ 快捷键说明

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