|
Definitely!
I've got a full working implementation using DirectSound for capture
and ACM for compression/decompression.
The GSM codec was the only built-in-to-Windows codec with a small enough granularity ("packet size")
for use with low latency real-time voice communication.
It works well, although I now use a different codec that's NOT implemented as an
ACM codec so the code is sitting dormant.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Heck I'm still not able to conclude the domain you are into! I think you'll load domains into your brain with few quick blinks of the eye - like Trinity learns to fly a helicopter. You should have got a rack of dvds labeld MEDICAL/NETWORKING/TELECOM/IMAGEPROCESSING.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
VuNic wrote: MEDICAL/NETWORKING/TELECOM/IMAGEPROCESSING.
Just add DATABASE and that's it - everything I do
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Actually, I do very little image processing - that's all snake-oil "science"
MEDICAL/NETWORKING/TELECOM/IMAGING/DATABASE
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Okay I'm sending you 5 empty dvds...got burner?
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Heh - OK.
Oh wait, DVD burner just broke right now...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Hi All,
I am working on UDP sever module.I have developed a simple server for receiving and sending the data from a single client.
in "OnReceive()" handler only I am sending the data to the client using "SendTo()" function,
How can I extend this to multiclients.
Please give me an idea.
Plese provide me if anybody has the sample code.
Regards,
Sunil Kumar
|
|
|
|
|
Did I really needed multiple threads to handle UDP clients? Wait..scanning old dumps in brain.....oops, bad sectors. Search ends.
You are unlucky. let;s wait for someone to answer you.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Hi to all,
I am have written some classes in C++ as follows,
Class A
{
int b1Len; //count of B type objects in b1Collection
B *b1Collection; //stores collection of object of type B
int b2Len; //count of B type objects in b2Collection
B *b2Collection; //stores collection of object of type B
};
Class B
{
int cLen; //count of C type objects in cCollection //cLen is atleast 30
C *cCollection; //stores collection of object of type C
};
Class C
{
int d1Len; //count of D type objects in d1Collection //d1Len is atleast 140
D *d1Collection; //stores collection of object of type D
int d2Len; //count of D type objects in d2Collection
D *d2Collection; //stores collection of object of type D
int e1Len; //count of E type objects in e1Collection
E *e1Collection; //stores collection of object of type E
int e2Len; //count of E type objects in e2Collection
E *e2Collection; //stores collection of object of type E
};
Class D
{
int fLen; //count of F type objects in fCollection //fLen is atleast 2
F *fCollection; //stores collection of object of type F
};
Class F
{
int len; //count of characters in str //len is atleast 200
char *str; //stores multiple characters
};
int aLen; //count of A type objects in aCollection
A *aCollection; //stores collection of object of type A
DelAll(aCollection, aLen); //aLen is atleast 30
//it's a macro to delete array of objects of any type
#define DelAll(obj, no) if( obj != NULL ) { if( 0 < no ) { delete[] obj; obj = NULL; } }
I am using this macro in destructor of all class (above) to delete array of objects.
My problem is, it's takes atleast 0.86 secs
Is there anything wrong I am doing?
I am using VC++ 2008 as IDE.
Thanks & Regards,
Aniket A. Salunkhe
|
|
|
|
|
It'd be helpful if you post a working code. The above class structure and objects wont take too much time.
Please carefully check the destructors of the classes. You can roughly calculate the time using OutputDebugString API. Just start Debug View Tool and set the time to display in Milliseconds. then execute the code after putting enough log. or use some profiling or logging mechanisms to get the critical point.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hi to all,
Thanks for your suggestions.
In every class I was using Add___() function to add object of other class.
I was reading a 35 MB xml & using that I was calling Add___() every time a found an object of class A, B, C, D, .. & I was getting problem at DelAll macro (it was taking more time to execute that might be due to lot of data).
Now I have replaced the Add___() function call, by it’s function body. Now it is taking normal time to execute DelAll macro
<br />
class A<br />
{<br />
void Add_B(const B* newBs, int newBsCount)<br />
{<br />
if( newBsCount <= 0 )<br />
return;<br />
<br />
B* temp_Bs = NULL;<br />
<br />
if( 0 < AllBsCount )<br />
temp_Bs = new B[AllBsCount ];<br />
<br />
int i<br />
for( i= 0 ; i < AllBsCount; i++ )<br />
temp_ Bs [i] = AllDays[i];<br />
<br />
DelAll(AllBs, AllBsCount)
<br />
AllBs = new B[AllBsCount + newBsCount];<br />
for( i = 0 ; i < AllBsCount; i++ )<br />
AllBs [i] = temp_Days[i];<br />
for( i = 0 ; i < newBsCount; i++ )<br />
AllBs [AllBsCount +i] = newBs [i]; <br />
<br />
DelAll(temp_ Bs, AllBsCount);<br />
<br />
AllBsCount += newBsCount;<br />
}<br />
}<br />
Thanks & Best Regards,
Aniket A. Salunkhe
|
|
|
|
|
(not really an answer)
Why are you using C type "collections" instead of std::vector (or std::list) ?
Are you checking the time in DEBUG or in RELEASE ?
I don't see much wrong in what you presented if the destructors are really deleting what has been allocated;
you probably have more data than you are expecting.
|
|
|
|
|
It looks like you have many arrays of objects, and a destructor is called for EACH array element. It may be possible to delete the whole array with one statement, if your destructor is just freeing memory (as opposed to executing cleanup code).
For example:
D* dArray = (D *) malloc (numberOfDObjects * sizeof (D));
...
delete [] (char *) dArray;
This invokes delete once, rather than numberOfDObjects times. You may be able to use similar logic for arrays of arrays of objects.
|
|
|
|
|
malloc and delete do not play well together.
did you meant to use free instead of delete ?
|
|
|
|
|
Oops, my mistrake. You can use free ((char *) dArray), or
D* dArray = (D *) new char [numberOfDObjects * sizeof (D)]; and
delete [] (char *) dArray
|
|
|
|
|
Is it surrounded by a bunch of try ... catch blocks? it shouldn't take is much time though. Even in debug mode.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
How to insert struct data using SafeArrayPutElement() method?
|
|
|
|
|
This thread[^] seems useful to you.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
What type (e.g., VT_x ) of VARIANT object to you have?
"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
|
|
|
|
|
|
"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
|
|
|
|
|
|
|
How to get the size of memory pointed by void * pointer?
Thanks in advance!
|
|
|
|