Hi,
I found old (since 2003 ?) small bugs in MakeAVIS mode "store uncompressed audio".
1. in function convertToAVI, around line 666:
Code:
// wfx->wBitsPerSample=WORD((avs_samples_per_second(vi)/avs_audio_channels(vi))<<3); // wrong
wfx->wBitsPerSample=WORD((avs_bytes_per_audio_sample(vi)/avs_audio_channels(vi))<<3); // must be
2. in same function, around line 687:
Code:
// LONG rawaudiolen=LONG((asample[1]-asample[0]+1)*avs_samples_per_second(vi)); // wrong
LONG rawaudiolen=LONG((asample[1]-asample[0]+1)*avs_bytes_per_audio_sample(vi)); // must be
3. in function showProps, aroun line 909
Code:
// sprintf(pomS,"Bits per sample: %i",(avs_samples_per_second(vi)/avs_audio_channels(vi))<<3); // wrong
sprintf(pomS,"Bits per sample: %i",(avs_bytes_per_audio_sample(vi)/avs_audio_channels(vi))<<3); // must be
This way makeAVIS works fine in "store uncompressed audio" mode, but only if Bits per Sample is 8 or 16.
For 32 bit (integer or float) audio it produces non-playable avi.
Next fix should be else disable this mode (disable checkbox ?)
or implement internal (or Avisynth) resampling to 16 bit.
I am not guru of windows messages and controls.
Please put my "patch" to SVN