Re: recording
> > I don't know if this is worthy of interest to Euphorians anywhere, but I'm
> > about to launch an. I would dearly love to include a module from
>Euphoria,
> > that records the sounds that my app requires. (Right now I do this with
> > MSVC, but I'd rather use Euphoria). My last posting garnered no responses
> > whatever. . . If anyone has any hints as to how I might use Euphoria to
> > record sound, I would appreciate it. . .
Recording should be easy to do using MCI functions. You have to put up
with the ill-documented MCI sendstring commands, and the fact that you are
far removed from the mechanics of the process (which could be good or bad,
depending on your perspective).
An example of the code for MCIsendstring is below (note that a few details
are missing; this is just the general outline). A 'real' implementation is
in my Euphoria midi toolkit (I've seen other people using the same basic
code in various other toolkits on the Euphoria site also).
The problem you'd have, once you get this code working, is to figure out
exactly what command strings to send to mciSendString to get MCI to record,
pause, playback, etc. In theory, MCI will do it all. I have found the
details to be a somewhat tricky business (especially since, as I mentioned
before, documention for MCI is scanty at best).
--Brent
Sample code:
...
mciSendString = link_c_func(winmm, "mciSendStringA", {C_INT, C_INT,
C_INT, C_INT}, C_INT)
...
global procedure MciSendString(sequence String, integer a, integer b,
integer c)
--Sends a string to MCI.
--this allows you to use "high level" functions of winmm--sequencer,
wave file player, etc.
integer result
atom outMsg
--can't send a sequence--must use "allocate_string" to send a string
--in proper format expected by the C function
String = String
outMsg=allocate_string(String)
result = c_func(mciSendString, {outMsg, a, b, c})
if result > 0 then MidiError(result, "MciSendString") end if
end procedure
-------------------------------
++++++++++++++++++++ Brent Hugh / bhugh at cstp.umkc.edu ++++++++++++++++++++
+ University of Missouri-Kansas City, Conservatory of Music +
+ Sheet Music/Recordings: http://www.sunflower.org/~bhugh/pathetic.spm +
+ Internet Piano Concert: http://cctr.umkc.edu/userx/bhugh/recital.html +
++++++++++ Classical Piano MP3s http://www.mp3.com/brent_d_hugh ++++++++++
|
Not Categorized, Please Help
|
|