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.
-
justthoseguys12
- Prole
- Posts: 13
- Joined: Fri Nov 22, 2024 7:18 pm
Post
by justthoseguys12 »
the audio for the code won't play even though there is a love.audio.play here is the code and the file
Code: Select all
function love.load()
whale = love.graphics.newImage("whale.jpg")
follow = love.graphics.newImage("follow.png")
gofollow = love.graphics.newImage("Go follow.png")
cowbelly = love.graphics.newVideo("Cowbelly.ogv")
cowbellyaudio = love.audio.newSource("cowbelly.mp3", "static")
love.audio.play(cowbellyaudio)
love.window.setFullscreen(true, "desktop")
end
function love.draw()
love.graphics.draw(whale, 300, 200)
love.graphics.draw(follow, 200, 500)
love.graphics.draw(gofollow, 200, 100)
love.graphics.draw(cowbelly, 700, 100)
cowbelly:play()
end
function love.keypressed(key, scancode, isrepeat)
if key == "escape" then
love.event.quit()
end
end
-
thesandrobrito
- Prole
- Posts: 4
- Joined: Sat Nov 23, 2024 3:14 pm
Post
by thesandrobrito »
Try cowbellyaudio:play() instead of love.audio.play(cowbellyaudio)
-
thesandrobrito
- Prole
- Posts: 4
- Joined: Sat Nov 23, 2024 3:14 pm
Post
by thesandrobrito »
strange, that worked for me with my audio. Could it be a problem of the audio file? have you tried another one?
-
justthoseguys12
- Prole
- Posts: 13
- Joined: Fri Nov 22, 2024 7:18 pm
Post
by justthoseguys12 »
yes i changed it to ogg file and it might just be a problem on this computer so i can try a diffrent computer and i will update you on it later
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests