Issues with seek/tell
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Issues with seek/tell
The attatched .love files behave very differently using ogg and wav; the ogg won't loop at 44100 samples..
- Attachments
-
- strmwav.love
- using wav
- (268.86 KiB) Downloaded 107 times
-
- strm.love
- using ogg
- (268.86 KiB) Downloaded 120 times
Re: Issues with seek/tell
The Source object does not have methods like tell or seek (so it generates errors for me). Use something like this:NÖÖB wrote:The attatched .love files behave very differently using ogg and wav; the ogg won't loop at 44100 samples..
Code: Select all
function love.load()
Loop = love.audio.newSource("440.ogg","static")
Loop:setLooping(true)
Loop:play()
end
function love.update(dt)
end
function love.draw()
end
Check out the Source object documentation: http://love2d.org/wiki/Source
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Issues with seek/tell
See https://bitbucket.org/rude/love/src/9ca ... s.txt#cl-8.miko wrote:The Source object does not have methods like tell or seek (so it generates errors for me).
:seek and :tell were added for 0.8.0, so apparently our friend NÖÖB is running that instead of 0.7.2.
Help us help you: attach a .love.
Re: Issues with seek/tell
Ops, right (the nickname was misleading ). Anyways, the 0.7.2 solution also works for 0.8.0.Robin wrote:See https://bitbucket.org/rude/love/src/9ca ... s.txt#cl-8.miko wrote:The Source object does not have methods like tell or seek (so it generates errors for me).
:seek and :tell were added for 0.8.0, so apparently our friend NÖÖB is running that instead of 0.7.2.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Re: Issues with seek/tell
I'm actually trying to keep a record of how many times a sound has looped, which you can't do with setLooping..
Here's some weird stuff.. I was thinking about buffers and how that would effect seamless looping, and I don't know why, but when I increment the offset by 32 every loop, more often than not, it sounds pretty seamless - check the attatched love
Here's some weird stuff.. I was thinking about buffers and how that would effect seamless looping, and I don't know why, but when I increment the offset by 32 every loop, more often than not, it sounds pretty seamless - check the attatched love
- Attachments
-
- stream.love
- (12.97 KiB) Downloaded 135 times
Who is online
Users browsing this forum: No registered users and 2 guests