* Free the data associated with this audio sample
*/
void free_data() {
- if ( _data ) free( _data ); _data = NULL;
+ if ( _data != NULL ) free( _data ); _data = NULL;
}
/**
_orientation = ori; _changed = true;
}
+ inline void set_rotation( const SGQuatd& ec2body ) {
+ _rotation = ec2body; _changed = true;
+ }
+
/**
* Set direction of this sound relative to the orientation.
* This is in the same coordinate system as OpenGL; y=up, z=back, x=right
SGVec3f _orivec; // orientation vector for OpenAL
SGVec3d _base_pos; // base position
+ SGQuatd _rotation;
+
std::string _refname; // name or file path
unsigned char* _data;