love.audio.play(muzik, 0) is supposed to loop the music, right? It does not for me. It plays only once.
Debian Sid, LÖVE 0.3.1
Will there be an issue tracker? Or are we supposed to use this?
[0.3.1] music doesn't loop, question about issue tracker
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
[0.3.1] music doesn't loop, question about issue tracker
- Attachments
-
- musnoloop.love
- function load()
noise = love.audio.newMusic("noise.ogg")
love.audio.play(noise, 0)
end - (262.14 KiB) Downloaded 400 times
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Re: [0.3.1] music doesn't loop, question about issue tracker
Yeah, we really need to take a closer look at love.audio. It lacks lots of features and was hacked together way too quickly.
As for bug tracking, I suppose we could use that, yes.
Thanks for pointing out the bug! When fixed, we'll most likely change it to love.audio.play(muzak, love.loop_forever) or something similar.
As for bug tracking, I suppose we could use that, yes.
Thanks for pointing out the bug! When fixed, we'll most likely change it to love.audio.play(muzak, love.loop_forever) or something similar.
Re: [0.3.1] music doesn't loop, question about issue tracker
It appears changing this:
to this:
should work according to your current docs.
Then, you could define love.loop_forever in lua as the value false, and the love.loop_once as true.
Of course, it appears that you guys aren't too worried about backwards compatibility, so I would actually change it to this:
and define loop as a number where -1 is loop infinitely, and positive numbers are a finite number of times to loop, as per the SDL_mixer docs.
Of course, this is a relatively simple fix, so I imagine it's probably just waiting on the next minor numbered release, but... I really really really would love to have functional audio, as this means I don't have to go and actually write my own 2d lua-based game engine that I've been wanting to have.
Regards, hi, first post, yadayada.
Code: Select all
(Music.cpp)
void Music::play(int loop)
{
Mix_PlayMusic(music, 0);
}
Code: Select all
void Music::play(int loop)
{
if(loop) Mix_PlayMusic(music, 1);
else Mix_PlayMusic(music, -1);
}
Then, you could define love.loop_forever in lua as the value false, and the love.loop_once as true.
Of course, it appears that you guys aren't too worried about backwards compatibility, so I would actually change it to this:
Code: Select all
void Music::play(int loop)
{
Mix_PlayMusic(music, loop);
}
Of course, this is a relatively simple fix, so I imagine it's probably just waiting on the next minor numbered release, but... I really really really would love to have functional audio, as this means I don't have to go and actually write my own 2d lua-based game engine that I've been wanting to have.
Regards, hi, first post, yadayada.
Re: [0.3.1] music doesn't loop, question about issue tracker
That's true. Not yet anyway.cag wrote:Of course, it appears that you guys aren't too worried about backwards compatibility
I can probably have 0.3.2 out in a few days with that fix if you really need it. Not sure if that qualifies for "functional audio" though. Bigger improvements to love.audio are planned too ... but will take longer.cag wrote:I really really really would love to have functional audio, as this means I don't have to go and actually write my own 2d lua-based game engine that I've been wanting to have.
lal.cag wrote:Regards, hi, first post, yadayada.
-
- Citizen
- Posts: 94
- Joined: Thu Feb 21, 2008 1:11 am
Re: [0.3.1] music doesn't loop, question about issue tracker
I have the same problem. I'm not sure that I get the point.
Is there any solution in 0.3.1 or should we wait for the next version?
Is there any solution in 0.3.1 or should we wait for the next version?
>>I love LÖVE.<<
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: [0.3.1] music doesn't loop, question about issue tracker
In My Humble Opinion©, there is no clean solution, and one should be using the function the way it was meant to be used and wait for 0.3.1.Green_Hell wrote:I have the same problem. I'm not sure that I get the point.
Is there any solution in 0.3.1 or should we wait for the next version?
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Re: [0.3.1] music doesn't loop, question about issue tracker
In fact, there was no workaround for 0.3.1, since the loop variable was never sent to SDL_mixer. 0 was always passed for Music objects.
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: [0.3.1] music doesn't loop, question about issue tracker
the workaround was to make it a sound :p
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Who is online
Users browsing this forum: No registered users and 6 guests