I cant get my audio to play

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.
Post Reply
User avatar
justthoseguys12
Prole
Posts: 13
Joined: Fri Nov 22, 2024 7:18 pm

I cant get my audio to play

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
:neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko:
thesandrobrito
Prole
Posts: 4
Joined: Sat Nov 23, 2024 3:14 pm

Re: I cant get my audio to play

Post by thesandrobrito »

Try cowbellyaudio:play() instead of love.audio.play(cowbellyaudio)
User avatar
justthoseguys12
Prole
Posts: 13
Joined: Fri Nov 22, 2024 7:18 pm

Re: I cant get my audio to play

Post by justthoseguys12 »

that dident work but thanks for trying
:neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko:
thesandrobrito
Prole
Posts: 4
Joined: Sat Nov 23, 2024 3:14 pm

Re: I cant get my audio to play

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?
User avatar
justthoseguys12
Prole
Posts: 13
Joined: Fri Nov 22, 2024 7:18 pm

Re: I cant get my audio to play

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
:neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :3 :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko: :neko:
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 6 guests