mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-14 15:31:49 +00:00
fix
This commit is contained in:
parent
7dca9255df
commit
d41167fd72
1 changed files with 6 additions and 2 deletions
|
|
@ -184,7 +184,9 @@ void audio::initialize(bool enabled, AudioSettings& settings) {
|
||||||
}
|
}
|
||||||
|
|
||||||
input_device = backend->openInputDevice(44100, 1, 16);
|
input_device = backend->openInputDevice(44100, 1, 16);
|
||||||
input_device->startCapture();
|
if (input_device) {
|
||||||
|
input_device->startCapture();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InputDevice* audio::get_input_device() {
|
InputDevice* audio::get_input_device() {
|
||||||
|
|
@ -467,7 +469,9 @@ void audio::reset_channel(int index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void audio::close() {
|
void audio::close() {
|
||||||
input_device->stopCapture();
|
if (input_device) {
|
||||||
|
input_device->stopCapture();
|
||||||
|
}
|
||||||
speakers.clear();
|
speakers.clear();
|
||||||
delete backend;
|
delete backend;
|
||||||
backend = nullptr;
|
backend = nullptr;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue