Echo effect to audio sound using Qt [closed] - c++

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am developing one audio processing utility in Qt(C++). I can hear audio from speaker when I speak through mike using my qt code. I need to apply echo effect to this audio output. In my code I am receiving audio using a 16 bit byte array.
How I can apply echo effect to this sound sample.

I think the simplest way to make an echo is to play the sound twice, near-simultaneously, with a slight delay between the two instances. You might also make the volume of the second instance a bit less than the first instance.
You can do this by either mixing the sample stream together with itself (with an offset) and then playing the result, or possibly by creating two QAudioOutput devices and playing the sound in both of them (I haven't tried the latter though, so I don't know for sure if it would work)

Related

FTP live streaming for iPhone [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to prepare an iPhone app. A live stream will be coming for a moving camera (assume as a portable webcam) and I need to stream that live video to iPhone using FTP (assume we don't have internet in that area).
Any sort of help is appreciated.
The question is a good one, often asked by programmers world-wide. How to stream via the internet with no internet connection.
The accepted answer is using swallows. The airspeed velocity of a swallow is well-known among technical groups. Basically, what you do is package up your information, append the bytes to the swallow, and send it on its way. Beware. You'll need a lot of swallows.
Of course, the bandwith will depend on whether it's an African or European swallow, but let's not go there.

Anyone have the algorithm for determine if a hand of Mahjong game wins or not? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am reading some introduction of an ancient Chinese game called Mahjong (a bit like poker but far more complicated). I have been spending couple days in writing a program to determine if a given hand is a win hand or not. Do anyone have any idea or know where can I find the free code for that? I only need the part to determine win/lose, I am not looking for the entire project. Thanks.
There is this cool Python library that can be used for scoring of a Mahjong hand given a situation. I know you are working in C++, but since python is highly readable, even to non-python coders, maybe you'll be able to copy/paste and edit the relevant part so you'll be able to use them.
Hope that helps you in some way.

how to use video memory as standard memory storage? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I would use video memory on video board (256mb) as a standard memory for storing random values. I know very little about video graphics but i know that one approach is to just make 'models' or other video graphics objects storing my values, thus the video board thinks it processes video images or something this way. But is there another approach?
good article is http://en.gentoo-wiki.com/wiki/Using_Graphics_Card_Memory_as_Swap
that how linux has implemented it. Looks like i need to write windows device driver for graphics subsystem to access video memory.
MS resource about video memory: http://blogs.msdn.com/b/tmulcahy/archive/2009/02/11/windows-and-video-memory.aspx
This is a worse idea than you can possibly comprehend, but sure, you can always allocate a texture with DirectX and set it to be put in video memory only, write stuff in it, then at some later time lock it and read your data back out.
Good luck achieving a fifth of the speed you would by using normal system memory however.

get instant energy consumption [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I am looking to get instant energy consumption, in shell or C++
any ideas ?
Thanks
Your question could do with a bit more detail, but if I understand you correctly a program named Joulemeter does this the following way:
Joulemeter estimates the energy usage
of a VM, computer, or software by
measuring the hardware resources (CPU,
disk, memory, screen etc) being used
and converting the resource usage to
actual power usage based on
automatically learned realistic power
models.
That is one way to go. If you're just doing this for your own project, I guess you could throw together some hardware that measured from the wall socket and gave you the data that way. Maybe something like that exists already.
Well, if you have a Laptop you could use the answer presented for this similar question:
/usr/sbin/system_profiler SPPowerDataType | grep Wattage

How to play video? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm not c++ programmer so I have problem. Simple problem, I think.
I need play movie, can be only e.g. .avi (I can convert). Static width, static height, no button, no loop. I will write in PHP something like
exec('window.exe movie23.avi');
And appears window, play video, window close.
I rely code or good links.
Best regards
So you are a PHP programmer who needs to make a small window ( written in C++ ) that will play a video provided by the command line. Look into the animation control on msdn. It plays avi files. If you are completely inexperienced in the topic , then you have a lot to learn. I would say that you could write something like this in under 200 lines of code.
Best of luck....