This project has moved and is read-only. For the latest updates, please go here.

Displaying static waveform of wav

May 3, 2010 at 9:36 PM

Let me start by saying... Thanks for the greay library!

Although, I'm having trouble figuring out how to display a waveform in my windows form app. I don't need anything special like zooming in or displaying live data while playing/recording. Just want to open a wave file and display a static waveform of it.

I followed the first tutorial you have (which works) and then added a waveform control. I then replaced the waveOutDevice.Play(); (I don't need to play the audio for this) line with waveViewer1.WaveStream = mainOutputStream;. I see the control in my app and it appears to be trying to render something, but its malformed. I'm guessing I'm not using the control right, maybe some properties I need to set? I tried the .DrawToBitMap method but it rendered the same image.

Thanks for any help!

May 5, 2010 at 3:32 AM
Edited May 5, 2010 at 3:34 AM

You can you this on codeproject:

I modified it to be edit waveform and play selected segment.