|
the click sounds like click one´s tongue wtih a bit more frequency.
|
|
|
|
|
Is the frequency related to nBytesToReduce?
|
|
|
|
|
How I can get this out?
Sorry I´m a beginner in programming sound
|
|
|
|
|
You haven't given me the information I need to help you. At the moment I can't tell whether you've got discontinuities on the buffer boundries of whether it's something else. I think you've got more than one problem actually - that downsampling routine you posted won't work, but it isn't that that's causing the problem you're describing.
Try using the downsampling routine I posted and vary the size of the buffers you send to the output. Does the frequency of the clicks also vary when you do this?
|
|
|
|
|
Downsampling with your routine and vary the size of Buffer you can´t understand anything it´s just very nasty noise
|
|
|
|
|
Okay, it sounds like you've got several problems that I'm not really going to be able to solve quickly for you, but I'll give you some pointers :
1. It sounds like you've got problems with your buffer start/end points. Check that you can take data in and send it back out to the soundcard at 48kHz without any degradation before you start worrying about downsampling and doing uLaw encoding.
2. You need to low pass filter before you do the decimation. The routine you posted isn't doing this - it's just giving you a weighted average of every 6 samples which is completely different. It's actually best done in two stages - LPF the buffer in place (corner freqency just above 4kHz), then decimate using the routine that I posted. The filtering is probably best done with a biquad IIR filter - you'll probably get away with a 2nd order LPF filter at 5kHz for what you're doing. To implement the IIR filter, do a search on the web - that's a big topic in itself.
3. If I were you I'd do all the intermediate calculation in floating point and only convert back to fixed point at the last minute. There's relatively little performance hit in Windows and it helps avoid some hideous problems that you can encounter with fixed-point IIR filtering.
|
|
|
|
|
Sorry for being late .
After I tried it with recoding in 8kHz and without any manipulation on the raw data it sounds a bit better.
Someone has graphed my raw data and after downsampling. This both graphs looks really good to us.
But I will try to do your tips.
I had thought if I capture the sound with DirectSound the low pass filtering is still done.
Therefore I don´t do low pass filtering.
|
|
|
|
|
Hi All
I am useing ClipBoard.It's working for text.But how can i know file formate.
GetClipboardData(CF_TEXT)
Plz tell me what UINT uFormat is used for file?
Thanks in advance![Rose | [Rose]](https://codeproject.global.ssl.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
Does IsClipboardFormatAvailable() help??
Regards,
Sandip.
|
|
|
|
|
MsmVc wrote: Plz tell me what UINT uFormat is used for file?
What file?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
Filenames are just text. Use GetClipboardData(CF_TEXT) .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
When i am useing this code then i am geting text only which is copy .
HANDLE clip;
if (::OpenClipboard(NULL))
{
clip = GetClipboardData(CF_TEXT);
CloseClipboard();
}
CString text;
text = (char*)clip;
AfxMessageBox(text);
Now i want to know File Name Copy.Can any one tell me what i use.
|
|
|
|
|
MsmVc wrote: Now i want to know File Name Copy.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
|
I need to develop a miltiple-language-application, which must uae english, chinese, japanese and more.
but I only used english in VC before.
what do I need to do for the miltiple-language-application?
1. use different version of VC for respective language?
2. use different OS?
3. both above?
4. something more?
could you give me any comments?
thanks
|
|
|
|
|
|
|
Creating 2 regions and making intersect them.
By using SetWindowPos bringing up the back window to top(HWN_TOP).
But it is showing only topper window(not specified window)
|
|
|
|
|
What do regions have to do with this?
What does the SetWindowPos call look like?
Are we supposed to guess?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Are we supposed to guess?
Yes, you MVP are supposed to have the CPMRU 's battery pack fully charged.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I always forget to charge
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I need some help to convert an image to byte array and byte array to image. Can any one help? 
|
|
|
|
|
You can start with GetDIBits GDI API function.
GetDIBits
The GetDIBits function retrieves the bits of the specified compatible bitmap and copies them into a buffer as a DIB using the specified format.
int GetDIBits(
HDC hdc, // handle to DC
HBITMAP hbmp, // handle to bitmap
UINT uStartScan, // first scan line to set
UINT cScanLines, // number of scan lines to copy
LPVOID lpvBits, // array for bitmap bits
LPBITMAPINFO lpbi, // bitmap data buffer
UINT uUsage // RGB or palette index
);
|
|
|
|
|
How to get the blob data from this function? where is the blob data found in it??
|
|
|
|