3 replies [Last post]
awfulsoft
awfulsoft's picture
User offline. Last seen 2 years 22 weeks ago. Offline
Joined: 04/17/2014
Posts:

Hi,

I've been searching google for a solution to this for two days ... Ah.

Visual Basic likes this:

int i;
int lSamples;
int lChannels;
int lBits;
int iBlockAlign;
int lBytesPerSec;

lSamples = 44100;
lChannels = 1;
lBits = 16;
iBlockAlign = 2;
lBytesPerSec = lSamples * lChannels * lBits / 8;

i = mciSendStringA("set capture samplespersec " & lSamples & " channels " & lChannels & " bitspersample " & lBits & " alignment " & iBlockAlign & " bytespersec " & lBytesPerSec, NULL, 0, 0);

but c++ tells me:

error C2296: '&' : illegal, left operand has type 'const char [27]'

Help! It's got me in a mental loop.

regards,
miki.

p.s
better ask the folks I know and trust.

beta to beta
calvertonsound.com

awfulsoft
awfulsoft's picture
User offline. Last seen 2 years 22 weeks ago. Offline
Joined: 04/17/2014
Posts:
Sorted

Hi,

I used, instead, the definitions in "aviriff.h" instead of mciSendString.

I tend to bark up the wrong tree sometimes. (Don't we all?)

I wouldn't bother with c++ normally, but sometimes I really need to make myself a dll for 'dark basic pro'.

Told you it was 'off topic'.

I've just been missing you guys.

regards,
miki.

beta to beta
calvertonsound.com

Tall John
Tall John's picture
User offline. Last seen 6 weeks 6 days ago. Offline
Joined: 01/27/2011
Posts:
Off Topic

Hi Miki,

Yes, the forums have been quiet recently so thanks for your post.

I'm pleased you fixed the problem. Using the wrong header is an easy mistake to make and a hard one to track down.

Sorry I didn't get time to look into it myself. I have been away at the Insomnia 52 gaming festival where Tall Studios has been exhibiting the Shoot 'Em Up Kit. It was a great event and we're looking forward to exhibiting at more events over the coming months.

Thanks,
John

awfulsoft
awfulsoft's picture
User offline. Last seen 2 years 22 weeks ago. Offline
Joined: 04/17/2014
Posts:
1 step forward and 2 steps back

@ John,

my new code compiled on consul but not as a dll..

This c++ is a real pain.

Back to the key/drawing board.

Hoped Insomnia 52 was fruitful.

Insomnia, Insomnia, Insomnia, Insomnia... (I refuse to stay up all night again).

I'm too much of a 'terrier'.

Have a great week.

regards,
miki.

beta to beta
calvertonsound.com