Skip to content

Commit 1dc4bbb

Browse files
committed
Update README.md
1 parent 6874c0a commit 1dc4bbb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ Check out [examples/mp3-to-wav](https://github.com/cowork-ai/go-minimp3/blob/mai
4343

4444
### How to play an MP3 file using Oto
4545

46-
Check out [examples/play-mp3](https://github.com/cowork-ai/go-minimp3/tree/main/examples/play-mp3)
46+
Check out [examples/play-mp3](https://github.com/cowork-ai/go-minimp3/tree/main/examples/play-mp3/main.go)
4747

4848
## Taskfile.yml
4949

50-
Many useful commands are in two `Taskfile.yml` files: [Taskfile.yml](https://github.com/cowork-ai/go-minimp3/blob/main/Taskfile.yml) and [examples/Taskfile.yml](https://github.com/cowork-ai/go-minimp3/blob/main/examples/Taskfile.yml). The format is from [go-task/task](https://github.com/go-task/task), which is similar to [GNU Make](https://www.gnu.org/software/make/).
50+
Many useful commands are in two `Taskfile.yml` files: [Taskfile.yml](https://github.com/cowork-ai/go-minimp3/blob/main/Taskfile.yml) and [examples/Taskfile.yml](https://github.com/cowork-ai/go-minimp3/blob/main/examples/Taskfile.yml). To run the tasks, you need to install [go-task/task](https://github.com/go-task/task), which works similarly to [GNU Make](https://www.gnu.org/software/make/).

examples/mp3-to-wav/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ func run() error {
3232
}
3333
defer os.Remove(tmp.Name())
3434
defer tmp.Close()
35-
// wav.NewEncoder requires io.WriterSeeker but os.Stdout is not one even though it pretends like one.
36-
// so write to a temporary file first.
35+
// The wav.NewEncoder requires an io.WriteSeeker. Since os.Stdout is not always seekable
36+
// (e.g., when it's a pipe), we write to a temporary file first and then copy it to standard output.
3737
encoder := wav.NewEncoder(tmp, buf.Format.SampleRate, buf.SourceBitDepth, buf.Format.NumChannels, 1)
3838
if err := encoder.Write(buf); err != nil {
3939
return err

0 commit comments

Comments
 (0)