|
the most trouble is that I must enable one client send the audio pack to other clients(up to 15 clients),
I want to using RTP/RTCP protol.
I'm in trouble.
Need your hand.
Thank you.
|
|
|
|
|
|
I need to "move" a little to right the place that my item will be draw in run time.
What i mean is that in drawing some list item - i want to move the drawing item to right a little bit ==> I thought to use method ::OnCustomDraw(...) to change the drawing CRECT coordination
( something like Rec.x += 20 ) - but i don't see any affect on the my UI.
Someone can help me ?
Thanks.
|
|
|
|
|
Hi,
I connect to the Internet using RasDial and I close the connection using RasHangUp.
Everything works fine so far, BUT when I "connect, disconnect, connect, disconnect, .. and so on" then RasDial returns the Error #678. So, what can I do to fix this problem?
The time between all reconnects is approx 3 seconds. (not much time, but this should normally not cause any problems i think!? i don t know )
Thank you in advance for your help.
|
|
|
|
|
I also had trouble using the RasDial etc. functions. I then tried the Ras Dialup Class from the Ultimate Toolbox[^] which solved the problems I was having.
It's not rocket surgery!
Within you lies the power for good, use it!!!
|
|
|
|
|
Thanks but this did not solve the problem.
I have to wait 10-20 seconds and then I can reconnect.
|
|
|
|
|
What I want to do is check if the microphone is currently receiving input. I don't need to know what that input is or do anything with the input. Just a true/false as to whether or not it is currently receiving input at the moment I check. This is for Windows.
I've been searching for many hours on a way to do this - I've looked at countless pages about the Windows Mixer API and checked out a little bit about MCI, but it's all extremely confusing to me. Any help would be really appreciated, even if it's just to direct me to a better place to ask (like an audio programming forum).
|
|
|
|
|
You'll need to capture data from the microphone device and examine the audio samples and decide
if it's receiving input (maybe based on a threshold or some other way).
To get the audio samples, there's a variety of methods. Two common ways are
1) Windows Multimedia: Recording Waveform Audio[^]
2) DirectSound[^]
If those are confusing then you'll probably need to choose a method and study!
If you have more specific questions about parts you don't understand, there's lots of people here
that can help.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks Mark. I somehow completely missed the DirectSound section of MSDN. I will check that out.
|
|
|
|
|
I'm develop some ActiveX that act like tree but also have header.
My ActiveX base class is SysListView32.
I don't understand how can i get access to the listView control ?
In this function i load the SysListView32
BOOL CTreeListViewCtrl::PreCreateWindow(CREATESTRUCT& cs)
{
cs.lpszClass = _T("SysListView32");
return COleControl::PreCreateWindow(cs);
}
I must draw the control that i writing by myself ? can i use the control draw that i already have in the SysListView32 ?
I try to use some MFC class that the base class of it is CListCtrl - i check this MFC class and all work fine. Can i marge between those 2 project ( the MFC and my new ActiveX control ) ?
Thanks for any help.
|
|
|
|
|
Hi all:
Here is my question.
struct _wordTable {
char *word;
int count;
};
/*I need to dynamically allocate memory for every _wordTable structure.*/
/*What I have done is:*/
struct _wordTable *word_ptr = NULL;
word_ptr = malloc(sizeof(struct _wordTable));
if (word_ptr != NULL) {
word_ptr->word = malloc(wordSize * sizeof(char) + 1); /* wordSize if the length of the char string pointed by *word.*/
}
/*Is my coding OK? Since it worries me that I allocated memory for the struct first, followed by allocation of its string.*/
Thanks
|
|
|
|
|
It will not create any problem, since U R allocating 2 bytes of memory for the pointer "word" in the structure.
sizeof(struct _wordTable) -> This will always evaluates to 4 bytes
irrespective of the size of the string that "word" is pointing to.
Regards,
Arun Kumar.A
|
|
|
|
|
Hi:
Thank you. I was confused here for a second.
Thank you a lot, Arun.
|
|
|
|
|
Arun.Immanuel wrote: This will always evaluates to 4 bytes
Actually it will be 8 bytes when 32 bit addressing is used:
a pointer is usually stored as 4 bytes and the int is also 4 bytes.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
That will work.
Here is a better design that MS used for years.
typedef struct _wordTable {
int count;
char word[1];
} WORDTABLE;
WORDTABLE *word_ptr = malloc(sizeof(WORDTABLE) + wordSize);
if( word_ptr )
word_ptr->count = wordSize;
With this method you allocate both at the same time and do not have to add 1, because the extra byte it is part of the structure.
Note: You do not need to multiply by sizeof(char) on most compilers, because it is equal to 1.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
while (!bEnd)<br />
{<br />
Sleep(0);<br />
}
and
HANDLE hEventEnd = CreateEvent(...);<br />
WaitForSingleObject(hEventEnd...);
----------------------------------------------
which better?
|
|
|
|
|
HOW WHAT wrote: hile (!bEnd)
{
Sleep(0);
}
is obviously a disaster.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Sleep(0) plainly does nothing, and so you're going to start another thread, but at the same time, have your main thread check a bool over and over again, as fast as it can ?
The mechanisms like WaitForSingleEvent exist precisely to stop people doing stuff like a hard loop to check a bool.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
e...But i see WaitForSingleObject sources also use do {}while(...), Sleep and WaitForSingleObject sources as much as same....
|
|
|
|
|
CPU resources... a while the is always looping takes al the computer resources in order to be done as fast as possible, in the other way is like a callback, the OS handles it...
|
|
|
|
|
|
I've given my five to Mr. Graus...
|
|
|
|
|
I have two functions:
getBuffer();
setBuffer();
Assuming the client calls setBuffer() and passes a pointer to a memory block where data is stored, would it be bad practice to have my object modify that block directly, possibly resizing the block itself?
Doing this seems bad practice, as it would indirectly make getBuffer() pointless, but resizing the memory block would screw everything up wouldn't it? Or does the fact the buffer is completed by a NULL byte allow for such scenarios?
Hopefully my question has made sense?
Cheers
I'm finding the only constant in software development is change it self.
|
|
|
|
|
Hockey wrote: would it be bad practice to have my object modify that block directly, possibly resizing the block itself ... but resizing the memory block would screw everything up wouldn't it
Modify how ?
Resizing would be bad as you probably haven't specified what heap the block is from.
Even if you are using alloc/free new/delete everywhere there may be issues (if multiple modules have statically linked to CRT).
...cmk
Save the whales - collect the whole set
|
|
|
|