Skip to content

Commit d713e7a

Browse files
committed
bfsoundlib: Removed some sound-related ASM code
1 parent 1ad9ef5 commit d713e7a

7 files changed

Lines changed: 2 additions & 1613 deletions

File tree

bfsoundlib/src/bfaudio.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,6 @@ void InitAudio(AudioInitOptions *audOpts)
200200

201201
void FreeAudio(void)
202202
{
203-
#if 0
204-
asm volatile ("call ASM_FreeAudio\n"
205-
: : : "eax" );
206-
#endif
207203
if (GetCDAble()) {
208204
FreeCD();
209205
if (!SoundAble && !MusicAble)
@@ -219,10 +215,6 @@ void FreeAudio(void)
219215

220216
void SetSoundMasterVolume(long vol)
221217
{
222-
#if 0
223-
asm volatile ("call ASM_SetSoundMasterVolume\n"
224-
: : "a" (vol));
225-
#endif
226218
if (!SoundAble || !SoundInstalled)
227219
return;
228220
if (vol == CurrentSoundMasterVolume || vol > 127 || vol < 0)
@@ -233,10 +225,6 @@ void SetSoundMasterVolume(long vol)
233225

234226
void SetMusicMasterVolume(long vol)
235227
{
236-
#if 0
237-
asm volatile ("call ASM_SetMusicMasterVolume\n"
238-
: : "a" (vol));
239-
#endif
240228
if (!MusicAble || !MusicInstalled)
241229
return;
242230
if (vol == CurrentMusicMasterVolume || vol > 127 || vol < 0)

bfsoundlib/src/init_mus.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ TbBool fm_instrument_file_exists(const char *fname)
7171

7272
sbyte AllocateMusicBankMemory(void)
7373
{
74-
#if 0
75-
TbBool ret;
76-
asm volatile ("call ASM_AllocateMusicBankMemory\n"
77-
: "=r" (ret) : );
78-
return ret;
79-
#endif
8074
ulong musLen, musDataLen;
8175

8276
{

bfsoundlib/src/init_snd.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,6 @@ int AllocateSoundBankMemory(ushort snd_type)
217217

218218
void DetermineSoundType(void)
219219
{
220-
#if 0
221-
asm volatile ("call ASM_DetermineSoundType\n"
222-
: : : "eax" );
223-
#else
224220
int ret;
225221
ubyte tpno;
226222

@@ -260,7 +256,6 @@ void DetermineSoundType(void)
260256
break;
261257
}
262258
SoundType = 0;
263-
#endif
264259
}
265260

266261
static void DoFreeSound(void)

bfsoundlib/src/mseqnlst.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,6 @@ void init_music_bank_songs(void)
9191

9292
ubyte load_music_bank(TbFileHandle fh, ubyte bankId)
9393
{
94-
#if 0
95-
ubyte ret;
96-
asm volatile ("call ASM_load_music_bank\n"
97-
: "=r" (ret) : "a" (fh), "d" (bankId));
98-
return ret;
99-
#endif
10094
ubyte *m;
10195
ubyte *dt;
10296
struct MusicBankHead mbhead[4];
@@ -155,12 +149,6 @@ ubyte load_music_bank(TbFileHandle fh, ubyte bankId)
155149

156150
int LoadMusic(ushort bankNo)
157151
{
158-
#if 0
159-
int ret;
160-
asm volatile ("call ASM_LoadMusic\n"
161-
: "=r" (ret) : "a" (a1));
162-
return ret;
163-
#endif
164152
TbFileHandle fh;
165153
long fsize;
166154
ulong nbanks_offs;

bfsoundlib/src/ssamplst.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ void StopSampleQueueList(void)
9595

9696
void format_sounds(void)
9797
{
98-
#if 0
99-
asm volatile ("call ASM_format_sounds\n"
100-
: : );
101-
#else
10298
short n;
10399
struct BfSfxInfo *sfiend;
104100
ubyte *dt;
@@ -122,17 +118,10 @@ void format_sounds(void)
122118
SfxData = dt;
123119
EndSfxs = sfiend;
124120
NumberOfSamples = n;
125-
#endif
126121
}
127122

128123
ubyte load_sound_bank(TbFileHandle fh, ubyte bank_tpno)
129124
{
130-
#if 0
131-
ubyte ret;
132-
asm volatile ("call ASM_load_sound_bank\n"
133-
: "=r" (ret) : "a" (fh), "d" (bank_tpno));
134-
return ret;
135-
#else
136125
struct BfSoundBankHead head[9];
137126

138127
LbFileRead(fh, head, 9 * sizeof(struct BfSoundBankHead));
@@ -175,7 +164,6 @@ ubyte load_sound_bank(TbFileHandle fh, ubyte bank_tpno)
175164

176165
SoundAble = 1;
177166
return 1;
178-
#endif
179167
}
180168

181169
int LoadSounds(ubyte bank_no)

conf/wrappers_game.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ allocate_buffers W i
288288
free_buffers W v
289289
StartMusic W v ii
290290
StopMusic W v
291+
close_adpcm_file W v
291292
load_music_bank W i ii
292293
setup_heap_manager W i pipi
293294
process_sound_heap W v

0 commit comments

Comments
 (0)