- _mgr = sndmgr;
- if ( (_sample = _mgr->find(_name)) == NULL ) {
- // FIXME: Does it make sense to overwrite a previous entry's
- // configuration just because a new entry has the same name?
- // Note that we can't match on identical "path" because we the
- // new entry could be at a different location with different
- // configuration so we need a new sample which creates a new
- // "alSource". The semantics of what is going on here seems
- // confused and needs to be thought through more carefully.
- _sample = new SGSoundSample( path.c_str(),
- node->getStringValue("path", "") );
-
- _mgr->add( _sample, _name );
- }
-
- _sample->set_offset_pos( offset_pos );
- _sample->set_orientation(dir, inner, outer, outer_gain);
- _sample->set_volume(v);
+ _sgrp = sgrp;
+ _sample = new SGSoundSample( path.c_str(), node->getStringValue("path", ""));
+ _sample->set_relative_position( offset_pos );
+ _sample->set_direction( dir );
+ _sample->set_audio_cone( inner, outer, outer_gain );