Page 4 of 4

Re: A few more questions

Posted: Mon Dec 17, 2012 2:51 pm
by Santos
bartbes wrote:Which is currently done by using the same SoundData?
Ah, yes, I was going to mention how this is done in SLAM, indeed with SoundData, and if it wasn't done with SoundData there would be one less thing that SoundData could do, and therefore make it a bit cleaner conceptually I think. And it would also make caching slightly more obvious if streaming and static Sources could be cached the same way. In Zoetrope, there is this code...

Code: Select all

if length == 'short' then
	self._library.sound[path] = love.sound.newSoundData(path)
elseif length == 'long' then
	self._library.sound[path] = love.sound.newDecoder(path)
(Note that this all assumes that streaming Sources can actually be cached using Decoders, my tests before weren't successful and SLAM doesn't do this, and I haven't tested Zoetrope.)

Re: A few more questions

Posted: Mon Dec 17, 2012 3:18 pm
by Boolsheet
I just want to say that using one decoder for two things is not going to work very well with the current implementation. Not sure if you could call it a bug... I call it an unfinished thought. :)

Re: A few more questions

Posted: Mon Dec 31, 2012 9:14 pm
by Santos
Hehe, cool. :)

I assume that the buffer size of a decoder has to be a multiple of 4 because each sample uses 4 bytes, is this right?

And something completely unrelated, what is the "unit" of love.graphics.draw's shear factor?

Edit: Oh, I think I've got it, it's like it makes the hypotenuse of a right triangle with the opposite side being the adjacent side multiplied by the shear factor... uuuh... TODO: learn mathematics.