Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SoundPlayer handling of partial reads on streams #82612

Merged
merged 2 commits into from
Mar 2, 2023

Conversation

stephentoub
Copy link
Member

SoundPlayer assumes that a Read on a stream will return everything asked for, and that's not the case.

Fixes #80264

@ghost ghost assigned stephentoub Feb 24, 2023
SoundPlayer assumes that a Read on a stream will return everything asked for, and that's not the case.
@ghost
Copy link

ghost commented Feb 24, 2023

Tagging subscribers to this area: @dotnet/area-microsoft-win32
See info in area-owners.md if you want to be subscribed.

Issue Details

SoundPlayer assumes that a Read on a stream will return everything asked for, and that's not the case.

Fixes #80264

Author: stephentoub
Assignees: stephentoub
Labels:

area-Microsoft.Win32

Milestone: -

@stephentoub stephentoub merged commit b61bdb9 into dotnet:main Mar 2, 2023
@stephentoub stephentoub deleted the fixsoundplayerreads branch March 2, 2023 17:02
_stream.Read(_streamData, 0, streamLen);
#if NET7_0_OR_GREATER
_stream.ReadExactly(_streamData);
#else
Copy link
Member

Choose a reason for hiding this comment

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

Should we backport this?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ghost ghost locked as resolved and limited conversation to collaborators Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SoundPlayer from Stream doesn't work for partial reads
3 participants