Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
2.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Device Common Routines
  4. //
  5. //=====================================================================================//
  6. #ifndef SND_DEV_COMMON_H
  7. #define SND_DEV_COMMON_H
  8. #pragma once
  9. void DEBUG_DrawPanCurves(void);
  10. #if USE_AUDIO_DEVICE_V1
  11. class CAudioDeviceBase : public IAudioDevice
  12. {
  13. public:
  14. virtual bool IsActive( void ) { return false; }
  15. virtual bool Init( void ) { return false; }
  16. virtual void Shutdown( void ) {}
  17. virtual void Pause( void ) {}
  18. virtual void UnPause( void ) {}
  19. virtual int64 PaintBegin( float, int64 soundtime, int64 paintedtime ) { return 0; }
  20. virtual void PaintEnd( void ) {}
  21. virtual int GetOutputPosition( void ) { return 0; }
  22. virtual void ClearBuffer( void ) {}
  23. // virtual void TransferSamples( int64 end ) {}
  24. virtual int DeviceSampleCount( void ) { return 0; }
  25. };
  26. #endif
  27. extern void Device_MixUpsample( int sampleCount, int filtertype );
  28. extern void Device_ApplyDSPEffects( int idsp, portable_samplepair_t *pbuffront, portable_samplepair_t *pbufrear, portable_samplepair_t *pbufcenter, int samplecount );
  29. extern void Device_SpatializeChannel( int nSlot, float volume[CCHANVOLUMES/2], int master_vol, const Vector& sourceDir, float gain, float mono, int nWavType );
  30. extern void Device_SpatializeChannel( int nSlot, float volume[CCHANVOLUMES/2], const Vector& sourceDir, float mono, float flRearToStereoScale = 0.75 );
  31. extern void Device_Mix8Mono( channel_t *pChannel, char *pData, int outputOffset, int inputOffset, fixedint rateScaleFix, int outCount, int timecompress );
  32. extern void Device_Mix8Stereo( channel_t *pChannel, char *pData, int outputOffset, int inputOffset, fixedint rateScaleFix, int outCount, int timecompress );
  33. extern void Device_Mix16Mono( channel_t *pChannel, short *pData, int outputOffset, int inputOffset, fixedint rateScaleFix, int outCount, int timecompress );
  34. extern void Device_Mix16Stereo( channel_t *pChannel, short *pData, int outputOffset, int inputOffset, fixedint rateScaleFix, int outCount, int timecompress );
  35. #endif // SND_DEV_COMMON_H