Hi,
I'm beginner to NAudio. I'm working on tutorial 6 ... and made some change to test.
So, i now have sourceStream_DataAvailable handler that fire event on a microphone source stream.
I implement a TestWaveStream derived from WaveStream. My sourceStream_DataAvailable handler Send his recorded buffer to TestWaveStream .... (i'll add effect here in the future)
Then i have a WaveOut Stream linked to TestWaveStream. In the read function, i want to pass the data that i previously aquire in sourceStream_DataAvailable.
for both stream in and out, i 'm using WaveFormat 16000Khz, 16 bits, one channel.
Here, i have a problem because in the Read function, lenght are not the same for in and out.
I mean : the buffer in sourceStream_DataAvailable has a 3200 bytes lenght and in the read function, the argument buffer has a 2560 bytes lenght and a 1280 offset. So i don't understand why the buffer in the read function doesn't has a lenght of 3200, then i could copy input buffer to output one directly.
Did i miss something ? could someone explain me ?
thanks
I'm beginner to NAudio. I'm working on tutorial 6 ... and made some change to test.
So, i now have sourceStream_DataAvailable handler that fire event on a microphone source stream.
I implement a TestWaveStream derived from WaveStream. My sourceStream_DataAvailable handler Send his recorded buffer to TestWaveStream .... (i'll add effect here in the future)
Then i have a WaveOut Stream linked to TestWaveStream. In the read function, i want to pass the data that i previously aquire in sourceStream_DataAvailable.
for both stream in and out, i 'm using WaveFormat 16000Khz, 16 bits, one channel.
Here, i have a problem because in the Read function, lenght are not the same for in and out.
I mean : the buffer in sourceStream_DataAvailable has a 3200 bytes lenght and in the read function, the argument buffer has a 2560 bytes lenght and a 1280 offset. So i don't understand why the buffer in the read function doesn't has a lenght of 3200, then i could copy input buffer to output one directly.
Did i miss something ? could someone explain me ?
thanks