Search found 57 matches

by Dr. Peeps
Mon Feb 13, 2017 8:56 pm
Forum: Support and Development
Topic: LÖVE and mobile screen lock
Replies: 1
Views: 1375

LÖVE and mobile screen lock

Does LÖVE prevent the screen lock from kicking in on mobile devices (Android/iOS) by default? My app is totally "hands-free" because it only uses audio as input, and I don't want screen savers and the like coming on just because the computer/device thinks no one is there. Now that I think ...
by Dr. Peeps
Thu Feb 02, 2017 11:21 pm
Forum: Libraries and Tools
Topic: Microphone Support for LÖVE!
Replies: 62
Views: 44392

Re: Microphone Support for LÖVE!

And besides, is not like you want to crash your game just because your selected format is not supported. Just goes to show that you do not hard-code things that may or may not be supported. Yes, that's my point. :) I don't want to crash the game and I don't want to hardcode a single option; I want ...
by Dr. Peeps
Thu Feb 02, 2017 10:14 pm
Forum: Libraries and Tools
Topic: Microphone Support for LÖVE!
Replies: 62
Views: 44392

Re: Microphone Support for LÖVE!

It will fail to start recording, that's pretty simple. Sure, but I'd like to find out what the problem was and respond to it programmatically. It looks like "AL lib: (EE) ALCdsoundCapture_open: Device init failed: 0x80070057" gets dumped to output when the call to RecordingDevice:start() ...
by Dr. Peeps
Thu Feb 02, 2017 6:11 am
Forum: Libraries and Tools
Topic: Microphone Support for LÖVE!
Replies: 62
Views: 44392

Re: Microphone Support for LÖVE!

OpenAL internally updates at under 50 frames per second. The amount of samples updated per frame is usually at cyclically repeating irregular intervals, e.g. 342 on odd frames and 558 on even frames. That's useful information. I did notice the fluctuating sample counts. Also you're reading the data...
by Dr. Peeps
Thu Feb 02, 2017 2:06 am
Forum: Libraries and Tools
Topic: Microphone Support for LÖVE!
Replies: 62
Views: 44392

Re: Microphone Support for LÖVE!

inputs[1]:start(buffersize, 11025, 16, 1) ... -- update loop if inputs[1]:getSampleCount( ) == buffersize then data = inputs[1]:getData ( ) end I've been trying to find the optimal sample rate / buffer size for my app, and I'm getting some interesting results. In the above code, if I set buffersize...
by Dr. Peeps
Sun Jan 29, 2017 8:48 pm
Forum: Libraries and Tools
Topic: Microphone Support for LÖVE!
Replies: 62
Views: 44392

Re: Microphone Support for LÖVE!

No, it will simply return nil if it couldn't read from the input, which it can't unless it reports there being some samples buffered. When it does reads, it also automatically clears the buffer, so you never get the old data from it, it's always newly captures samples (if any). If you fail to read ...
by Dr. Peeps
Sun Jan 29, 2017 8:03 pm
Forum: Libraries and Tools
Topic: Microphone Support for LÖVE!
Replies: 62
Views: 44392

Re: Microphone Support for LÖVE!

You are correct, the data stays in the buffer until you call getData. To explain input buffer overflow behavior in more comprehensible terms, when it fills up completely, whenever new sample is added at its head, one sample is discarded at its tail. Yes, I think I understand. With LÖVE's getData() ...
by Dr. Peeps
Sun Jan 29, 2017 3:27 am
Forum: Libraries and Tools
Topic: Microphone Support for LÖVE!
Replies: 62
Views: 44392

Re: Microphone Support for LÖVE!

The "samples" argument says you want the recording buffer to be this long. It acts as a circular buffer so that translates to about "keep this many samples recorded". If you fail to read out the data and the buffer fills up, it'll keep recording but it'll overwrite itself and yo...
by Dr. Peeps
Sun Jan 29, 2017 1:15 am
Forum: Libraries and Tools
Topic: Microphone Support for LÖVE!
Replies: 62
Views: 44392

Re: Microphone Support for LÖVE!

function love.update ( ) if inputs[ 1 ]:getSampleCount ( ) > inputs[ 1 ]:getSampleRate ( ) / 20 then local data = inputs[ 1 ]:getData ( ) ... Can I ask what the "/ 20" is for in the above if statement? Is it basically limiting the getData() calls to 20 times per second? Also, the paramete...
by Dr. Peeps
Wed Jan 18, 2017 1:17 am
Forum: Support and Development
Topic: SoundQueues
Replies: 68
Views: 33023

Re: SoundQueues

You could attempt to add it to openal. It would be a learning experience for you if you haven't done anything like that before. It's probably not that hard. I'm sure it's possible, but it's the time involved that concerns me. My decision to use Love in the first place was in an effort to cut develo...