Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Problem when using sound:play() and GiderosCodingEasy together — Gideros Forum

Problem when using sound:play() and GiderosCodingEasy together

edited February 2013 in General questions
@ar2rsawseen I am using GiderosCodingEasy from https://github.com/ar2rsawseen/GiderosCodingEasy

When call:
local sound_gem_0 = Sound.new("sounds/gem-0.mp3")
sound_gem_0:play()
It throws an error:
.\GiderosCodingEasy.lua:1128: table index is nil
stack traceback:
	.\GiderosCodingEasy.lua:1128: in function <.\GiderosCodingEasy.lua:1126>
If I change from self to channel it works:
function Sound:play()
	local channel = self:_play()
	if channel ~= nil then
		channel.isPlaying = true
		channel:addEventListener(Event.COMPLETE, function(channel)
			self.isPlaying = false
			application.sounds[self.id] = nil   --- Line 1128
		end, channel)
		if application.sounds == nil then
			application.sounds = {}
			application.currentSound = 1
		end
		channel.id = application.currentSound
		application.sounds[channel.id] = channel
		application.currentSound = application.currentSound + 1
		--setting global volume
		channel:setVolume(application:getVolume())
	end
	return channel
end
So could you look at this and correct the problem?
Coming soon

Comments

Sign In or Register to comment.