Skip to content

Fix typo and comment - #294

Merged
hajimehoshi merged 3 commits into
ebitengine:mainfrom
kumagi:fix-typo-and-comment
Sep 7, 2026
Merged

Fix typo and comment#294
hajimehoshi merged 3 commits into
ebitengine:mainfrom
kumagi:fix-typo-and-comment

Conversation

@kumagi

@kumagi kumagi commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

No corresponding issue #.

  • context.go, player.go: fixed the Format docs ('32 bits floats little
    endian' -> '32-bit floats in little endian' and so on), 'Usual
    numbers' -> 'Typical values', the BufferSize doc wording, 'an error
    if it exists' -> 'an error, if any', the broken 'stop using r e.g.,
    you want to close r' appositive, and 'buffer data' -> 'buffered
    data' in the BufferedSize doc.

  • README.md: added PlayStation 5, supported since b794c02 but never
    listed. Fixed 'not tested well' -> 'not well tested', the article
    mismatch in 'a Context and Players', and removed the confusing
    '(aka locations)'.

  • driver_darwin.go: the _AudioQueueNewOutput error message said
    'AudioQueueNewFormat with StreamFormat', a name of no API in use.
    Fixed the maximum-delay comment: 6144 samples at 48000 Hz is
    128[ms], not 100[ms].

  • api_wasapi_windows.go, driver_wasapi_windows.go: renamed
    GetDefaultAudioEndPoint to GetDefaultAudioEndpoint to match the vtbl
    field and the actual Windows API. Removed the dead
    errFormatNotSupported sentinel, which nothing returns since the
    AUTOCONVERTPCM flags replaced the closest-format matching. Also
    fixed 'are unlikely supported' -> 'are unlikely to be supported'.

  • driver_winmm_windows.go: removed the stale 'Avoid goroutines on
    Windows' comment, which contradicts the loop goroutine the driver
    actually runs, and unified 'Queuing' to 'Queueing'.

  • api_winmm_windows.go: 'MMRESULT (%d)' -> 'MMRESULT(%d)' for
    consistency with the other error formats.

  • example: 'number of channel' -> 'number of channels', and reworded
    the 'Pin the players' comment.

  • internal/mux: 'must sync with' -> 'must be kept in sync with', 'in
    such case' -> 'in such a case', and the defaultBufferSize doc no
    longer refers to 'unreading', which v3 never does. Test comments:
    'make a room' -> 'make room', 'tempt' -> 'prompt', and reworded the
    'Pause not to resume' comment.

  • internal/oboe: removed the unused PlayerID typedef and the 'class
    Player;' forward declaration, both v2 leftovers. Fixed the garbled
    kStableRunDuration sentence, 'a reason that can pass', and the 'It
    is because' sentence.

  • .github/workflows/test.yml: 'at Visual Studio Code' -> 'in Visual
    Studio Code'.

This batch fixes the documentation/comment/naming mistakes reported in
the review spreadsheet, items ebitengine#44, ebitengine#48, ebitengine#49 and ebitengine#50. Items ebitengine#46 and ebitengine#47
from the same spreadsheet were already fixed by 901ef3a.

Fixed where and how:

- context.go (NewPlayer doc): the doc claimed that the returned player
  implements Player, BufferSizeSetter and io.Seeker, but NewPlayer
  returns the concrete type *Player and no BufferSizeSetter type exists.
  Reworded to describe the concrete type and its functions.

- README.md (file streaming example): the commented-out seek example
  type-asserted player to io.Seeker, which does not compile because
  player is the concrete type *oto.Player. Call player.Seek directly.

- README.md (advanced usage): the buffer size example type-asserted
  myPlayer to the nonexistent oto.BufferSizeSetter, and the explanation
  referred to a Player interface and a BufferSizeSetter interface that
  do not exist. Replaced with a direct SetBufferSize call and a
  concrete-type description.

- player.go (SetVolume doc): the doc said the volume must be in the
  range of [0, math.MaxFloat32] and, at the same time, that a value out
  of the range is treated as 0. Removed the strict requirement so the
  doc matches the actual lenient behavior.

- player.go (Close doc): fixed the malformed sentence after the version
  in the Deprecated notice: 'as of v3.4. you' became 'as of v3.4, you'.

- all: renamed the mutexError type (formerly atomicError) in context.go
  and the eight driver files. The name atomicError suggested an atomic
  operation, but the implementation is a sync.Mutex with errors.Join,
  so the new name states what actually guards the error.
- context.go, player.go: fixed the Format docs ('32 bits floats little
  endian' -> '32-bit floats in little endian' and so on), 'Usual
  numbers' -> 'Typical values', the BufferSize doc wording, 'an error
  if it exists' -> 'an error, if any', the broken 'stop using r e.g.,
  you want to close r' appositive, and 'buffer data' -> 'buffered
  data' in the BufferedSize doc.

- README.md: added PlayStation 5, supported since b794c02 but never
  listed. Fixed 'not tested well' -> 'not well tested', the article
  mismatch in 'a Context and Players', and removed the confusing
  '(aka locations)'.

- driver_darwin.go: the _AudioQueueNewOutput error message said
  'AudioQueueNewFormat with StreamFormat', a name of no API in use.
  Fixed the maximum-delay comment: 6144 samples at 48000 Hz is
  128[ms], not 100[ms].

- api_wasapi_windows.go, driver_wasapi_windows.go: renamed
  GetDefaultAudioEndPoint to GetDefaultAudioEndpoint to match the vtbl
  field and the actual Windows API. Removed the dead
  errFormatNotSupported sentinel, which nothing returns since the
  AUTOCONVERTPCM flags replaced the closest-format matching. Also
  fixed 'are unlikely supported' -> 'are unlikely to be supported'.

- driver_winmm_windows.go: removed the stale 'Avoid goroutines on
  Windows' comment, which contradicts the loop goroutine the driver
  actually runs, and unified 'Queuing' to 'Queueing'.

- api_winmm_windows.go: 'MMRESULT (%d)' -> 'MMRESULT(%d)' for
  consistency with the other error formats.

- example: 'number of channel' -> 'number of channels', and reworded
  the 'Pin the players' comment.

- internal/mux: 'must sync with' -> 'must be kept in sync with', 'in
  such case' -> 'in such a case', and the defaultBufferSize doc no
  longer refers to 'unreading', which v3 never does. Test comments:
  'make a room' -> 'make room', 'tempt' -> 'prompt', and reworded the
  'Pause not to resume' comment.

- internal/oboe: removed the unused PlayerID typedef and the 'class
  Player;' forward declaration, both v2 leftovers. Fixed the garbled
  kStableRunDuration sentence, 'a reason that can pass', and the 'It
  is because' sentence.

- .github/workflows/test.yml: 'at Visual Studio Code' -> 'in Visual
  Studio Code'.
Comment thread .github/workflows/test.yml
Comment thread context.go Outdated
Comment thread README.md Outdated
Revert the atomicError rename, which is out of scope for a typo and comment fix, and remove PlayStation 5 from the platform list in README.
@kumagi

kumagi commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the review! I addressed the comments:

  • Reverted the atomicError -> mutexError rename (and the driver field updates) to keep this PR limited to typos, comments, and clearly-wrong names.
  • Removed PlayStation 5 from the platforms list in README.md.
  • The in Visual Studio Code fix in .github/workflows/test.yml stays as is; I'll send the same wording fix to hajimehoshi/ebiten in a separate PR.

go build ./..., go vet ./..., and go test ./... pass locally, along with cross builds for windows, darwin, and js/wasm.

@hajimehoshi hajimehoshi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hajimehoshi
hajimehoshi merged commit dc33cc0 into ebitengine:main Sep 7, 2026
9 checks passed
@kumagi
kumagi deleted the fix-typo-and-comment branch September 12, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants