Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using mciSendString to write file

Status
Not open for further replies.

NFI

Programmer
Jun 7, 2000
278
GB
Hiya,

can anyone help me with a project I'm working on, using the WinMM API to record sound to memory? I am doing it all by using the MCISendString function and would like to write the sound I've created to a disk file, preferably by using another MCISendString command. Is there a reference to the string constants you can use with the WinMM API?

I have found a way of accomplishing this by using API based memory and disk IO operations, but is it very complex and rather unwieldy for what I am trying to do.


Thanks very much,

Paul
 
Hiya again,

right, I've found out how to use the "save" string;

Result& = mciSendString("save mysound C:\zzzzz.wav", ReturnString, Len(ReturnString), 0)


However, I'm using this method of recording my sound;

Result& = mciSendString("record mysound to " & strTime, ReturnString, Len(ReturnString), 0)

and the problem is that the file I create is always 44 bytes long and contains no sound... Do I have to set some sort of cursor for the sound I've recorded? I've tried putting "from 1" on the "save" string, but it's ont an argument it'll accept.

I'm totally out of ideas :(

Can anyone help?



Thanks,

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top