MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / createVoice

Method createVoice

Engine/source/sfx/dsound/sfxDSDevice.cpp:151–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151SFXVoice* SFXDSDevice::createVoice( bool is3D, SFXBuffer *buffer )
152{
153 // Don't bother going any further if we've
154 // exceeded the maximum voices.
155 if ( mVoices.size() >= mMaxBuffers )
156 return NULL;
157
158 AssertFatal( buffer, "SFXDSDevice::createVoice() - Got null buffer!" );
159
160 SFXDSBuffer* dsBuffer = dynamic_cast<SFXDSBuffer*>( buffer );
161 AssertFatal( dsBuffer, "SFXDSDevice::createVoice() - Got bad buffer!" );
162
163 SFXDSVoice* voice = SFXDSVoice::create( this, dsBuffer );
164 if ( !voice )
165 return NULL;
166
167 _addVoice( voice );
168 return voice;
169}
170
171void SFXDSDevice::_commitDeferred()
172{

Callers 2

_allocVoiceMethod · 0.45
createMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected