mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
minor refactor
This commit is contained in:
parent
6df27b8992
commit
001c1b430b
5 changed files with 9 additions and 11 deletions
|
|
@ -533,11 +533,11 @@ std::vector<std::string> ALAudio::getOutputDeviceNames() {
|
|||
}
|
||||
|
||||
std::unique_ptr<InputDevice> ALAudio::openInputDevice(
|
||||
const char* deviceName, uint sampleRate, uint channels, uint bitsPerSample
|
||||
const std::string& deviceName, uint sampleRate, uint channels, uint bitsPerSample
|
||||
) {
|
||||
uint bps = bitsPerSample >> 3;
|
||||
ALCdevice* device = alcCaptureOpenDevice(
|
||||
deviceName,
|
||||
deviceName.empty() ? nullptr : deviceName.c_str(),
|
||||
sampleRate,
|
||||
AL::to_al_format(channels, bitsPerSample),
|
||||
sampleRate * channels * bps / 8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue