audio: update comments

This commit is contained in:
Hajime Hoshi 2024-08-18 11:13:35 +09:00
parent 48f79af884
commit 8f32cc19c5

View File

@ -14,15 +14,14 @@
// Package audio provides audio players.
//
// The stream format must be 16-bit little endian and 2 channels. The format is as follows:
// The stream format must be 16-bit little endian or 32-bit float little endian, and 2 channels. The format is as follows:
//
// [data] = [sample 1] [sample 2] [sample 3] ...
// [sample *] = [channel 1] ...
// [channel *] = [byte 1] [byte 2] ...
//
// An audio context (audio.Context object) has a sample rate you can specify and all streams you want to play must have the same
// sample rate. However, decoders in e.g. audio/mp3 package adjust sample rate automatically,
// and you don't have to care about it as long as you use those decoders.
// An audio context (audio.Context object) has a sample rate you can specify
// and all streams you want to play must have the same sample rate.
//
// An audio context can generate 'players' (audio.Player objects),
// and you can play sound by calling Play function of players.