-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy patherrors.go
More file actions
30 lines (26 loc) · 783 Bytes
/
errors.go
File metadata and controls
30 lines (26 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package wav
import (
"errors"
"fmt"
)
var (
// ErrInputToLarge error
ErrInputToLarge = errors.New("Input too large")
// ErrNotRiff error
ErrNotRiff = errors.New("Not a RIFF file")
// ErrNotWave error
ErrNotWave = errors.New("Not a WAVE file")
// ErrBrokenChunkFmt error
ErrBrokenChunkFmt = errors.New("could not decode chunkFmt")
// ErrNoBitsPerSample error
ErrNoBitsPerSample = errors.New("could not decode chunkFmt")
// ErrFormatNotSupported error
ErrFormatNotSupported = errors.New("Format not supported - Only uncompressed PCM currently")
)
// ErrIncorrectChunkSize struct
type ErrIncorrectChunkSize struct {
Got, Wanted uint32
}
func (e ErrIncorrectChunkSize) Error() string {
return fmt.Sprintf("Incorrect ChunkSize. Got[%d] Wanted[%d]", e.Got, e.Wanted)
}