Hello,
I have a problem loading sounds by audio.loadStream when I get the file names by reading the file names from a text document.
If I define the audio file names in a string array, I can load the sounds without problem, but when I read them from file, I dont get an error but the sounds dont play.
for eg:
if I do as below, it works without a problem:
soundFNameStrings[1] = "abc1.ogg"
soundFNameStrings[2] = "abc2.ogg"
...
but if I do as below, the sounds doesnt play:
path = system.pathForFile( "filenames.txt", system.ResourceDirectory)
fh = io.open( path )
fileCount = 1
for line in fh:lines() do
soundFNameStrings[fileCount] = tostring(line)
fileCount = fileCount + 1
end
We can think, I have a problem getting filenames, but I checked it also. Just before loading the sounds, I displayed all the soundFNameStrings on the screen for both cases, They are fully same. But first is working, second is not.
What can be the problem?
Thanks. [import]uid: 183134 topic_id: 34811 reply_id: 334811[/import]