+ // the simplest wave file header consists of 44 bytes:
+ //
+ // 0 "RIFF"
+ // 4 file size - 8
+ // 8 "WAVE"
+ //
+ // 12 "fmt "
+ // 16 chunk size |
+ // 20 format tag |
+ // 22 number of channels |
+ // 24 sample rate | WAVEFORMAT
+ // 28 average bytes per second |
+ // 32 bytes per frame |
+ // 34 bits per sample |
+ //
+ // 36 "data"
+ // 40 number of data bytes
+ // 44 (wave signal) data
+ //
+ // so check that we have at least as much
+ if ( length < 44 )