Trouble loading audio from subdirectory

I'm having a devil of a time getting my audio to load from a subdirectory using an xml playlist. Here's my code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
for i=1, #song do
                songs[i] = {
                        artist = song[i].child[1].value,
                        album = song[i].child[2].value,
                        title = song[i].child[3].value,
                        songStream = audio.loadStream(song[i].child[3].value, 'drake_take_care/' .. song[i].child[3].value)
                }
                
                print( "\n--------------------------------------------------" )
                print( "Artist:  ", songs[i].artist )
                print( "Album:   ", songs[i].album )
                print( "Title:   ", songs[i].title )
                print( "SongStream: ", songs[i].songStream )
        end

try this line instead of line 6

1
songStream = audio.loadStream("drake_take_care/"..song[i].child[3].value)

Man, I appreciate your help. That worked. I have another question that's not really a Corona question, but I've been going back and forth with in my mind. Would I be better off with a JSON Playlist over an XML one? Or does it really not even matter?

sorry, i don't know which is the best way,
i didn't worked with a JSON playlist or with an xml one . as i didn't have a game required a playlist yet ....

The "Best" way is the one that suits your needs. There is no defined "best" per se.

Appreciate it Danny. Thanks as well to you akamel for all you have done

views:1505 update:2012/1/13 9:04:04
corona forums © 2003-2011