Merge pull request #863 from LittleHuba/fix_recording_channels

Fix input channel count for audio recording
presentation
Ulrich Huber 7 years ago committed by GitHub
commit 86d5507280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/util/audio/AudioRecorder.cpp

@ -33,7 +33,8 @@ bool AudioRecorder::start(string filename)
XOJ_CHECK_TYPE(AudioRecorder);
// Start the consumer for writing the data
bool status = this->vorbisConsumer->start(std::move(filename), static_cast<unsigned int>(this->portAudioProducer->getSelectedInputDevice().getInputChannels()));
int inputChannels = std::min(2, this->portAudioProducer->getSelectedInputDevice().getInputChannels());
bool status = this->vorbisConsumer->start(std::move(filename), static_cast<unsigned int>(inputChannels));
// Start recording
status &= this->portAudioProducer->startRecording();

Loading…
Cancel
Save