Redefine a userdata type
Is it possible to redefine the type of a resource, i have managed to create "userdata" from a file ( after much work with newproxy, metatables, and assert), and if i can turn this userdata into a wav type then we should be able to minimize how much ram is used and play full length songs (I have loaded a 21.9mb wav file on the player, i just need to manipulate it ). (Unless there is something preventing this on the player, which has happened before)
If you use print(assert(my_loaded_wave_file)) you will see it outputs wave (some-number)
I need to convert print(assert(my_loaded_file_that_will_be_a_wave)) which outputs file (somenumber) to wave (some-number) , I have created the artificial user data and this is the last variable that stands in the way.
I don't understand that much, but good lack :)
Let me rephrase what I am asking with.... fruits and vegetables.
I have have a pea ( representing my loaded file). I want to make that pea be
1. A Fruit(userdata)
2. An Apple(a wave file)
Currently, I have convinced the player that the pea is a fruit. I now need to convince the player that my fruit-pea is an apple.
|All times are GMT -5. The time now is 02:22 PM.|