I’m having a devil of a time getting my audio to load from a subdirectory using an xml playlist. Here’s my code:
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
and the output:
[bash]
Artist: Drake
Album: Take Care
Title: 01 Over My Dead Body.mp3
SongStream: nil
WARNING: Cannot create path for resource file ‘02 Shot For Me.mp3’. File does not exist.
WARNING: Failed to create audio sound(02 Shot For Me.mp3)
[/bash]
Not only is it not loading, but it seems to be trying to load the next song down from the xml playlist (although I’m sure that’s some programming error on my part). Any ideas?
[import]uid: 47235 topic_id: 20199 reply_id: 320199[/import]