|
|
| version 1.6, 2003/10/22 15:21:23 | version 1.9, 2003/11/28 08:01:33 |
|---|---|
| Line 33 static SNDSTREAM sndstream; | Line 33 static SNDSTREAM sndstream; |
| static void streamreset(void) { | static void streamreset(void) { |
| SNDCSEC_ENTER; | |
| sndstream.ptr = sndstream.buffer; | sndstream.ptr = sndstream.buffer; |
| sndstream.remain = sndstream.samples + sndstream.reserve; | sndstream.remain = sndstream.samples + sndstream.reserve; |
| sndstream.cbreg = sndstream.cb; | sndstream.cbreg = sndstream.cb; |
| SNDCSEC_LEAVE; | |
| } | } |
| static void streamprepare(UINT samples) { | static void streamprepare(UINT samples) { |
| Line 95 BOOL sound_create(UINT rate, UINT ms) { | Line 97 BOOL sound_create(UINT rate, UINT ms) { |
| } | } |
| sndstream.samples = samples; | sndstream.samples = samples; |
| sndstream.reserve = reserve; | sndstream.reserve = reserve; |
| streamreset(); | |
| SNDCSEC_INIT; | SNDCSEC_INIT; |
| streamreset(); | |
| return(SUCCESS); | return(SUCCESS); |
| scre_err2: | scre_err2: |
| Line 111 void sound_destroy(void) { | Line 113 void sound_destroy(void) { |
| if (sndstream.buffer) { | if (sndstream.buffer) { |
| soundmng_stop(); | soundmng_stop(); |
| streamreset(); | |
| soundmng_destroy(); | soundmng_destroy(); |
| SNDCSEC_TERM; | SNDCSEC_TERM; |
| _MFREE(sndstream.buffer); | _MFREE(sndstream.buffer); |
| Line 205 const SINT32 *sound_pcmlock(void) { | Line 208 const SINT32 *sound_pcmlock(void) { |
| const SINT32 *ret; | const SINT32 *ret; |
| if (locks) { | if (locks) { |
| TRACEOUT(("sound pcm lock: already locked")); | |
| return(NULL); | return(NULL); |
| } | } |
| locks++; | locks++; |
| Line 217 const SINT32 *ret; | Line 221 const SINT32 *ret; |
| beep_eventreset(); | beep_eventreset(); |
| } | } |
| } | } |
| else { | |
| locks--; | |
| } | |
| return(ret); | return(ret); |
| } | } |