-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArgumentException: Must read complete blocks: requested 35310, block align is 4 #17
Comments
The problem arises with the picker, I tried different picker strategies, they all fail, but I need to get a picture of the sound wave from the file. The file is successfully converted to a WAV file from MP3 and its wave can also be obtained in the Audacity program, but I need a wave in the form of an image. I've looked at some examples of how to do this, however I need help with this issue. |
It works with the following Patch in public class WaveFormRenderer.
|
The issue arises because the ReadBuffer size in the Render function isn't a multiple of bytesPerSample. This can be easily fixed by adjusting the PixelsPerPeak size from 2 to 3 in the GetRendererSettings function. Here is how you can adjust the settings in the SoundCloudBlockWaveFormSettings: var soundCloudOrangeTransparentBlocks = new SoundCloudBlockWaveFormSettings(Color.FromArgb(196, 197, 53, 0), topSpacerColor, Color.FromArgb(196, 79, 26, 0),
Color.FromArgb(64, 79, 79, 79))
{
Name = "SoundCloud Orange Transparent Blocks",
PixelsPerPeak = 3, // was 2
SpacerPixels = 1,
TopSpacerGradientStartColor = topSpacerColor,
BackgroundColor = Color.Transparent
}; |
The text was updated successfully, but these errors were encountered: