Skip to content

Commit 1a8827f

Browse files
convertBuffer(): clear duplex device outBuffer if outJump > inJump (#249)
1 parent d7f1276 commit 1a8827f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

RtAudio.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10399,9 +10399,8 @@ void RtApi :: convertBuffer( char *outBuffer, char *inBuffer, ConvertInfo &info
1039910399
// data interleaving/deinterleaving. 24-bit integers are assumed to occupy
1040010400
// the lower three bytes of a 32-bit integer.
1040110401

10402-
// Clear our device buffer when in/out duplex device channels are different
10403-
if ( outBuffer == stream_.deviceBuffer && stream_.mode == DUPLEX &&
10404-
( stream_.nDeviceChannels[0] < stream_.nDeviceChannels[1] ) )
10402+
// Clear our duplex device output buffer if there are more device outputs than user outputs
10403+
if ( outBuffer == stream_.deviceBuffer && stream_.mode == DUPLEX && info.outJump > info.inJump )
1040510404
memset( outBuffer, 0, stream_.bufferSize * info.outJump * formatBytes( info.outFormat ) );
1040610405

1040710406
int j;

0 commit comments

Comments
 (0)