Microphone input implemented.

#68 Merged at ff2f93b
Repository
Deleted repository
Branch
minor-mic-input (c0510460896f)
Repository
love
Branch
minor
Author
  1. Raidho
Reviewers
Description

RecordingDevice class added
(table)love.audio.getRecordingDevices() exposed
(bool):startRecording([samples, sampleRate, bitDepth, channels]), (SoundData):stopRecording(), (SoundData):getData(), (number):getSampleCount(), (number):getSampleRate(), (number):getBitDepth(), (number):getChannels(), (string):getName(), (number):getID(), (bool):isRecording() member functions exposed
previously existed stub implementation removed
getFormat moved to love::audio::openal::Audio as now multiple classes use it
getFormat arguments order swapped to (bitDepth, channels) to follow general convention
getFormat now returns AL_NONE if format is invalid

refer to http://hastebin.com/revohalixi.lua as basic test case

  • Commit status

Comments (1)

  1. Raidho author

    To address some possible ambiguity:

    getData removes currently recorded samples form input and puts them into new SoundData
    stopRecording stops recording process and also returns SoundData the same way getData does.
    getSampleCount returns number of samples it currently "stores" (because it doesn't actually store any data), same way as SoundData does, except that for latter it's constant and for former it's variable.
    startRecording throws errors if called with invalid parameters, but returns false if it couldn't start recording for whatever orthogonal reason.