Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

SoundStream.Read method starts in wrong position? #310

Closed
anders9ustafsson opened this issue Mar 24, 2014 · 2 comments
Closed

SoundStream.Read method starts in wrong position? #310

anders9ustafsson opened this issue Mar 24, 2014 · 2 comments
Labels

Comments

@anders9ustafsson
Copy link
Contributor

First of all, many thanks for providing this excellent bridge to DirectX!

I am currently in the process of migrating a project from SlimDX, and in this process, I have encountered functional differences between the SlimDX WaveStream class and the SharpDX SoundStream class, which I think is due to an incorrect implementation in the SoundStream class.

As far as I can tell from the implementation of the SoundStream.Seek method, the start position of the data "chunk" (given by the field startPositionOfData) is ignored when calling the Seek method of the underlying Stream.

If I am not mistaken, for correctness line 302 should instead read:

return input.Seek(newPosition, SeekOrigin.Begin);
@anders9ustafsson
Copy link
Contributor Author

Apologies for the confusion, closing and reopening this issue. But I actually believe I have located the problem this time, please see my updated entry above.

@ArtiomCiumac
Copy link
Contributor

Thank you for reporting, you did a good analysis. The issue should be fixed by the commit above.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants