Hendrix000007

Trouble with transfer build to device through Xcode

Jun 24th, 2014
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. --MAIN:
  2. local track = require("Tracks")
  3. local flute = require("Flute")
  4. _G.trackCounter = 1 --<< instantiate a global track counter
  5. _G.soundDir = Track.instanceTable[_G.trackCounter].soundDir --<< This will result in: Track.instanceTable[1].soundDir
  6.  
  7. -- TRACK:
  8. Track = {}
  9. Track.instanceTable = {
  10.     [1] = { soundDir = "/Piano" } --<< I stripped all the code so its easier to read
  11.             }
  12.  
  13. --FLUTE:
  14. require("Tracks")
  15. local COver --<< Here goes the image file
  16. COver.snd = audio.loadSound( "Sound" .. _G.soundDir .. "/flPinCOver-hd.mp3", { channel=3, volume=100 } )
  17.  
  18. function Flute:changeSound()   
  19.     COver.snd = audio.loadSound( "Sound" .. _G.soundDir .. "/flPinCOver-hd.mp3", { channel=3, volume=100 } )
  20.     COver.name = "flPinCOver-hd.mp3"
  21.     --This will, in the simulator, return the path and soundfile: Sound/Guitar/flPinCOver-hd.mp3
  22.     return true
  23. end
Advertisement
Add Comment
Please, Sign In to add comment