Thanks for the reply Rob
The thing is that I have a class called Tracks that selects a folder based on witch instrument the user are playing and the dir is a global var
[lua] _G.soundDir [/lua]
and I have a table inside the class like this (I stripped away unnecessary stuff just for clearance)
[lua]
Track.instanceTable = {
[1] = {
--Much stuff happens here
soundDir = “/Piano”,
},
}[/lua]
so if the current instrument is piano the variable changes to:
[lua]
_G.soundDir = Track.instanceTable[1].soundDir
[/lua]
Now, inside another class called Flute I pick up the change in the variable _G.soundDir like this:
[lua]
function Flute:changeSound()
COver.snd = audio.loadSound( “Sound” … _G.soundDir … “/flPinCOver-hd.mp3”)
DOver.snd = audio.loadSound( “Sound” … _G.soundDir … “/flPinDOver-hd.mp3” )
EOver.snd = audio.loadSound( “Sound” … _G.soundDir … “/flPinEOver-hd.mp3”)
FOver.snd = audio.loadSound( “Sound” … _G.soundDir … “/flPinFOver-hd.mp3” )
GOver.snd = audio.loadSound( “Sound” … _G.soundDir … “/flPinGOver-hd.mp3” )
AOver.snd = audio.loadSound( “Sound” … _G.soundDir … “/flPinAOver-hd.mp3” )
HOver.snd = audio.loadSound( “Sound” … _G.soundDir … “/flPinHOver-hd.mp3” )
C2Over.snd = audio.loadSound( “Sound” … _G.soundDir … “/flPinC2Over-hd.mp3” )
return true
end
[/lua]
The result is that the user can play the malor scale with different sounds on the flute (piano, guitar, bass) from the according folders:
Sound/Piano
Sound/Guitar
Sound/Bass
This works perfect in simulator but in build I get no error, just no sound at all
Keep in mind that I stripped away much stuff here but I feel the main issue here is folder reference that I do wrong maybe