|
Did you look out for CDatabase class. A CDatabase object represents a connection to a data source, and allows you to operate on the data source
Best sites: MSDN Site, CodeProject ...
Best Books:This really depends upon what do you want to read. WIN32,MFC,COM,ATL etc.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Dear,
For my project, I want to write a program that receives audio signals from the USB port and simultaneously plays the audio.
In which topics should I search for help in order to write a program that generates and plays audio data simultaneously?
|
|
|
|
|
I interpret this as two different problems:- Reading the streamed audio from the USB port
- Playing the audio
Regarding problem #2 I think you can benefit from using the VideoLAN streaming server/player[^]. It listens to ports commonly used for streaming. To set up the streaming session it requires a description in SDP format sent with RTSP protocol to inform it on what ports the audio data can be read.
You have to read up on this.
Regarding problem #1 I suspect you have to write an adapter that reads the audio data from the USB port, translates it and sends it in UDP/RTP packets to ports that VideoLAN is listening to. I assume the data is coded using a common codec such as MPEG4 or similar. VideoLAN supports a lot of codecs, so just hope that it supports the one you, or your device, uses.
There's a lot to be done here, but to give you better guidance you have to describe your environment setup further: - What kind of device do you connect to the USB port?
- Can you connect to the USB device as you would connect to a serial device?
- How is the audio data formatted?
- What codec is used?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
thank you for your reply.
forget anything about USB. I have worked a lot on this topic and I have no problems. the problem now is that I have some audio signals that should be played. I have two problems:
1- the audio signals I receive, have not a special format. signals are only sampled values from the voice.
2- realtime playing of the audio is necessary.
|
|
|
|
|
Ali Tavakol wrote: the audio signals I receive, have not a special format. signals are only sampled values from the voice.
What form is the data in? PCM samples?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
The samples are raw data, means that the samples are values betwwen 0.00 and 5.00, denoting voice amplitude.
|
|
|
|
|
And the samples are arriving at a defined, steady rate?
If so, then I agree with Roger - just convert them to an appropriate format of PCM (raw) samples
and it'll be relatively easy to work with them from there.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Ali Tavakol wrote: forget anything about USB. I have worked a lot on this topic and I have no problems.
So, we've covered that. Nice!
Ali Tavakol wrote: the audio signals I receive, have not a special format. signals are only sampled values from the voice.
This makes me think of treating the audio data as "raw", for which you should be able to use the WAV-format. I would try creating a memory mapped WAV-file with the raw audio data and then use the multimedia API for playing it with mmioXXXX functions.
Have a look here[^] for how to play/stream a WAV file and here[^] for information about the WAV file format.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Roger Stoltz wrote: I would try creating a memory mapped WAV-file ...
Please inform me of your work.
thank you.
|
|
|
|
|
Ali Tavakol wrote: Roger Stoltz wrote: I would try creating a memory mapped WAV-file...
Please inform me of your work.
I haven't done this. Not yet anyway.
It is a suggestion from me to you saying something like "if I were you I would try creating a memory mapped WAV-file...." in the sense that this is what I would try spontaniously if I was in your situation. But since I'm not in your situation I don't really understand your interest in my work....
Read the links I provided in my previous post.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
In java script
How we can assign the returned value to any variable
for ex:
cntrl.Attributes.Add("onclick", "javascript:return BlockConfirm();")
I want to know the returned value from this function whether it is true/false
Please help me
|
|
|
|
|
var p =
Please ask it in the Web Development forum. This is the MFC/Visual C++ forum.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
THis is the C++ one.
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.
|
|
|
|
|
Hi
I am getting the following when i compile my application.
SVDOFileDownLoad error LNK2019: unresolved external symbol "int __cdecl gOpenFile(char *)" (?gOpenFile@@YAHPAD@Z) referenced in function "private: bool __thiscall CVDOLanguageProvider::UseLanguageFile(char const *)" (?UseLanguageFile@CVDOLanguageProvider@@AAE_NPBD@Z)
The function gOpenFile() is being defined in another project file which has been included in the current project.Yet i am getting the error.Please help
|
|
|
|
|
link the correct .lib file in your linker options...
|
|
|
|
|
meg22 wrote: The function gOpenFile() is being defined in another project file which has been included in the current project
You included the header file which contains the function. But did you also add the cpp file in your project ?
That's probably where to problem is.
|
|
|
|
|
In "Project Propertise", Under "C++", Under "Additional Include" try to give the path of the folder that contains the file that contains gOpenFile().
|
|
|
|
|
Nope, that won't change anything: it is a linker error, not a compilation error. That means that the function is known (the header file can be found) but is not defined (either the cpp has not been included in the project or the project doesn't link against the required library).
|
|
|
|
|
the OP said that his function is defined in another project (so, i suppose a library project maybe...)
|
|
|
|
|
toxcct wrote: the OP said that his function is defined in another project
He said that the function is defined in another project file . I understand it as it is in another file but in the same project. But anyway, he has now both solutions
|
|
|
|
|
hi, how can i achieve similar behavior as Panel control does in managed c++? user can drag the border (or near the border) of a tree control to resize it
thanks!
|
|
|
|
|
This is regular windows, not forms, right?
You can add the WS_THICKFRAME style to the tree control and it will be resizable.
You can also respond to the WM_SIZE notification in the tree control's parent
window, and in response, use MoveWindow() to resize and/or reposition the tree control.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
i can't understand this:
#define IOC_VENDOR 0x18000000
where,
what's 0x18000000?
anyone can help me?
thanks a lot.
|
|
|
|
|
|
But i need to understand what it means.
|
|
|
|