|
|
| version 1.1, 2003/10/16 17:58:02 | version 1.3, 2003/10/19 16:54:51 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include "soundmng.h" | #include "soundmng.h" |
| #include "i286.h" | |
| #include "pccore.h" | #include "pccore.h" |
| #include "iocore.h" | #include "iocore.h" |
| #include "sound.h" | #include "sound.h" |
| Line 100 BOOL sound_create(UINT rate, UINT ms) { | Line 101 BOOL sound_create(UINT rate, UINT ms) { |
| } | } |
| sndstream.samples = samples; | sndstream.samples = samples; |
| streamreset(); | streamreset(); |
| ratebase200 = (opna_rate + 199) / 200; | ratebase200 = (rate + 199) / 200; |
| SNDCSEC_INIT; | SNDCSEC_INIT; |
| return(SUCCESS); | return(SUCCESS); |
| Line 129 void sound_reset(void) { | Line 130 void sound_reset(void) { |
| if (sndstream.buffer) { | if (sndstream.buffer) { |
| soundmng_reset(); | soundmng_reset(); |
| streamreset(); | streamreset(); |
| dsound_lastclock = nevent.clock; | dsound_lastclock = I286_CLOCK; |
| beep_eventreset(); | beep_eventreset(); |
| } | } |
| } | } |
| Line 157 void sound_sync(void) { | Line 158 void sound_sync(void) { |
| return; | return; |
| } | } |
| length = (nevent.clock + nevent.baseclock - nevent.remainclock | length = (I286_CLOCK + I286_BASECLOCK - I286_REMCLOCK |
| - dsound_lastclock) * ratebase200; | - dsound_lastclock) * ratebase200; |
| if (length < pc.dsoundclock2) { | if (length < pc.dsoundclock2) { |
| return; | return; |
| } | } |
| Line 187 const SINT32 *ret; | Line 188 const SINT32 *ret; |
| SNDCSEC_ENTER; | SNDCSEC_ENTER; |
| if (sndstream.remain) { | if (sndstream.remain) { |
| streamprepare(sndstream.remain); | streamprepare(sndstream.remain); |
| dsound_lastclock = nevent.clock; | dsound_lastclock = I286_CLOCK; |
| beep_eventreset(); | beep_eventreset(); |
| } | } |
| } | } |