MCPcopy Create free account
hub / github.com/SFML/SFML / getCone

Method getCone

src/SFML/Audio/SoundSource.cpp:243–257  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

241
242////////////////////////////////////////////////////////////
243SoundSource::Cone SoundSource::getCone() const
244{
245 if (const auto* sound = static_cast<const ma_sound*>(getSound()))
246 {
247 float innerAngle = 0.f;
248 float outerAngle = 0.f;
249 Cone cone;
250 ma_sound_get_cone(sound, &innerAngle, &outerAngle, &cone.outerGain);
251 cone.innerAngle = radians(innerAngle);
252 cone.outerAngle = radians(outerAngle);
253 return cone;
254 }
255
256 return Cone{radians(0), radians(0), 0.f};
257}
258
259
260////////////////////////////////////////////////////////////

Callers 1

SoundSource.cppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected