mirror of
https://github.com/faiface/beep.git
synced 2026-04-18 05:29:22 -04:00
17 lines
474 B
Go
17 lines
474 B
Go
package beep
|
|
|
|
// Format is the format of a Buffer or another audio source.
|
|
//
|
|
// N samples get encoded in N * NumChannels * Precision bytes.
|
|
type Format struct {
|
|
// SampleRate is the number of samples per second.
|
|
SampleRate int
|
|
|
|
// NumChannels is the number of channels. The value of 1 is mono, the value of 2 is stereo.
|
|
// The samples should always be interleaved.
|
|
NumChannels int
|
|
|
|
// Precision is the number of bytes used to encode a single sample.
|
|
Precision int
|
|
}
|