This project has moved. For the latest updates, please go here.

Adding a detailed info function to all WaveFormats

Feb 4, 2014 at 7:16 AM
Hi Mark,

Are you fine with adding an extra function to all the wave formats that shows detailed info?

Something like
ToString(bool DetailedInfo)
List<string> GetDetailedInfo()

I'd like to display detailed information in my app but at the moment the standard ToString() doesn't show much info, only the basics.
Format: AAC
AudioProfileLevel: AAC_LC
Payload: ADTS
Channels: 2
SampleRate: 44100
BitsPerSample: 0
AverageBytesPerSecond: 24698
BlockAlign: 1
ExtraSize: 14
Extra data: 01-00-FE-00-00-00-00-00-00-00-00-00-12-10
SampleRateOutput: 44100
ChannelsOutput: 2
FrameLength: 1024
CoreCoderDependant: False
Extensions: False
Feb 27, 2014 at 9:33 PM
I usually do things like this as extension methods to start with in my own applications, and only move them into NAudio if I think it is going to be useful to a lot of people. The demo apps have a lot of code like this, waiting to be promoted into NAudio, so the ACM code enumeration page maybe could showcase this feature.

BTW I did a trial of your MediaFoundationReader changes today. Unfortunately I was on a Windows 7 dev machine, so the playing from stream doesn't work. It's a shame it seems to be so hard, but I'd really like to have at least Win 7 support in there. I've got some attempts of my own creating a managed implementation of IMFByteStream, but it is currently going wrong with the IMFAsyncCallback implementation.

I might just pull your ACM fixes in for now, and come up with a future plan of how we can get MF stream reading support (I do have another fallback option which I hope to blog about soon).
Feb 28, 2014 at 1:37 AM
thats odd, i thought the MF function used was valid in win7. i will do my own testing
Feb 28, 2014 at 1:53 AM
Found the problem.

We are using MFCreateMFByteStreamOnStreamEx (Win8 up)

instead of MFCreateMFByteStreamOnStream (Win7 up)
Feb 28, 2014 at 6:52 AM
yes, I tried to use MFCreateMFByteStreamOnStream instead, but that just crashed for me.
Feb 28, 2014 at 8:03 AM
DLL entry not found? Dont have access to a Win7 machine right now.

I suppose if all else fails we could create our own MFCreateMFByteStreamOnStream function.
Feb 28, 2014 at 8:48 AM
no the method was found. I think it was an access violation or similar. I'll test again and see if I can get further.
I'll also post up my current attempt at getting a managed MFByteStream
Mar 3, 2014 at 3:56 AM
is the bytestream i posted up causing the exception in win7? it works fine in win 8
Mar 3, 2014 at 9:03 AM
yes, I'll try it again if I get the chance. My home development PC is Win 8.1 but I have a Win 7 box at work so I'll try to test it on that again