Sound& Sound::operator =(const Sound& right) { // Here we don't use the copy-and-swap idiom, because it would mess up // the list of sound instances contained in the buffers // Detach the sound instance from the previous buffer (if any) if (myBuffer) { Stop(); myBuffer->DetachSound(this); myBuffer = NULL; } // Copy the sound attributes if (right.myBuffer) SetBuffer(*right.myBuffer); SetLoop(right.GetLoop()); SetPitch(right.GetPitch()); SetVolume(right.GetVolume()); SetPosition(right.GetPosition()); SetRelativeToListener(right.IsRelativeToListener()); SetMinDistance(right.GetMinDistance()); SetAttenuation(right.GetAttenuation()); return *this; }
SoundEmitter::SoundEmitter(const SoundEmitter& emitter) { alGenSources(1, &m_source); SetAttenuation(emitter.GetAttenuation()); SetMinDistance(emitter.GetMinDistance()); SetPitch(emitter.GetPitch()); // No copy for position or velocity SetVolume(emitter.GetVolume()); }
NzSoundEmitter::NzSoundEmitter(const NzSoundEmitter& emitter) { alGenSources(1, &m_source); SetAttenuation(emitter.GetAttenuation()); SetMinDistance(emitter.GetMinDistance()); SetPitch(emitter.GetPitch()); // Pas de copie de position ou de vitesse SetVolume(emitter.GetVolume()); }
Femtocell::Femtocell(int idCell, double side, double X, double Y) { SetIdCell(idCell); SetSide(side); SetMinDistance(0.0); CartesianCoordinates *Position = new CartesianCoordinates(X,Y); SetCellCenterPosition(Position); }
//////////////////////////////////////////////////////////// /// Set the minimum distance - closer than this distance, /// the listener will hear the music at its maximum volume. /// The default minimum distance is 1.0 //////////////////////////////////////////////////////////// void sfMusic_SetMinDistance(sfMusic* Music, float MinDistance) { CSFML_CALL(Music, SetMinDistance(MinDistance)); }