mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
audio/mp3, audio/vorbis, audio/wav: add comments about cache
This commit is contained in:
parent
c3b9afe8c4
commit
322ad99568
@ -87,6 +87,9 @@ func DecodeWithoutResampling(src io.Reader) (*Stream, error) {
|
|||||||
//
|
//
|
||||||
// A Stream doesn't close src even if src implements io.Closer.
|
// A Stream doesn't close src even if src implements io.Closer.
|
||||||
// Closing the source is src owner's responsibility.
|
// Closing the source is src owner's responsibility.
|
||||||
|
//
|
||||||
|
// Resampling can be a very heavy task. Stream has a cache for resampling, but the size is limited.
|
||||||
|
// Do not expect that Stream has a resampling cache even after whole data is played.
|
||||||
func DecodeWithSampleRate(sampleRate int, src io.Reader) (*Stream, error) {
|
func DecodeWithSampleRate(sampleRate int, src io.Reader) (*Stream, error) {
|
||||||
d, err := mp3.NewDecoder(src)
|
d, err := mp3.NewDecoder(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -182,6 +182,9 @@ func DecodeWithoutResampling(src io.Reader) (*Stream, error) {
|
|||||||
//
|
//
|
||||||
// A Stream doesn't close src even if src implements io.Closer.
|
// A Stream doesn't close src even if src implements io.Closer.
|
||||||
// Closing the source is src owner's responsibility.
|
// Closing the source is src owner's responsibility.
|
||||||
|
//
|
||||||
|
// Resampling can be a very heavy task. Stream has a cache for resampling, but the size is limited.
|
||||||
|
// Do not expect that Stream has a resampling cache even after whole data is played.
|
||||||
func DecodeWithSampleRate(sampleRate int, src io.Reader) (*Stream, error) {
|
func DecodeWithSampleRate(sampleRate int, src io.Reader) (*Stream, error) {
|
||||||
decoded, channelCount, origSampleRate, err := decode(src)
|
decoded, channelCount, origSampleRate, err := decode(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -134,6 +134,9 @@ func DecodeWithoutResampling(src io.Reader) (*Stream, error) {
|
|||||||
//
|
//
|
||||||
// A Stream doesn't close src even if src implements io.Closer.
|
// A Stream doesn't close src even if src implements io.Closer.
|
||||||
// Closing the source is src owner's responsibility.
|
// Closing the source is src owner's responsibility.
|
||||||
|
//
|
||||||
|
// Resampling can be a very heavy task. Stream has a cache for resampling, but the size is limited.
|
||||||
|
// Do not expect that Stream has a resampling cache even after whole data is played.
|
||||||
func DecodeWithSampleRate(sampleRate int, src io.Reader) (*Stream, error) {
|
func DecodeWithSampleRate(sampleRate int, src io.Reader) (*Stream, error) {
|
||||||
s, origSampleRate, err := decode(src)
|
s, origSampleRate, err := decode(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user