|
Hello, everybody. Sorry to disturb you all.
Currently, I have a speech recording and playback software developed by Microsoft Visual C++ 6.0. The software is used to train children with speech problem and scores will be calculated and showed at the end of each practice session. The software is able to record and playback real-time.
Children use this software at home and save their practice records in a single floppy disk. Then, children will bring the floppy disk with practice records inside when they return to our centre. There are 20 wave files that must be saved in a single floppy disk. Due to space insifficiency, one floppy disk is 1.44M in capacity.
Total size of 20 wave files = 20*188k = 3,760,000 bytes
Total floppy disk needed = (3,760,000)/1,440,000 = 2.6 floppy disks
But, I must save all the 20 wave files into a single floppy disk
Our problem is we are not able to save all 20 wave files in a single floppy disk. We cant afford a CD-RW for each child and we must use floppy disk. The solution is we have to compress the wave file to save the files in a floppy and decompress the files back to wave file in order to listen to how the children practice at home.
I am totally new to this as the software is written by one of my previous friend who worked together with me in a voluntary speech rehabilitation centre. We need this software to train children in the centre. I work part time there.
But, my problem is how to call any CODEC dll into correct place into my current project platform without causing any bugs? Please forgive me if I have asked a very silly question, I am sorry. After I have added the cpp and h files into my current project paltform, I dont know what should I do next.
My final destination is to save all 20 wave files in a single floppy disk. I didnt restrict that I must use compression/decompression methods but I dont know what else should I use.
Hope you can give me some guidances on how to do it or you please link me to pages that help me to do so. I promise I can learn as independent as possible but I really need your guidance at this very beginning, please.
Please, I really appreciate all your help.
|
|
|
|
|
What about the PCM format? :
Mono or stereo?
44kHz or 22kHz or less?
16bit or 8bit per sample?
Could you use lees space changing this parameters without lost the quality of the voice of the childrens?
If NO, could you use some compress algorithm (like zip) instead mp3?
Have a nice code day
|
|
|
|
|
Hi, _Russell_, thanks for your reply, really appreciate.
I used PCM format, mono, 16kHz, 16 bits.
I can use any lossy compression algorithms, and I manage to search some source codes from website, but my main problem is I dont know how to call the CODEC dll from my software.
Can you please tell me how? Or if you can link me to the pages that provide details or tutorials on how to call CODEC dll from my software project platform?
Please, I really need some guidance and helps at this beginning stages. I promise to learn as independent as possible, please help at this very beginning.
|
|
|
|
|
Hello Cindy,
I think you should read the msdn on audio compression manager. Look for the
functions calls that start with acm. (e.g. acmDriverEnum) De audio compression manager features:
· Transparent run-time audio compression and decompression
· Waveform-audio data format selection
· Waveform-audio data filter selection
· Waveform-audio data format conversion
· Waveform-audio data filtering
You can choose any audio driver present on the current system. (I guess)
Succes.
|
|
|
|
|
Hi, Remco Hoogenboezem, thanks for your post, thanks.
I have read about the 'Usings CODEC to compress wave" page in the msdn website http://msdn.microsoft.com/archive/default.asp?url=/ARCHIVE/en-us/dnarmulmed/html/msdn_codec.asp. It talks about acm. But, unfortunately, I cant find the decompression part, I dont know where I did wrong.
Sorry, please forgive me for my stupidness, I dont understand with the 5 lists in your post. YOu mean I should choose one of them to be used or?
For your information, my main problem is I dont know how to call the codec dll from my software.
Could you please guide me a little? Please
|
|
|
|
|
Sorry to disturb, May I ask?
I was confused with the acm driver and as a newbie, I really coulndt implement it without any bug after finding the driver and doing the two conversions. I just want to call the third-party software.exe to help me do the compression and decompression part. Do I need to call the dll? Or, Can I just call the .exe from my software?
Sorry for causing any confusion, I was not clear with dll before I put this thread, after I read the pdf about dll, I think that maybe I dont need to call dll but just call the exe.
Please forgive me, I apologized for the trouble caused by me.
Do you think it is possible to call any CODEC software exe from my software? Which one is easier for a newbie like me?
But, I dont know how can I do so, do you mind to give me some guidance? Please, Please forgive me for my ignorance. I try my best in doing it. Hope you can teach me some. Please.
|
|
|
|
|
Run my process auto create a CicMarshalWndClass windows, but it not had WM_NCDESTROY message when the process is close.
|
|
|
|
|
Hello every body
Please tell me or give me code to validate xml using xsd file in DOM in VC++ ,I tried validation in MSXML 4.0 ,its worked,but i need this in MSXML 3.0,because we need it in WINCE.
Prabhakar.M
|
|
|
|
|
hi
we are implementing SMTP protocol in MFC.
We are using the CSMTPConnection v1.36 code provided by PJ Naughter
http://www.codeproject.com/internet/csmtpconn.asp[^]
The problem is while sending mails sometimes mails are not sent.
1)we are connecting ,sending mail and then disconnecting.
The above step is repeated 6 times hence 6 mails.Sometimes only 4 or 5 mails are sent.But sometimes all 6 mails are sent!!!
The problem seems to be while Sending the MAIL command in SendMessage()function
The return value of GetLastError() was 10038 i.e Socket operation on nonsocket.
the code snippet is as follows
BOOL CSMTPConnection::SendMessage(CSMTPMessage& Message)
{
.......
if (!m_SMTP.Send(pszMailFrom, nCmdLength)) //returns FALSE sometimes
{
TRACE(_T("Failed in call to send MAIL command, GetLastError returns: %d\n"), GetLastError());
CString str;
str.Format(_T("%d"),GetLastError());
AfxMessageBox(str); //displays error code 10038
return FALSE;
}
why is that the mails are sent sometimes but not delivered other time??
thanx in advance
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 3:20 Thursday 20th April, 2006
|
|
|
|
|
There error is described very well in the MSDN :
10038 - WSAENOTSOCK - Socket operation on nonsocket. An operation was attempted on something that is not a socket. Either the socket handle parameter did not reference a valid socket, or for the select function, a member of an fd_set structure was not valid.
I guess this summaries it all.
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
YaronNir wrote: There error is described very well in the MSDN
I know the error description but what i wanted to know is why does it occur only sometimes??
anyway thanx for your reply....
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
well, you should check then (either using debugging mode or printing some output traces) if the handle you are referencing is a valid one or the fd_set structure is valid.
that is my advise...
hope it helps
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hello everyone,
I am looking for tutorials dealing with static linking and dynamic linking in VS.net 2003. Does anyone have any recommendations?
regards,
George
|
|
|
|
|
|
v2.0,
Thank you very much! I will read through these valuable materials.
regards,
George
|
|
|
|
|
George_George wrote: I am looking for tutorials dealing with static linking and dynamic linking...
Static, or implicit, linking, requires a .h file, a .lib file, and a .dll file. Dynamic, or explicit, linking, requires you to call LoadLibrary() , GetProcAddress() , and FreeLibrary() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi DavidCrow,
I think we have three methods of using the functions of another library -- static linking, dynamic linking and dynamic loading. I think your method using LoadLibrary(), GetProcAddress(), and FreeLibrary() are dealing with dynamic loading -- not dynamic linking.
regards,
George
|
|
|
|
|
Hi
I am trying to make thread in a dialog based application. I have made the thread callback function, as static member function of that dialog class. Now if i want to use UpdateData(false) in that thread, I can not do that as UpdateData(false) is a non-static member function. What should I do now? Please can any one help me.
Thank you
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Normally I would have a thread function as a public member function of the class. As you can't do this explicitly (the thread function must be global) I do so implicitly: Have the global thread function do nothing but call the public function on the dialog class that does all the work. You'll have to pass the this pointer when you start the thread.
Steve
|
|
|
|
|
Thank you Stephen. I have made that thread function global. Now problem is that i am trying to initiate the thread from another class and that. To do this i declared this callback function in the cpp file of that class as
extern UINT myThread(LPVOID pParam);
But when i use AfxBeginThread to initiate the thread, it gives the following error.
AfxBeginThread' : none of the 2 overloads can convert parameter 1 from type 'int (__cdecl *)(void *)'
Why i am getting this error? Please help me.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Can you show the source for:
- The call to AfxBeginThread .
- The function beging called.
Steve
|
|
|
|
|
OK i have declared and defined a thread function in a file cwait.cpp.
Now in CMyDlg.cpp, to initiate that thread function, I first declare that function like that
extern countTime(LPVOID pParam);
Now in the same file I initiate the thread like this
CWinThread* cTime = AfxBeginThread(countTime, NULL);
It is important that i am initiating the thread within a member function of CMyDlg
Thank you. Waiting for kind responce...
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Here's an outline of how to execute a member fuction of a class instance using a new thread:
-------------
// In a header file.
class CMyClass
{
public:
void StartThread();
private:
UINT ThreadFn();
static UINT __cdecl RawMyControllingFunction( LPVOID pParam );
};
// In a .CPP file.
void CMyClass::StartThread()
{
AfxBeginThread(&CMyClass::RawMyControllingFunction, this);
}
UINT CMyClass::ThreadFn()
{
// Do stuff here.
return 0;
}
/*static*/
UINT __cdecl CMyClass::RawMyControllingFunction( LPVOID pParam )
{
CMyClass *pThis = static_cast<CMyClass*>(pParam);
return pThis->ThreadFn();
}
Steve
|
|
|
|
|
Aqueel wrote: Now if i want to use UpdateData(false) in that thread...
Which you should never do as the secondary thread does not own any of the UI components. See here on how secondary threads communicate with the primary thread.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
hi all,
I want to display the Networking systems that are displayed in the Tree Control and their files in the ListControl. it must be just as the Explorer of Windows 95. How can we achieve to retrieve the Remote Computers in the LAN WorkGroup that has to Dispaly all the Computers and their Files Associtated.
any api's for this other than FindFirstFile(...) and FindNextFile(...) for the Local Computer Files to be Displayed in the ListControl.
please hlp me out..
thanks,
uday.
uday kiran
|
|
|
|