Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __CS_SNDSYS_RENDERER_H__
00021 #define __CS_SNDSYS_RENDERER_H__
00022
00027 #include "csutil/scf.h"
00028 #include "isndsys/ss_filter.h"
00029
00033 struct csSndSysSoundFormat;
00034 struct iSndSysData;
00035 struct iSndSysStream;
00036 struct iSndSysSource;
00037 struct iSndSysListener;
00038 struct iSndSysRendererCallback;
00039
00040 #ifndef CS_SNDSYS_SOURCE_DISTANCE_INFINITE
00041 #define CS_SNDSYS_SOURCE_DISTANCE_INFINITE -1.0f
00042 #endif
00043
00044 #define CS_SNDSYS_SOURCE_STOPPED 0
00045 #define CS_SNDSYS_SOURCE_PLAYING 1
00046
00047
00058 struct iSndSysRenderer : public virtual iBase
00059 {
00060 SCF_INTERFACE(iSndSysRenderer,0,2,1);
00061
00063 virtual void SetVolume (float vol) = 0;
00064
00066 virtual float GetVolume () = 0;
00067
00072 virtual csPtr<iSndSysStream> CreateStream(iSndSysData* data,
00073 int mode3d) = 0;
00074
00076 virtual csPtr<iSndSysSource> CreateSource(iSndSysStream* stream) = 0;
00077
00079 virtual bool RemoveStream(iSndSysStream* stream) = 0;
00080
00082 virtual bool RemoveSource(iSndSysSource* source) = 0;
00083
00085 virtual csRef<iSndSysListener> GetListener () = 0;
00086
00088 virtual bool RegisterCallback(iSndSysRendererCallback *pCallback) = 0;
00089
00091 virtual bool UnregisterCallback(iSndSysRendererCallback *pCallback) = 0;
00092 };
00093
00094
00101 struct iSndSysRendererCallback : public virtual iBase
00102 {
00103 SCF_INTERFACE(iSndSysRendererCallback,0,1,0);
00104
00106 virtual void StreamAddNotification(iSndSysStream *pStream) = 0;
00107
00109 virtual void StreamRemoveNotification(iSndSysStream *pStream) = 0;
00110
00112 virtual void SourceAddNotification(iSndSysSource *pSource) = 0;
00113
00115 virtual void SourceRemoveNotification(iSndSysSource *pSource) = 0;
00116 };
00117
00118
00120 struct iSndSysRendererSoftware : public virtual iBase
00121 {
00122 SCF_INTERFACE(iSndSysRendererSoftware,0,1,1);
00123
00125
00126
00127
00128
00129
00130
00131 virtual bool AddOutputFilter(SndSysFilterLocation Location, iSndSysSoftwareOutputFilter *pFilter) = 0;
00132
00134
00135
00136
00137
00138 virtual bool RemoveOutputFilter(SndSysFilterLocation Location, iSndSysSoftwareOutputFilter *pFilter) = 0;
00139 };
00140
00141
00143 struct iSndSysRendererOpenAL : public virtual iBase
00144 {
00145 SCF_INTERFACE(iSndSysRendererOpenAL,0,1,1);
00146
00152 virtual bool LockWait() = 0;
00153
00158 virtual void Release() = 0;
00159 };
00160
00161
00164 #endif // __CS_SNDSYS_RENDERER_H__