Skip to content

.wav file created with naudio always returns :: fmt (2) error when passed to GetAudioLength #11

@PythonCircuit

Description

@PythonCircuit

When using NAudio to save a .wav file from my recording, I cannot extract the proper length of the recording when passing to GetAudioLength from the lib.

As far as I can tell I am creating the .wav file as it should be created and it plays back audio perfectly fine... Do I need to change these parameters to work with the library?

Rate, Bits, Channels?

I.E.
waveIn.WaveFormat = new WaveFormat(44100, 16, 1);

var x_length = Tools.GetAudioLength(fufilePath);

So this problem seems to be exclusive to my .wav files however if I use the .wav file you provided it works fine. Is there a specifics to the wav file creation you could provide?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions