|
|
| version 1.6, 2003/11/28 08:01:33 | version 1.10, 2005/02/16 09:31:55 |
|---|---|
| Line 6 | Line 6 |
| #include "soundmng.h" | #include "soundmng.h" |
| #include "extromio.h" | #include "extromio.h" |
| #include "sound.h" | #include "sound.h" |
| #include "juliet.h" | |
| #if defined(VERMOUTH_LIB) | #if defined(VERMOUTH_LIB) |
| #include "vermouth.h" | #include "vermouth.h" |
| #endif | #endif |
| Line 36 void __fastcall satuation_s16mmx(SINT16 | Line 37 void __fastcall satuation_s16mmx(SINT16 |
| static LPDIRECTSOUND pDSound; | static LPDIRECTSOUND pDSound; |
| static LPDIRECTSOUNDBUFFER pDSData3; | static LPDIRECTSOUNDBUFFER pDSData3; |
| static UINT dsstreambytes; | static UINT dsstreambytes; |
| static BYTE dsstreamevent; | static UINT8 dsstreamevent; |
| static LPDIRECTSOUNDBUFFER pDSwave3[SOUND_MAXPCM]; | static LPDIRECTSOUNDBUFFER pDSwave3[SOUND_MAXPCM]; |
| static UINT mute; | static UINT mute; |
| static void (PARTSCALL *fnmix)(SINT16 *dst, | static void (PARTSCALL *fnmix)(SINT16 *dst, |
| Line 49 static void (PARTSCALL *fnmix)(SINT16 | Line 50 static void (PARTSCALL *fnmix)(SINT16 |
| // ---- directsound | // ---- directsound |
| static BOOL dsoundcreate(void) { | static BRESULT dsoundcreate(void) { |
| // DirectSoundの初期化 | // DirectSoundの初期化 |
| if (FAILED(DirectSoundCreate(0, &pDSound, 0))) { | if (FAILED(DirectSoundCreate(0, &pDSound, 0))) { |
| Line 87 UINT soundmng_create(UINT rate, UINT ms) | Line 88 UINT soundmng_create(UINT rate, UINT ms) |
| } | } |
| // キーボード表示のディレイ設定 | // キーボード表示のディレイ設定 |
| // keydispr_delayinit((BYTE)((ms * 10 + 563) / 564)); | // keydispr_delayinit((UINT8)((ms * 10 + 563) / 564)); |
| samples = (rate * ms) / 2000; | samples = (rate * ms) / 2000; |
| samples = (samples + 3) & (~3); | samples = (samples + 3) & (~3); |
| Line 117 UINT soundmng_create(UINT rate, UINT ms) | Line 118 UINT soundmng_create(UINT rate, UINT ms) |
| vermouth_module = midimod_create(rate); | vermouth_module = midimod_create(rate); |
| midimod_loadall(vermouth_module); | midimod_loadall(vermouth_module); |
| #endif | #endif |
| dsstreamevent = (BYTE)-1; | dsstreamevent = (UINT8)-1; |
| soundmng_reset(); | soundmng_reset(); |
| return(samples); | return(samples); |
| Line 145 void soundmng_reset(void) { | Line 146 void soundmng_reset(void) { |
| } | } |
| pDSData3->Unlock(blockptr1, blocksize1, blockptr2, blocksize2); | pDSData3->Unlock(blockptr1, blocksize1, blockptr2, blocksize2); |
| pDSData3->SetCurrentPosition(0); | pDSData3->SetCurrentPosition(0); |
| dsstreamevent = (BYTE)-1; | dsstreamevent = (UINT8)-1; |
| } | } |
| } | } |
| Line 172 static void streamenable(BOOL play) { | Line 173 static void streamenable(BOOL play) { |
| pDSData3->Stop(); | pDSData3->Stop(); |
| } | } |
| } | } |
| juliet_YMF288Enable(play); | |
| } | } |
| void soundmng_play(void) { | void soundmng_play(void) { |
| Line 295 static void pcmstop(void) { | Line 297 static void pcmstop(void) { |
| } | } |
| } | } |
| void soundmng_pcmload(UINT num, const char *filename, UINT type) { | void soundmng_pcmload(UINT num, const OEMCHAR *filename, UINT type) { |
| EXTROMH erh; | EXTROMH erh; |
| RIFF_HEADER riff; | RIFF_HEADER riff; |
| Line 406 void soundmng_pcmvolume(UINT num, int vo | Line 408 void soundmng_pcmvolume(UINT num, int vo |
| } | } |
| } | } |
| BOOL soundmng_pcmplay(UINT num, BOOL loop) { | BRESULT soundmng_pcmplay(UINT num, BOOL loop) { |
| LPDIRECTSOUNDBUFFER dsbuf; | LPDIRECTSOUNDBUFFER dsbuf; |
| Line 436 void soundmng_pcmstop(UINT num) { | Line 438 void soundmng_pcmstop(UINT num) { |
| // ---- | // ---- |
| BOOL soundmng_initialize(void) { | BRESULT soundmng_initialize(void) { |
| if (dsoundcreate() != SUCCESS) { | if (dsoundcreate() != SUCCESS) { |
| goto smcre_err; | goto smcre_err; |