Hi @rapadovani,
This may work for you also as will ingemar’s solution…
[code]
local audioFile = nil;
local audio_1 = nil;
audioFile = audio.loadSound(“expl_ogg.ogg”) – or whatever sound format you use
– more simple is just check for nil
– like: if(audiofile == nil) then …etc…
– can’t use the word audio because reserved for corona API
if(audioFile == audio_1 ) then
– sound file not found / loaded
print(“Audio Not Loaded!..”, audioFile);
else
– audioFile will return a handle to the sound file Will show up as: userdata: #########
– where userdata is just a memory placement and ####### is where in memory it’s at (or pointer)
– which by the by will always be greater than nil which equals 0 more or less
– hope this helps…
print(“Audio Found and Loaded!..”, audioFile);
end
[import]uid: 107633 topic_id: 20370 reply_id: 79708[/import]