ACM - Audio Compression Manager [closed] - windows

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Can anyone explain how to use the Windows Audio Compression Manager (using VC++)? thanks
And what areas do i need to study first before I start..

In addition to what Stu has said, you need to learn about the format of the WAVEFORMATEX structure for whatever compression types you want to work with. If you have WAV files, they will already contain a WAVEFORMATEX structure you can use directly, but if you want to use ACM to decompress say MP3 files, you will need to construct the WAVEFORMATEX yourself, which is often non-trivial (google is your friend).
Secondly, use of ACM is easier with constant bit rate compression as you know how much will come out given how much goes in, and you can convert entire blocks. With VBR you may need to deal with "leftovers" in source buffer.
Third, you need to realise that often conversions cannot be performed in a single step. All compressed formats will offer a decompression to PCM, but then you might need to perform a secondary conversion to get to the sample rate or bit rate you desire.

Your first point of call should be the relevant entries in MSDN, which explain ACM usage in great detail and provides sample code and tutorials.
It's actually a very easy API to use - you simply create a compression stream, specifying your required input and output formats, and then create source and destination buffers. You write your source data into your source buffers and give them to the ACM to process. The ACM will then return processed output buffers to a callback function that you provide.

MSDN has actually two branches explained (entry level)
First it explains how to write your own acm-driver (it explains how to write a program acting as codec);
Second it shows how to use the acm-drivers on your system.

Related

