TheNut

Feb 1 at 10:45 PM

Hey Christoph,

Just wanted to let you know there's a bug in the SpeexEncoder class where the VBR property is always set to true:

/// 
/// Turns encoding in variable bit rate on or off.
/// 
public bool VBR
{
     get
     {
          return encoder.Vbr;
     }

     set
     {
          encoder.Vbr = true;
     }
}

I also noticed that VBR encodings don't decode properly. The Speex C++ library decodes VBR fine, but the NSpeex library produces some voodoo'ish results. It looks like the first part gets somewhat decoded (has some noise mixed in), but the remaining 2/3 audio is silence. It's not a deal-breaker as I can work with CBR, but I thought I would raise the issue if it's not already known.

Also, there's a more efficient way to copy data buffers that you've shown in your documentation. Instead of running a for-loop and bit converting each value, just use the Buffer.BlockCopy() method. It's a lot faster.

Other than that, thanks for this port. You did a good job.

Coordinator
Feb 2 at 6:50 AM

Thanks for this information! Will look into the VBR issues you found.

 

Coordinator
Feb 8 at 6:30 PM

I cannot reproduce the VBR propblems you are describing. I modified the sample to work on Vbr and I see that the encoded packets coming out of the encoder have different size. On the decoder side I am able to get a correct frame back from the decoder.

btw: thanks for the hint on the Buffer.BlockCopy (doc updated) !