TEsound - simple, easy sound/music manager

Showcase your libraries, tools and other projects that help your fellow love users.

Awesome?

Yes! Thank you!
54
75%
Yes, but I don't need it.
16
22%
No. (Please tell me why)
2
3%
 
Total votes: 72

User avatar
Codex
Party member
Posts: 106
Joined: Tue Mar 06, 2012 6:49 am

Re: TEsound - simple, easy sound/music manager

Post by Codex »

Can someone upload a simple .love file showing how to use this? :oops:
munchor
Prole
Posts: 39
Joined: Sun Jun 10, 2012 4:28 pm

Re: TEsound - simple, easy sound/music manager

Post by munchor »

Codex wrote:Can someone upload a simple .love file showing how to use this? :oops:
It'd look like this:

main.lua

Code: Select all

require "TEsound.lua"

function love.load()
end

function love.update(dt)
  TEsound.play("sounds/beep.ogg"

  TEsound.cleanup()
end

function love.draw()
end
Include "TEsound.lua" and "beep.ogg" on same directory and it'll play a beep nonstop.

-----

I have a problem with TEsound... Basically, the first time I play a certain sound it takes a while to load (like 3 seconds), but after that, I can play it all the time.

Is there any way to preload the sound? Here's what I'm doing on love.load():

Code: Select all

mineralSound = love.sound.newSoundData("sounds/plink.ogg")
And on love.update():

Code: Select all

TEsound.play(mineralSound)
TEsound.cleanup()
I have lots of other code, but it's more or less like that.

Thank you!

(playing the sound when the game opens works, but that's not really a good way around it, because it implies putting the volume to 0, and then set the volume again.)

How can I solve it nicely?
User avatar
Codex
Party member
Posts: 106
Joined: Tue Mar 06, 2012 6:49 am

Re: TEsound - simple, easy sound/music manager

Post by Codex »

Tried to use this a little while ago. .ogg files seem to convert differently than other files? I was trying to loop a 15 sec bgm over and over again. The result was some tangled mesh of the former song...

:o:

(edit: I just tried switching the bgm to a mp3 and it sounded the same??? - :( )
Attachments
bgm_test.love
(587.48 KiB) Downloaded 492 times
User avatar
georgeprosser
Citizen
Posts: 68
Joined: Fri Mar 28, 2014 5:55 pm

Re: TEsound - simple, easy sound/music manager

Post by georgeprosser »

Hi, is TEsound updated to work with 0.9?

And is there any way to start a sound playing from a certain point? (I want to jump to a 'parallel' version of the same song when the game is paused.)
User avatar
Jeeper
Party member
Posts: 611
Joined: Tue Mar 12, 2013 7:11 pm
Contact:

Re: TEsound - simple, easy sound/music manager

Post by Jeeper »

georgeprosser wrote:Hi, is TEsound updated to work with 0.9?
Yes it is compatible to 0.9
georgeprosser wrote: And is there any way to start a sound playing from a certain point? (I want to jump to a 'parallel' version of the same song when the game is paused.)
I am not sure, but one way would be to edit it on the audio file, ie have the file start where you want it to start.
User avatar
murks
Party member
Posts: 185
Joined: Tue Jun 03, 2014 4:18 pm

Re: TEsound - simple, easy sound/music manager

Post by murks »

Bug: It seems like TEsound.play() can't handle tables at all.
drunken_munki
Party member
Posts: 134
Joined: Tue Mar 29, 2011 11:05 pm

Re: TEsound - simple, easy sound/music manager

Post by drunken_munki »

nil
Last edited by drunken_munki on Mon Feb 09, 2015 6:44 pm, edited 1 time in total.
User avatar
SiENcE
Party member
Posts: 806
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: TEsound - simple, easy sound/music manager

Post by SiENcE »

I modified TEsound to support audio sources. This way you can modify audio sources via the LÖVE source commands for positional Audio. You can change Pitch and maybe implement the OpenAL Doppler Effect.

I also introduced this switches to globally enable or disable sounds/music (Streams).

Code: Select all

TEsound.sound = true
TEsound.music = true
OpenAL EFXs are currently not supported.
JaredSartin
Prole
Posts: 9
Joined: Wed Jul 09, 2014 2:22 pm

Re: TEsound - simple, easy sound/music manager

Post by JaredSartin »

Is this (or can it be) on github? I would love to contribute and track changes!
User avatar
SiENcE
Party member
Posts: 806
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: TEsound - simple, easy sound/music manager

Post by SiENcE »

It's on github as i posted https://github.com/SiENcE/love2d_gamete ... Esound.lua

But currently only in my game template. I create another github tomorrow for only TESound, so you can contribute. Ok :) ?
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 4 guests