mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
audio/wav, audio/vorbis: Add comments about errors (#331)
This commit is contained in:
parent
1497d52928
commit
4d3ad434b3
@ -174,6 +174,8 @@ func decode(in audio.ReadSeekCloser) (*decoded, int, int, error) {
|
||||
|
||||
// Decode decodes Ogg/Vorbis data to playable stream.
|
||||
//
|
||||
// Decode returns error when the source format is wrong.
|
||||
//
|
||||
// Sample rate is automatically adjusted to fit with the audio context.
|
||||
func Decode(context *audio.Context, src audio.ReadSeekCloser) (*Stream, error) {
|
||||
decoded, channelNum, sampleRate, err := decode(src)
|
||||
|
@ -113,6 +113,8 @@ func (s *stream) Size() int64 {
|
||||
// The format must be 1 or 2 channels, 8bit or 16bit little endian PCM.
|
||||
// The format is converted into 2 channels and 16bit.
|
||||
//
|
||||
// Decode returns error when the source format is wrong.
|
||||
//
|
||||
// Sample rate is automatically adjusted to fit with the audio context.
|
||||
func Decode(context *audio.Context, src audio.ReadSeekCloser) (*Stream, error) {
|
||||
buf := make([]byte, 12)
|
||||
|
Loading…
Reference in New Issue
Block a user