/* * call-seq: * clone( other ) -> sound * dup( other ) -> sound * * Create a copy of the given Sound instance. Much more memory-efficient * than using #load to load the sound file again. * * other:: An existing Sound instance. (Sound, required) * * Returns:: The new Sound instance. (Sound) * * **NOTE**: #clone and #dup do slightly different things; #clone will copy * the 'frozen' state of the object, while #dup will create a fresh, un-frozen * object. * */ static VALUE rg_sound_initialize_copy( VALUE self, VALUE other ) { RG_Sound *soundA, *soundB; Data_Get_Struct(self, RG_Sound, soundA); Data_Get_Struct(other, RG_Sound, soundB); _rg_sound_copy( soundA, soundB ); return self; }