How can I determine the length (i.e. duration) of a .wav file in C#?

后端 未结 15 2290
逝去的感伤
逝去的感伤 2020-11-30 00:26

In the uncompressed situation I know I need to read the wav header, pull out the number of channels, bits, and sample rate and work it out from there: (channels) * (bits) *

15条回答
  •  抹茶落季
    2020-11-30 01:24

    You might find that the XNA library has some support for working with WAV's etc. if you are willing to go down that route. It is designed to work with C# for game programming, so might just take care of what you need.

提交回复
热议问题