MCPcopy Create free account
hub / github.com/ddnet/ddnet / SetChannel

Method SetChannel

src/engine/client/sound.cpp:746–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

744}
745
746void CSound::SetChannel(int ChannelId, float Vol, float Pan)
747{
748 dbg_assert(ChannelId >= 0 && ChannelId < NUM_CHANNELS, "ChannelId invalid");
749
750 const CLockScope LockScope(m_SoundLock);
751 m_aChannels[ChannelId].m_Vol = (int)(Vol * 255.0f);
752 m_aChannels[ChannelId].m_Pan = (int)(Pan * 255.0f); // TODO: this is only on and off right now
753}
754
755void CSound::SetListenerPosition(vec2 Position)
756{

Callers 1

UpdateChannelsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected