Skip to content

Commit

Permalink
Fixes the recording when 24bit format is requested
Browse files Browse the repository at this point in the history
  • Loading branch information
crsib committed Nov 3, 2023
1 parent b7fc52d commit 31d94b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/lib-audio-io/AudioIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,13 @@ bool AudioIO::StartPortAudioStream(const AudioIOStartStreamOptions &options,
// unpacking unaligned bytes and would be inefficient.
// ANSWER ME: is floatSample 64 bit on 64 bit machines?
if (captureFormat == int24Sample)
{
captureFormat = floatSample;
// mCaptureFormat is overwritten before the call to
// StartPortAudioStream. So the hack with captureFormat_saved is
// still working (assuming it worked before).
mCaptureFormat = captureFormat;
}

mNumPlaybackChannels = numPlaybackChannels;
mNumCaptureChannels = numCaptureChannels;
Expand Down

0 comments on commit 31d94b8

Please sign in to comment.