+ if (playing) {
+ sgVec3 final_pos;
+ sgAddVec3( final_pos, source_pos, offset_pos );
+
+ alSourcefv( source, AL_POSITION, final_pos );
+ }
+}
+
+void
+SGSoundSample::set_orientation( ALfloat *dir, ALfloat inner_angle,
+ ALfloat outer_angle,
+ ALfloat outer_gain)
+{
+ inner = inner_angle;
+ outer = outer_angle;
+ outergain = outer_gain;
+ if (playing) {
+ alSourcefv( source, AL_DIRECTION, dir);
+ alSourcef( source, AL_CONE_INNER_ANGLE, inner );
+ alSourcef( source, AL_CONE_OUTER_ANGLE, outer );
+ alSourcef( source, AL_CONE_OUTER_GAIN, outergain );
+ }
+}
+
+void
+SGSoundSample::set_source_vel( ALfloat *vel ) {
+ source_vel[0] = vel[0];
+ source_vel[1] = vel[1];
+ source_vel[2] = vel[2];
+ if (playing) {
+ alSourcefv( source, AL_VELOCITY, source_vel );
+ }
+}
+
+void
+SGSoundSample::set_reference_dist( ALfloat dist ) {
+ reference_dist = dist;
+ if (playing) {
+ alSourcef( source, AL_REFERENCE_DISTANCE, reference_dist );
+ }
+}
+
+
+void
+SGSoundSample::set_max_dist( ALfloat dist ) {
+ max_dist = dist;
+ if (playing) {
+ alSourcef( source, AL_MAX_DISTANCE, max_dist );
+ }