this is an email about sound support for the/a win32 port of simcoupe.
i think it was simon cooke who was talking about it, but i've since
unnecessarily trashed loads of email so now i can't be sure
anyone without an interest in this should probably look away now. it's
basically a request for reaffirmation, guidance and warm (if wary)
confidence.


i've done the algo's, i know they all work. i've got loads of classes, i
create a new thread to handle the actual sound generation using the
windows multimedia api, i'm linking to the multithreaded dlls...

is there anything else i should know? i've not got it working yet only
because i've not got it finished yet, and parts of this are sortof new
territory for me. but i know what i'm doing and i see no reason why it
won't be completed in a matter of days (save for debugging, perhaps, and
moving to edinburgh on wednesday)

i have my class, CSAASound, which is the only class exported in the dll.
(the sound support is in the form of a dll, i'm not sure i mentioned
that, but it only made sense to do it that way). it creates the
background thread itself.

is there anything i should know about exporting c++ classes from a dll
(it's not something i've ever tried before). i heard something about
.def files and using decorated names which are compiler specific, which
i didn't feel too happy about (i'm using visual c++ 5 pro edition, and
from what i gather, the author of the emulator will have to be using the
same compiler or else they won't be able to link to my dll) - or else i
could avoid using a .def file and instead use declspec(dllexport), and
risk the possibility of sound support not working if (or when) i release
an updated version of my sound dll

and are there any forseeable problems with me creating a thread from
inside a function (in a class in a dll) which is going to be called from
another thread? ( i don't think there are, but as i said, this is new
territory ).

either way, i'll knock up a small test driver using visual basic or
something (can't be bothered with mfc right now) . not ever actually
written any vb code that accessed vc classes in a seperate .dll ... but
it can't be too hard, right?

anyone help / know what i'm talking about / care ?

CSAASound class header file available on request.


-- 
Dave

sound emulation .dll for win32 port of simcoupe

will feature (when finished):
11025, 22050, 44100, 8/16bit, mono/stereo support, optional filtering (two-pole
butterworth band-pass filter to generate the unmistakeably crappy low-frequency
response of a real SAA-1099 - but a bit of a cpu-stealer), pretty much spot-on
sound generation including full envelope control (incl. external clocking as
well as emulation of the undocumented volume level resolution drop from 4 bits
to 3 when using envelopes), noise generation, offset generation when using
envelope controls (meaning samples are supported - emulated mod player anyone?)
and even glitching when sending octave/tone data in the wrong order. 

current status:
most of the above is in place in an untested-don't-know-if-it-all-works-together
sort of way. still to do: tweaking of the filter parameters; completion of the
supported modes (only 11025/mono/8,16 in place at the moment). verifiably
complete: algorithms have been tested 'off-line' using non-realtime code

worst-case scenario:
code is too inefficient to fill sample buffers faster than the sound device uses
them. probability: low

Reply via email to