This code is so interesting. It's the code I need. But I think the code should change a little by replacing [b]lpvFile=::MapViewOfFile(m_hMap,FILE_MAP_READ,0,0,0);[/b] instead of [b]LPVOID lpvFile=::MapViewOfFile(m_hMap,FILE_MAP_READ,0,0,0);[/b] This will avoid some error when someone open a large file (certain hundred of MB) two times. Regards,
ReplyOriginally posted by: Lee
I am interested in using your project but would like to know the functions of the .cpp
CWaveFile.cpp
DSound.cpp
DSoundDoc.cpp
DSoundView.cpp
I am a beginner in MFC & would appreciate some help.
I am trying to understand the code but is experiencing some hair splitting moments. Please help me.
Originally posted by: BrianBin
Hi
I marked the DrawTimeRuler() at the OnPaint(),
Why does it still draws the ruler?
and the stack arround the variable a is not
corrupted.....lucky~
Originally posted by: Brian Bin
when I finished building the project(demo)
and executed indebug level.
I tried to import a file of speech (*.wav)
before it comes out anything, it appears
" stack arround variable a was corrupted "
at the function:
void CWaveViewCtrl::DrawTimeRuler(CPaintDC* PaintDC)
in line 299 ....
Can you help me about this?
Originally posted by: Brian Bin
I have downloaded the demo project source...
and I tried to compile it under visual studio .net
It showed some error messages like this:
d:\Doc\Visual Studio Projects\DSound\WaveFile\CWaveFile.CPP(346): error C2065: 'DSBCAPS_CTRLDEFAULT' : Undeclared Identifier!
someone would please tell me what's going on?
and how to do? Thank you very much.
DBSCAPS_CTRLDEFAULT was defined in dsound.h and was removed from the newer releases. Just replace it with DSBCAPS_CTRLFREQUENCY | DSBCAPS_CTRLPAN | DSBCAPS_CTRLVOLUMEReply
Originally posted by: Oceana
i can`t open your source. Please teach me your username and password for Sourcesafe...
Originally posted by: Chris
Your article and source codes are of great help for me. Thank you !
ReplyOriginally posted by: Hasan Yasar Kazmi
Ur artice was really useful, i am thankful to u for such a good article and code
ReplyOriginally posted by: bin bin
Dear Mohammed:
I'm grateful for your providing a good example for us.
I want to know how to write back the wave file to the harddisk after changing some samples of it.Would you please
tell me how to realize it?
Thank you
bin bin
Originally posted by: Maria Jothi
Hello Sir,
My Query is Regarding PCM wave of 16 bits.
After Recording , lpData of WAVEHDR contains the data.
I had copied the lpData to char *buffer.
Now , I need to store the data in a file.
After writing Header information , I stored the data in the file as char (bytes by bytes).
This works fine for 8 bit (both mono & stereo).
I followed the same method for 16 bit .When I play the stored file ,noise also comes along with the recorded data .
I read from some articles related to WAVE and came to know that 16 bit should be stored as short..
If so , How can i store it ???
Else , If you have someother idea,Please throw light on it.
Thanks
Maria