Fix typo and comment - #294
Merged
Merged
Conversation
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'.
hajimehoshi
reviewed
Sep 7, 2026
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.
Contributor
Author
|
Thank you for the review! I addressed the comments:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'.