This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
VideoFileWriter.WriteAudioFrame - issue with stereo signal (3.8.2 prerelese) #1353
Open
1 of 3 tasks
What would you like to submit? (put an 'x' inside the bracket that applies)
Issue description
Hi,
Adding signal to video works fine if mono is used, but a bug appears when stereo input is used (stereo sound is two times slower and has a lot of distortion).
Here is the code:
I dug into Accord sources a little bit and found that in method VideoFileWriter.send_audio_frame number of channel isn't taken into account properly. In a row
size_t sampleSize = m_input_audio_sample_size;
sampleSize is assigned to 4 (I think it should be 8 bytes in case of stereo data)
If multiply it by m_input_audio_channels then stereo signal is written to file properly.
Maybe this bug also can be fixed by updating Singal.SampleSize property (it returns 4 bytes for stereo signal).
The text was updated successfully, but these errors were encountered: