How to play 16-bit pcm array programmatically [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a short[] array filled with 16-bit pcm values.
I want to be able to play it without adding any header, and without saving any files to my memory.
I know that I might need a class that gives parameters like bit rate and stuff like that - but I want to do it all in my program without and files.
I am working in C#.
Thanks ahead,
Ofek

Install CSCore through nuget.
Then write all your shorts into a memorystream (you can use the binarywriter to do that).
After that use the CSCore.Codecs.RAW.RawDataReader to create an audiosource from your memorystream by specifing the format (16 bit, pcm, samplerate, channelcount).
After that you can use for example the CSCore.SoundOut.WasapiOut class to playback the stream.
You can take a look at the little sample on codeplex (bottom of the page). http://cscore.codeplex.com/

Related

Digitally sign large XML file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have large XML file to sign. The file size might go up to 4 GB. I am looking for solution where instead of loading whole document in to memory, I can do the signing batch by batch. Like reading few lines from stream and then sign it separately. Then combine all generated hash and compute final hash.
I am not much aware about hashing stuff. IF anybody knows the answer please help me?

Decrypt files in a VB6 installer. like file.ex_ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to decrypt the files that are on a VB6 install package. Once files are in the installer are like file.bm_ and when I decrypted this file, this file is named file.bmp. I try with the program win.rar and saw recognized as encrypted files and decrypted well, but I don't know how to do this from an application in c#.
Thank you.
Ok, had to find these.
If GZip doesnt work and you need a last resort. There are some DOS files bzip.exe, bunzip.exe and a win32 version that you can still likely find somewhere on the net. Mine are dated 2007 but they still work as far as I know (last I think I needed them was on XP 64, 2011). The upside is that they handle several compression formats.
Like I said, a last resort.

is possible to extract flv, mp3 .. etc. c# Windows Form [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
is possible to extract flv, mp3 .. etc. c# on a site using windows form c#???
how can I do if it is possible??
Thanks in advance for answers
Yes - however, don't try using any Windows tools to do it. Instead, use a wrapper around FFMPEG:
Using FFmpeg in .net?
In my testing, FFMPEG is far more useful than Windows Media services and far more reliable.

Can i load tga file in picturebox? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is it possible to load *.tga file in picturebox?
Actually i need to create a container that can display pictures and also video clips, but first i was looking for something to load TGA files.
Sure you can! Look at TargaImage.
Alternatively, you could look at DevIL but that might be a bit of an overkill depending on your situation.
By Default, TGA files are not readble by .NET as no internal TGA file handler is there in the Framework...
But If External Class Libraries are OK,
You can use The .NET Targa Image Reader from CodeProject to read TGA image in a PictureBox...
You will find some example codes at the Linked Page to load TGA images in normal PictureBoxes...
And Dont forget to check the comments there, there is a Simple But Necessary Fix mentioned there...

Write C# program to calculate Halsted Metric in Given c# source file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to write a application to calculate Halsted Metric in Given c# source file. I cant find a method to calculate these parameters.
the number of distinct operators
the number of distinct operands
the total number of operators
the total number of operands
are there way to calculate these parameters in given c# source file?
Well, what I can really advise you is Irony which is a really nice project for parsing formal languages. I've used it in my own project and was pleased by its flexibility and speed. Here is the link to their codeplex page where you can download sources and ask any questions regarding the project,

Categories

Resources