android
  #1  
Old 08-23-2011, 12:06 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default 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.

Last edited by jbob182; 08-23-2011 at 06:43 PM.
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 08-23-2011, 04:42 PM
delirius delirius is offline
Member
 
Join Date: Feb 2010
Posts: 131
Default

I don't understand that much, but good lack
Reply With Quote

  #3  
Old 08-23-2011, 06:40 PM
jbob182's Avatar
jbob182 jbob182 is offline
X-Fi2 Development Moderator
 
Join Date: Feb 2010
Location: The U.S.A.
Posts: 554
Default

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.
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 02:28 AM.