|
Sorry but I found these codes in a tutorial at
http://codeguru.earthweb.com/multimedia/cd_audio.shtml
I don't have a lot of experience with C++
I only know some bases
In fact, I have to make a program that play a CD audio, transorm the datas in a specific norm and send them through Fast ethernet to an other computer...
And I m lost in all these functions and classes...
I m trying to find some codes to play a CD , control a buffer... I know it's going to be hard ...
Do you know any good books on these topics ?
and I don't know how to switch off the precompiler header ....
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows 95 Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
|
|
|
|
|
Hey starn, this was tough Apparently there's a problem with mmsystem.h in VC++ 6.0. Follow this article in Usenet explaining how to solve it.
The guy talks about "preprocesor settings". I guess you won't know where those are (because you didn't know how to switch precompiled headers off either). Select Project->Settings, there you'll find lots of stuff, including the preprocessor settings and the precompiled headers options. Give yourself sometime to get used to the IDE.
Good luck with your project.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I just woke up, I m from Belgium and I couldn't wait for your answer last night because my friends came to pick me up to go out.I haven't tried your solution yet but I wanted to thank you a lot !!!
I'll tell you if it's working or not, thanks again
|
|
|
|
|
I couldn't wait for your answer last night because my friends came to pick me up to go out.
Same here I posted this answer just before going out for a couple of drinks --my friends were running out of patience.
I'll tell you if it's working or not, thanks again
Please do it. You are welcome.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I m sorry to tell you that I still got the 2 same errors... And I think I did everything correctly...
You're from Spain, I love Spain soooo much! I went to Madrid a few month ago, crazy city!!and we went , me and my girlfriend, to Ibiza twice the past two years.
Anyway, thanks for trying to solve my problem.My ears are wide open if you have an other solution
At least, I know that I m not the only one that got this problem...
|
|
|
|
|
Oh, this is becoming personal Usually this kind of errors don't last that long...
I'd try to load the offending project from the URL you provided some messages ago, but on weekends I've got no IDE handy.
Do a search on groups.google.com for "mmsystem.h C2146". Apparently a lot of people have run into the same problem in the past. Try to follow the advice given there. Sorry I couldn't be more helpful. Good luck!
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
thanks a lot, i'll try that, have a nice week-end...
|
|
|
|
|
I have done a fair chunk of reading and writing from/to files, but I was wondering if there is anyway of not specifying the input buffer's size when you are reading in. For instance, I would like to read in an entire line, but I don't want to read it into a TCHAR x[1000], I want to read it into something more flexible.
how would i do this?
|
|
|
|
|
Read into a CString.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Holy christ nice timing Nish!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
This is unfair my answer gets listed the last, yet its associated time is prior than the others' !!
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
This is unfair my answer gets listed the last, yet its associated time is prior than the others' !!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Joaquín M López Muñoz wrote:
my answer gets listed the last, yet its associated time is prior than the others' !!
Thats cause you used STL in your answer.
Chris M might not like that much.
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
LOL
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
CFile myFile("theFile.dat", options);
int nSize = 663;
char* buff = new char[nSize];
myFile.Read(&buff, nSize);
delete [] buff;
I think this is what yer after...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
If you are into iostream s, this is the way:
std::istream in;
std::string str;
...
std::getline(in,str);
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
That's definitely the way I'd do it (you need an ifstream though not an istream) you get all the flexibility in the world and code re-use goes up 'cos you're not having to talk MFC. You can always use .c_str() on it if you need to get down and dirty. Why does anybody use anything else?
I hear The Prisoner and 7of9 aren't getting along too well these days.
|
|
|
|
|
how do you run two for's at once?
|
|
|
|
|
int i = 0 ;
int j = 0 ;
for ( ; i < 10 && j < 10 ; ++i, ++j)
{
}
Maybe that would do the job. I originally put i++, j++, but then I thought "Holy crap, I'll get blasted by all those c++ efficiency coders out there"
Roger Allen
Sonork 100.10016
If I'm not breathing, I'm either dead or holding my breath.
A fool jabbers, while a wise man listens. But is he so wise to listen to the fool?
Please step to the rear of the car and make room for more victims. - John Simmons the Outlaw programmer, 1st Feb 2002, in the lounge
|
|
|
|
|
|
Ooops!
I misunderstood your question.
Please ignore my reply
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|
|
Don't feel too bad Nish, if he had spelt his topic correctly it would have been easier to understand.
Run two For's at once
Roger Allen
Sonork 100.10016
If I'm not breathing, I'm either dead or holding my breath.
A fool jabbers, while a wise man listens. But is he so wise to listen to the fool?
Please step to the rear of the car and make room for more victims. - John Simmons the Outlaw programmer, 1st Feb 2002, in the lounge
|
|
|
|
|
Roger Allen wrote:
Run two For's at once
I thought he was talking about beer...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
You can also do:
for (int i=0, int j=0; i<10 && j<10; ++i, ++j)
Just wanted to blow that disgustingly UGLY bit of code out of the water. Three lines for a loop for God's sake. Talk about slack. When I were a lad we 'ad 2k and bloody grateful for it we were too. Eee, young 'uns.
Anyway, what's so wrong with writing efficient code then?
i1.2sqrt(u).bcos(ur)sec(c) but b4.isqrt(u).ru/16
|
|
|
|
|
for(i=0;i<j;i++)
for(a=0;a<z;a++)
Nish
Nish was here, now Nish has gone;
He left his soul, to turn you on;
Those who knew Nish, knew him well;
Those who didn't, can go to hell.
I like to on the Code Project
Sonork ID 100.9786 voidmain
www.busterboy.org
|
|
|
|