fix
This commit is contained in:
parent
7dca9255df
commit
d41167fd72
@ -184,8 +184,10 @@ void audio::initialize(bool enabled, AudioSettings& settings) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
input_device = backend->openInputDevice(44100, 1, 16);
|
input_device = backend->openInputDevice(44100, 1, 16);
|
||||||
|
if (input_device) {
|
||||||
input_device->startCapture();
|
input_device->startCapture();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
InputDevice* audio::get_input_device() {
|
InputDevice* audio::get_input_device() {
|
||||||
return input_device.get();
|
return input_device.get();
|
||||||
@ -467,7 +469,9 @@ void audio::reset_channel(int index) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void audio::close() {
|
void audio::close() {
|
||||||
|
if (input_device) {
|
||||||
input_device->stopCapture();
|
input_device->stopCapture();
|
||||||
|
}
|
||||||
speakers.clear();
|
speakers.clear();
|
||||||
delete backend;
|
delete backend;
|
||||||
backend = nullptr;
|
backend = nullptr;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user