Open philburk opened 6 days ago
I replaced this assert with a new one to assert the reason rather than consequence to assist the understanding of the logic:
subtream->monoBuffer
can become NULL in that piece of logic only if this condition fails when monoBufferSize
is 0 because initially subStream->monoBufferSize
is 0 and it is set only inside this function when monoBuffer
is allocated successfully:
but it will not happen if frames
and nBlockAlign
are not 0. So for now I think assert(subtream->monoBuffer != NULL)
is no longer needed.
In a review of a WASAPI change I stated that an assert was a NOOP.
_Originally posted by @philburk in https://github.com/PortAudio/portaudio/pull/948#discussion_r1768861142_
But after rereading the code I realize that I misread line 1425. I thought it was checking "subtream->monoBuffer". But it was checking "subtream->monoMixer". So the assert(subtream->monoBuffer != NULL) actually did something.
If Dmitry wants to add it back in that is fine with me.