mirror of https://github.com/bjornbytes/lovr.git
oops
This commit is contained in:
parent
5fcaad9bde
commit
46e9ae8ef5
|
@ -39,6 +39,7 @@ static int l_lovrSoundDataRead(lua_State* L) {
|
|||
SoundData* source = luax_checktype(L, 1, SoundData);
|
||||
int index = 2;
|
||||
SoundData* dest = luax_totype(L, index, SoundData);
|
||||
if (dest) index++;
|
||||
size_t frameCount = lua_type(L, index) == LUA_TNUMBER ? lua_tointeger(L, index++) : lovrSoundDataGetDuration(source);
|
||||
size_t offset = dest ? luaL_optinteger(L, index, 0) : 0;
|
||||
bool shouldRelease = false;
|
||||
|
|
|
@ -205,7 +205,7 @@ bool lovrAudioInitDevice(AudioType type) {
|
|||
|
||||
if (type == AUDIO_CAPTURE) {
|
||||
lovrRelease(SoundData, state.captureStream);
|
||||
state.captureStream = lovrSoundDataCreateStream(state.config[type].sampleRate * 1.0, CAPTURE_CHANNELS, state.config[type].sampleRate, OUTPUT_FORMAT);
|
||||
state.captureStream = lovrSoundDataCreateStream(state.config[type].sampleRate * 1.0, CAPTURE_CHANNELS, state.config[type].sampleRate, state.config[type].format);
|
||||
if (!state.captureStream) {
|
||||
lovrLog(LOG_WARN, "audio", "Failed to init audio device %d\n", type);
|
||||
lovrAudioDestroy();
|
||||
|
|
Loading…
Reference in New Issue