exp/audio: fix inability to use mono 8 format

There is no way to distinguish an unknown format from
Mono8 because Mono8 is zero. The current CL fixes this
issue by starting the format constants from iota + 1.

Change-Id: I8c709cdaff3bc46bcc15ab770cfcfd04c186034d
Reviewed-on: https://go-review.googlesource.com/12386
Reviewed-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
Meir Fischer 2015-07-19 00:15:41 -04:00 коммит произвёл Burcu Dogan
Родитель e5bb9c1e6f
Коммит a34303262d
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -41,7 +41,7 @@ type ReadSeekCloser interface {
type Format int
const (
Mono8 Format = iota
Mono8 Format = iota + 1
Mono16
Stereo8
Stereo16
@ -65,6 +65,7 @@ var formatCodes = [...]uint32{
}
var formatStrings = [...]string{
0: "unknown",
Mono8: "mono8",
Mono16: "mono16",
Stereo8: "stereo8",