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

foreach (RiffParser) throws empty stack #264

Closed
yecril71pl opened this issue Feb 3, 2014 · 1 comment
Closed

foreach (RiffParser) throws empty stack #264

yecril71pl opened this issue Feb 3, 2014 · 1 comment

Comments

@yecril71pl
Copy link

The following code throws System.InvalidOperationException: the stack is empty.
var a_parser
= new SharpDX.Multimedia.RiffParser
(System.IO.File.OpenRead
("C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)"
"\Samples\Media\Wavs\Techno_1.wav"));
foreach (var a_chunk in a_parser) Console.WriteLine("{0}", a_chunk.Type);

@ArtiomCiumac
Copy link
Contributor

Unfortunately, the RiffParser class was not meant for external usage and it is not obvious how it should be used from its interface. Please take a look at the SoundStream class - if it provides the functionality you need, as most probably we will make the RiffParser class internal to avoid future confusion.

If you still need to use it - please take a look at the SoundStream.cs, lines 58, 70 and 73 for an usage example.

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

No branches or pull requests

2 participants