mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 01:49:44 +00:00
fix audio input device settings
This commit is contained in:
parent
f30b5f84d0
commit
a99c6aa8e0
4 changed files with 21 additions and 4 deletions
|
|
@ -205,12 +205,17 @@ void audio::initialize(
|
|||
return;
|
||||
}
|
||||
if (enabled) {
|
||||
logger.info() << "recording enabled; input device is "
|
||||
<< settings.inputDevice.get();
|
||||
const auto& targetDevice = settings.inputDevice.get();
|
||||
logger.info() << "recording enabled; target input device is "
|
||||
<< (targetDevice.empty() ? "not specified"
|
||||
: targetDevice);
|
||||
::input_device = backend->openInputDevice(
|
||||
settings.inputDevice.get(), 44100, 1, 16
|
||||
);
|
||||
::input_device->startCapture();
|
||||
if (::input_device != nullptr) {
|
||||
logger.error() << "could not create input device";
|
||||
::input_device->startCapture();
|
||||
}
|
||||
} else {
|
||||
if (::input_device) {
|
||||
::input_device->stopCapture();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue