Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
.NET sample code for visualising wave form

nozzle
Registered User
Quote
2016-06-08 07:34:16

Does anyone have any sample code they could post / point me to that will visualise a wave form (.NET, C) from an MP3/FLAC file? Preferably to a winforms picture box control.


erik
Registered User
Quote
2016-06-09 14:07:39

You can get the pure audio wave data (PCM, https://en.wikipedia.org/wiki/Pu...) from irrklang using ISoundSource.SampleData.
Drawing this is simple: Draw a vertical bar for each value, and the height of the bar is that value.


Nozzle
Guest
Quote
2016-06-09 15:30:51

Using:


ISoundSource SoundSource = _engine.AddSoundSourceFromFile(file, StreamMode.NoStreaming, true);


SoundSource.SampleData throws an exception of type 'System.NullReferenceException'

(C, locally stored MP3 file.

Am I doing something wrong?


Nozzel
Guest
Quote
2016-06-09 15:31:37

That was C-sharp, not C


Nozzel
Guest
Quote
2016-06-09 15:37:05

Tried adding:

SoundSource.ForcedStreamingThreshold = -1;


with no luck.


Nozzle
Guest
Quote
2016-06-11 14:39:19

Any suggestions?


erik
Registered User
Quote
2016-06-12 08:22:00

It's probably too big, when decompressed and doesn't fit into memory for such an operation. So there is likely nothing you can do about that.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "In?ernational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact