A few more questions

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: A few more questions

Post 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.)
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: A few more questions

Post 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. :)
Shallow indentations.
Santos
Party member
Posts: 384
Joined: Sat Oct 22, 2011 7:37 am

Re: A few more questions

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 224 guests