RxJs good tutorials [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am trying to learn ReactiveX. I have spent almost a whole day and I am not able to understand it properly. I tried to look the official documentation but is is very difficult to understand. Something like this:
"Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence."
How a new person is able to understand it. So if someone knows the good resource then please mention
As a commenter has said, Brian Troncone's page is a good place: https://www.learnrxjs.io/.
The reality is that learning Rx is not a snap. The hard part isn't learning the library, the operators, etc. Rx requires at least a little bit of investment in thinking differently, at least for most people (myself included).
The best way to start understanding it is to play with it. For RxJS, the interactive examples in rx-book are a great place to start. They use jsbin, so you can run the sample code to see the output, then tweak the code to see what difference it makes.
From a .Net angle, playing with Linqpad is the best way to start getting a feel for how Rx works.
Ultimately you'll need to combine different aspects of learning:
Some theory reading
Some practical examples (which is where rx-book is useful)
Some practical application to a demo or real system of your own
I have a list of helpful resources that I've compiled here. But there is so much being put out there, especially on rxjs, that it's hard to keep up.
What's not common is true examples of real world usage of Rx. Partly this is because Rx is typically applied to larger scale problems, so it's not easy to just fabricate a good use case to make a demo from.
ReactiveTrader is one example of a large scale demonstration of applying Rx. It's a good example of an app making heavy use of Rx to build a complex web app that deals with streaming data and UI events.
I've also given a talk on how to apply Rx to tweet streams to analyze the data. This is oriented around real-time manipulation, aggregation and filtering of streaming data. There's a full video of the talk, plus articles discussing the approach and results here.
Ultimately it will take you time to learn Rx, but it will be worth the effort if you follow through.
The best way to learn RxJs to play with it by going through the api reference.
Besides that you can go through the following resources:
Video courses on Egghead.io
Awesome explanation: The introduction to Reactive Programming
you've been missing
Hot vs Cold Observables ( Also All Ben Lesh Articles on Medium)
Tutorials on youtube like : Adding Even More Fun to Functional
Programming With RXJS - Ryan Anklam
Explanatory tutorial with example on
https://auth0.com/blog/understanding-reactive-programming-and-rxjs/

Can AES be cracked with enough decrypted data? Why or why not? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
Let's say I have a large amount of files, say 20GB worth, all encrypted with the same AES key. Each file is encrypted individually.
Now, suppose I get ahold of 10GB of these files in decrypted format. And let's say I can even match up which files are which by using their sizes.
Seems I have a whole lot of information here - is it possible for me to crack the key and get the other 10GB of data out in unencrypted form?
Please help me understand why this is possible or not possible. I've searched the net extensively and I cannot find anyone discussing this topic. All I can find are generic statements about how AES is "unbreakable." But I am curious if this unbreakability holds in the event that a large amount of data has been compromised.
No, it is not (believed) possible.
The attack scenario you are referring to is a commonly studied scenario, called ''known-plaintext attack''.
A cipher is only considered secure if it is resistant against this (and many other) attacks. "Resistant" in this context means that having plaintext (no matter how much) does not make it any easier to find a key.
As to why this is the case, this is hard to understand without knowing a lot about the structure of AES and the possible attack modes. For an introduction, see e.g. the references of the Wikipedia article on AES, or have a look at
The Design of RijndaeL: AES - The Advanced Encryption Standard (by Daemen & Rijmen themselves).
Related question: Why is AES resistant to known-plaintext attacks?
AES is not a stream cipher and the output varies a lot for a small input changes (avalanche effect)
Breaking AES encryption using decrypted data

Proactively using 'lines of code' (LOC) metric in your software-development process? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Codebase size has a lot to do with complexity of a software system (the higher the size the higher the costs for maintenance and extensions). A way to map codebase size is the simple 'lines of code (LOC)' metric (see also blog-entry 'implications of codebase-size').
I wondered how many of you out there are using this metric as a part for retrospective to create awareness (for removing unused functionality or dead code). I think creating awareness that more lines-of-code mean more complexity in maintenance and extension can be valuable.
I am not taking the LOC as fine grained metric (on method or function level), but on subcomponent or complete product level.
I find it a bit useless. Some kinds of functions - user input handling, for example , are going to be a bit long winded no matter what. I'd much rather use some form of complexity metric. Of course, you can combine the two, and/or any other metrics that take your fancy. All you need is a good tool - I use Source Monitor (with whom I have no relationship other than satisfied user) which is free and can do you both LOC and complexity metrics.
I use SM when writing code to make me notice methods that have got too complex. I then go back and take a look at them. About half the time I say, OK, that NEEDS to be that complicated. What I'd really like is (free) tool as good as SM but which also supports a tag list of some sort which says "ignore methods X,Y & Z - they need to be complicated". But I guess that could be dangerous, which is why I have so far not suggested the feature to SM's author.
I'm thinking it could be used to reward the team when the LOC decreases (assuming they are still producing valuable software and readable code...).
Not always true. While it is usually preferable to have a low LOC, it doesn't mean the code is any less complex. In fact, its usually more-so. Code thats been optimized to get the minimal number of cycles can be completely unreadable, even by the person who wrote it a week later.
As an example from a recent project, imagine setting individual color values (RGBa) from a PNG file. You can do this a bunch of ways, the most compact being just 1 line using bitshifts. This is a lot less readable and maintainable then another approach, such as using bitfields, which would take a structure definition and many more lines.
It also depends on the tool doing the LOC calculations. Does it consider lines with just a single symbol on them as code (Ex: { and } in C-style languages)? That definitely doesn't make it more complex, but does make it more readable.
Just my two cents.
LOCs are easy to obtain and deliver reasonable information whithin one not trivial project. My first step in a new project is always counting LOCs.

FPGA Filter Project [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Do you guys have any good ideas on FPGA projects involving a filter? I want to do something interesting... not sure what. Thanks ahead of time.
Aloha!
As an alternative you could look at implementing some audio filter effects. The I/O requirements are easier than video. This means that you can focus on the effects themeselves and also create a stand alone (board) demo for your peers and teachers to try out.
As an example, look at the Cubase64 by Pex Tufvesson. A really sweet example of constrained implementations of audio effects algorithms. There is a good paper as well as a source code available:
http://www.livet.se/mahoney/c64-files/Cubase64_White_Paper_by_Pex_Mahoney_Tufvesson.pdf
Your task would be to implement one or more of these in HW instead of in SW. How about implementing a few and have switches toggle them on and off for user controlled effects?
You would get a pipeline with ADC interace followed by one or more effect blocks, each of which would have a bypass/enable controlled by an external switch. The pipeline would end with the DAC interface.
A simple design with littre overhead control which would clearly (audible) demo the implemented effects.
Hmmm, I think I should do this myself. ;-)
If you want to here Cubase64 there is a movie on YouTube:
http://www.youtube.com/watch?v=PTGkf21UpJ8
Here's an idea - implement a fast image histogram routine in FPGA. It could just take 8 bit input data and update a 256 bin histogram. You'd also need a way of zeroing the histogram at the start and a way to read the contents of the 256 bins afterwards. This is a potentially useful application as histogramming is a very common operation in image processing and it is inherently bottlenecked on general purpose CPUs due to serial dependencies. It can also not easily be vectorized with SIMD. A fast FPGA implementation would therefore offer real advantages over a software implementation.
I always find image processing projects are great - you can see results on a screen, not just pretty graphs, but actual processed imagery. Get an FPGA board with a camera input and VGA output. Try implementing a Sobel filter first, graduate to a corner detector like Harris or Shi Tomasi after that.

Anybody know of a good logic layout application? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 13 years ago.
Improve this question
I don't know exactly what to call this kind of application, but I'm looking for a good program that'll allow me to layout and test logical circuits. Something that has ands, ors, xors, nots, transistors, and all the basic logical components. Something kind of like UML except with basic electrical components. Something that could generate something like this:
(source: theseusresearch.com)
I like TinyCAD. It does SPICE simulation as well as schematic capture.
If I recall correctly, SPICE was an application that could do this sort of thing.
Perhaps Open Circuit Design.
I'm not an expert - I was a mechanical engineer, not electrical.
I'd like to mention a "fun" one that I've contributed source code to: Multimedia Logic http://www.softronix.com/logic.html
It has a lot of features and is good for educational purposes. It should easily handle circuits of the kind in your example. See http://www.dst-corp.com/james/virtualdigitalprojects/Main.asp for advanced examples.
Let me say, however, for serious non-educational work, you need something more professional.
If we're talking about the digital rather than the electron realm then you could go for Mentor Graphics or Cadence, but they cost £20000000000000000000000000000000000 each.
FYI: The term you're after is a http://en.wikipedia.org/wiki/Schematic_editor . Now you know the term, knock yourself out googling for freeware ones. I've used one or two, but they were always terribly buggy compared to Cadence/Mentor (which themselves are terribly buggy, but in really expensive ways)
Unless you're talking about a tool that makes the metal mask layout? The only one of those I've ever seen is in Cadence iteslf. I doubt there's a freeware layout tool. If you find one, let us know :)
If you don't know what you mean, here are some pictures ot help.
A metal layout tool looks like this:
http://www.cs.ucr.edu/cs168/cs168-04win/lab2/lab2_2.jpg
(That's a single invertor by the looks of it)
A schematic design tool looks like this:
http://www.ema-eda.com/images/products.orcad.tech.pcblayout.gif
EDIT: You added your own picture, which clearly shows you mean a schematic editor :)

Resources