Delay intput in Windows.Media.Audio.AudioGraph - c++

My goal is to be able to create AudioGraph with multiple input nodes that are connected to single AudioSubmixNode and be able to adjust timings between them.
Is it possible to delay input for single IAudioInputNode2 or add some "delay" node after input node to achieve this goal?
If it is possible may it support negative delay?
I am currently working in c++ (winrt) but documentation or samples may be in any .net language as I did not found anything on the subject that could push me in correct direction.

Related

How to store array of groups in HDF5, one by one?

I'm having trouble finding the right documentation/examples for a task I've got. I want to store groups(?) which each contain:
one 8-bit RGB image
one 16-bit Grayscale image
one array of unsigned short values.
And I want to do this one by one. I.e. I'll perform some preprocessing to obtain the components of the group and then I want to store these before I move on to the next one. One thing to keep in mind is that I don't know how many such groups will end up being written. My idea would have been to create a new group directly under root every time, naming it by the current count, but I have a feeling there's a more elegant way to solve this. Any suggestions?
EDIT: I realize I only added the C++ tag and didn't mention it in the text. I'm stuck with C++ on this and can't use python.
EDIT2: This will later be used by the hdf5 layer in caffe
I think your initial idea is perfectly okay. Just name them foo1, ..., foo42, but also add an attribute containing the total number of groups to root (and update that each time you add a group).
Turns out I didn't need to bother much, since the C++ API for HDF5 doesn't support images.

Voice activated password implementation in python

I want to record a word beforehand and when the same password is spoken into the python script, the program should run if the spoken password matches the previously recorded file. I do not want to use the speech recognition toolkits as the passwords might not be any proper word but could be complete gibberish. I started with saving the previously recorded file and the newly spoken sound as numpy arrays. Now I need a way to determine if the two arrays are 'close' to each other. Can someone point me in the right direction for this?
It is not possible to compare to speech samples on a sample level (or time domain). Each part of the spoken words might vary in length, so they won't match up, and the levels of each part will also vary, and so on. Another problem is that the phase of the individual components that the sound signal consists of can change too, so that two signals that sound the same can look very different in the time domain. So likely the best solution is to move the signal into the frequency domain. One common way to do this is using the Fast Fourier Transform (FFT). You can look it up, there is a lot of material about this on the net, and good support for it in Python.
Then could could proceed like this:
Divide the sound sample into small segments of a few milliseconds.
Find the principal coefficients of FFT of segments.
Compare the sequences of some selected principal coefficients.

Acquisition accumulator (software design)

I need some help on software design. Let's say I have a camera that gets acquisitions, send them to a filter, and display the images one at a time.
Now, what I want is to wait for two images and after that send the two images to the filter and both of them to the screen.
I thought of two options and I'm wondering which one to choose:
In my Acquisitioner (or whatever) class, should I put a queue which waits for two images before sending them to the Filterer class?
Should I put an Accumulator class between the Acquisitionner & Filterer?
Both would work in the end, but which one do you think would be better?
Thanks!
To give a direct answer, I would implement the Accumulator policy in a separate object. Here's the why:
Working on similar designs in the past, I found it very helpful to think of different 'actors' in this model as sources and sinks. A source object would be capable of producing or outputting an image to the attached sink object. Filters or accumulators in this system would be designed as pipes -- in other words they would implement interfaces of both a sink and a source. Once you come up with a mechanism for connecting generic sources, pipes, and sinks, it's very easy to implement an accumulation policy as a pipe, which for every nth image received, would hold on to it if n is odd, and output both of them, if n is even.
Once you have this system, it will be trivial for you to change out sources (image file readers, movie decoders, camera capture interfaces), sinks (image file or movie encoders, display viewers, etc), and pipes (filters, accumulators, encoders, multiplexers) without disrupting the rest of your code.
It depends. But, if all that your queue does is waiting for a second image to come, i reckon you could simply implement it right in the Acquisitioner.
On the other hand, if you want to incorporate whatever additional functionality there, then added modularity and all the benefits that come hand in hand with it would not hurt one tiny bit.
I don't think it matters all that much in this particular case.

analysing graph values

hello every i want to ask that is there any way through which i can pick values from the plotted graph and statistically analyze them using c++ programming and also the graph is moving graph (realtime graph)
thank u kindly help me
i am using c++ and linux and graph is plotted by using qwt and qt
Analyzing doesn't look necessary for what you describe (if I got it well) and would be too costly. You simply need to create an observer system ; when a node value is changed, send a message with the new value. You'll only need to see if the value is zero. Add special events for the extreme nodes and check when their value is changed if they match.

DVB-T tune request parameters

I'm working in GraphEdit to capture video from a Pinnacle PCTV card, in preparation for writing a program that will do the same, among other things.
What, precisely, is the meaning of the tune request parameters? How do I find the appropriate values to use, and is there a way to do so automatically? (ie, not to have to manually change params in the final program when trying to watch DVB in different countries.)
TransEdit can help you find some parameters. The ONID you can find on dvbservices.com. As far as I know you need to be able to configure the following values:
IDVBTLocator::put_CarrierFrequency()
IDVBTLocator::put_Bandwidth()
IDVBTuneRequest::put_SID()
IDVBTuneRequest::put_TSID()
IDVBTuneRequest::put_ONID()
For the Bandwidth I was even able to use -1. But I have only tested two different countries in europe.