Skip to content

Commit

Permalink
Use PS2-y global names on SampMan
Browse files Browse the repository at this point in the history
  • Loading branch information
erorcun committed Jun 27, 2021
1 parent a923728 commit 091a659
Show file tree
Hide file tree
Showing 6 changed files with 273 additions and 273 deletions.
122 changes: 61 additions & 61 deletions src/audio/AudioLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,69 +58,69 @@ enum LOADING_STATUS { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOAD
void
cAudioManager::PreInitialiseGameSpecificSetup() const
{
BankStartOffset[SFX_BANK_0] = SAMPLEBANK_START;
gBankStartOffset[SFX_BANK_0] = SAMPLEBANK_START;
#ifdef GTA_PS2
BankStartOffset[SFX_BANK_PACARD] = SFX_CAR_ACCEL_1;
BankStartOffset[SFX_BANK_PATHFINDER] = SFX_CAR_ACCEL_2;
BankStartOffset[SFX_BANK_PORSCHE] = SFX_CAR_ACCEL_3;
BankStartOffset[SFX_BANK_SPIDER] = SFX_CAR_ACCEL_4;
BankStartOffset[SFX_BANK_MERC] = SFX_CAR_ACCEL_5;
BankStartOffset[SFX_BANK_TRUCK] = SFX_CAR_ACCEL_6;
BankStartOffset[SFX_BANK_HOTROD] = SFX_CAR_ACCEL_7;
BankStartOffset[SFX_BANK_COBRA] = SFX_CAR_ACCEL_8;
BankStartOffset[SFX_BANK_NONE] = SFX_CAR_ACCEL_9;
BankStartOffset[SFX_BANK_FRONT_END_MENU] = SFX_PAGE_CHANGE_AND_BACK_LEFT;
BankStartOffset[SFX_BANK_TRAIN] = SFX_TRAIN_STATION_AMBIENCE_LOOP;
BankStartOffset[SFX_BANK_BUILDING_CLUB_1] = SFX_CLUB_1;
BankStartOffset[SFX_BANK_BUILDING_CLUB_2] = SFX_CLUB_2;
BankStartOffset[SFX_BANK_BUILDING_CLUB_3] = SFX_CLUB_3;
BankStartOffset[SFX_BANK_BUILDING_CLUB_4] = SFX_CLUB_4;
BankStartOffset[SFX_BANK_BUILDING_CLUB_5] = SFX_CLUB_5;
BankStartOffset[SFX_BANK_BUILDING_CLUB_6] = SFX_CLUB_6;
BankStartOffset[SFX_BANK_BUILDING_CLUB_7] = SFX_CLUB_7;
BankStartOffset[SFX_BANK_BUILDING_CLUB_8] = SFX_CLUB_8;
BankStartOffset[SFX_BANK_BUILDING_CLUB_9] = SFX_CLUB_9;
BankStartOffset[SFX_BANK_BUILDING_CLUB_10] = SFX_CLUB_10;
BankStartOffset[SFX_BANK_BUILDING_CLUB_11] = SFX_CLUB_11;
BankStartOffset[SFX_BANK_BUILDING_CLUB_12] = SFX_CLUB_12;
BankStartOffset[SFX_BANK_BUILDING_CLUB_RAGGA] = SFX_CLUB_RAGGA;
BankStartOffset[SFX_BANK_BUILDING_STRIP_CLUB_1] = SFX_STRIP_CLUB_1;
BankStartOffset[SFX_BANK_BUILDING_STRIP_CLUB_2] = SFX_STRIP_CLUB_2;
BankStartOffset[SFX_BANK_BUILDING_WORKSHOP] = SFX_WORKSHOP_1;
BankStartOffset[SFX_BANK_BUILDING_PIANO_BAR] = SFX_PIANO_BAR_1;
BankStartOffset[SFX_BANK_BUILDING_SAWMILL] = SFX_SAWMILL_LOOP;
BankStartOffset[SFX_BANK_BUILDING_DOG_FOOD_FACTORY] = SFX_DOG_FOOD_FACTORY;
BankStartOffset[SFX_BANK_BUILDING_LAUNDERETTE] = SFX_LAUNDERETTE_LOOP;
BankStartOffset[SFX_BANK_BUILDING_RESTAURANT_CHINATOWN] = SFX_RESTAURANT_CHINATOWN;
BankStartOffset[SFX_BANK_BUILDING_RESTAURANT_ITALY] = SFX_RESTAURANT_ITALY;
BankStartOffset[SFX_BANK_BUILDING_RESTAURANT_GENERIC_1] = SFX_RESTAURANT_GENERIC_1;
BankStartOffset[SFX_BANK_BUILDING_RESTAURANT_GENERIC_2] = SFX_RESTAURANT_GENERIC_2;
BankStartOffset[SFX_BANK_BUILDING_AIRPORT] = SFX_AIRPORT_ANNOUNCEMENT_1;
BankStartOffset[SFX_BANK_BUILDING_SHOP] = SFX_SHOP_LOOP;
BankStartOffset[SFX_BANK_BUILDING_CINEMA] = SFX_CINEMA_BASS_1;
BankStartOffset[SFX_BANK_BUILDING_DOCKS] = SFX_DOCKS_FOGHORN;
BankStartOffset[SFX_BANK_BUILDING_HOME] = SFX_HOME_1;
BankStartOffset[SFX_BANK_BUILDING_PORN_1] = SFX_PORN_1_LOOP;
BankStartOffset[SFX_BANK_BUILDING_PORN_2] = SFX_PORN_2_LOOP;
BankStartOffset[SFX_BANK_BUILDING_PORN_3] = SFX_PORN_3_LOOP;
BankStartOffset[SFX_BANK_BUILDING_POLICE_BALL] = SFX_POLICE_BALL_1;
BankStartOffset[SFX_BANK_BUILDING_BANK_ALARM] = SFX_BANK_ALARM_1;
BankStartOffset[SFX_BANK_BUILDING_RAVE_INDUSTRIAL] = SFX_RAVE_INDUSTRIAL;
BankStartOffset[SFX_BANK_BUILDING_RAVE_COMMERCIAL] = SFX_RAVE_COMMERCIAL;
BankStartOffset[SFX_BANK_BUILDING_RAVE_SUBURBAN] = SFX_RAVE_SUBURBAN;
BankStartOffset[SFX_BANK_BUILDING_RAVE_COMMERCIAL_2] = SFX_RAVE_COMMERCIAL_2;
BankStartOffset[SFX_BANK_BUILDING_39] = SFX_CLUB_1_1;
BankStartOffset[SFX_BANK_BUILDING_40] = SFX_CLUB_1_2;
BankStartOffset[SFX_BANK_BUILDING_41] = SFX_CLUB_1_3;
BankStartOffset[SFX_BANK_BUILDING_42] = SFX_CLUB_1_4;
BankStartOffset[SFX_BANK_BUILDING_43] = SFX_CLUB_1_5;
BankStartOffset[SFX_BANK_BUILDING_44] = SFX_CLUB_1_6;
BankStartOffset[SFX_BANK_BUILDING_45] = SFX_CLUB_1_7;
BankStartOffset[SFX_BANK_BUILDING_46] = SFX_CLUB_1_8;
BankStartOffset[SFX_BANK_BUILDING_47] = SFX_CLUB_1_9;
BankStartOffset[SFX_BANK_GENERIC_EXTRA] = SFX_EXPLOSION_1;
gBankStartOffset[SFX_BANK_PACARD] = SFX_CAR_ACCEL_1;
gBankStartOffset[SFX_BANK_PATHFINDER] = SFX_CAR_ACCEL_2;
gBankStartOffset[SFX_BANK_PORSCHE] = SFX_CAR_ACCEL_3;
gBankStartOffset[SFX_BANK_SPIDER] = SFX_CAR_ACCEL_4;
gBankStartOffset[SFX_BANK_MERC] = SFX_CAR_ACCEL_5;
gBankStartOffset[SFX_BANK_TRUCK] = SFX_CAR_ACCEL_6;
gBankStartOffset[SFX_BANK_HOTROD] = SFX_CAR_ACCEL_7;
gBankStartOffset[SFX_BANK_COBRA] = SFX_CAR_ACCEL_8;
gBankStartOffset[SFX_BANK_NONE] = SFX_CAR_ACCEL_9;
gBankStartOffset[SFX_BANK_FRONT_END_MENU] = SFX_PAGE_CHANGE_AND_BACK_LEFT;
gBankStartOffset[SFX_BANK_TRAIN] = SFX_TRAIN_STATION_AMBIENCE_LOOP;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_1] = SFX_CLUB_1;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_2] = SFX_CLUB_2;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_3] = SFX_CLUB_3;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_4] = SFX_CLUB_4;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_5] = SFX_CLUB_5;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_6] = SFX_CLUB_6;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_7] = SFX_CLUB_7;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_8] = SFX_CLUB_8;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_9] = SFX_CLUB_9;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_10] = SFX_CLUB_10;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_11] = SFX_CLUB_11;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_12] = SFX_CLUB_12;
gBankStartOffset[SFX_BANK_BUILDING_CLUB_RAGGA] = SFX_CLUB_RAGGA;
gBankStartOffset[SFX_BANK_BUILDING_STRIP_CLUB_1] = SFX_STRIP_CLUB_1;
gBankStartOffset[SFX_BANK_BUILDING_STRIP_CLUB_2] = SFX_STRIP_CLUB_2;
gBankStartOffset[SFX_BANK_BUILDING_WORKSHOP] = SFX_WORKSHOP_1;
gBankStartOffset[SFX_BANK_BUILDING_PIANO_BAR] = SFX_PIANO_BAR_1;
gBankStartOffset[SFX_BANK_BUILDING_SAWMILL] = SFX_SAWMILL_LOOP;
gBankStartOffset[SFX_BANK_BUILDING_DOG_FOOD_FACTORY] = SFX_DOG_FOOD_FACTORY;
gBankStartOffset[SFX_BANK_BUILDING_LAUNDERETTE] = SFX_LAUNDERETTE_LOOP;
gBankStartOffset[SFX_BANK_BUILDING_RESTAURANT_CHINATOWN] = SFX_RESTAURANT_CHINATOWN;
gBankStartOffset[SFX_BANK_BUILDING_RESTAURANT_ITALY] = SFX_RESTAURANT_ITALY;
gBankStartOffset[SFX_BANK_BUILDING_RESTAURANT_GENERIC_1] = SFX_RESTAURANT_GENERIC_1;
gBankStartOffset[SFX_BANK_BUILDING_RESTAURANT_GENERIC_2] = SFX_RESTAURANT_GENERIC_2;
gBankStartOffset[SFX_BANK_BUILDING_AIRPORT] = SFX_AIRPORT_ANNOUNCEMENT_1;
gBankStartOffset[SFX_BANK_BUILDING_SHOP] = SFX_SHOP_LOOP;
gBankStartOffset[SFX_BANK_BUILDING_CINEMA] = SFX_CINEMA_BASS_1;
gBankStartOffset[SFX_BANK_BUILDING_DOCKS] = SFX_DOCKS_FOGHORN;
gBankStartOffset[SFX_BANK_BUILDING_HOME] = SFX_HOME_1;
gBankStartOffset[SFX_BANK_BUILDING_PORN_1] = SFX_PORN_1_LOOP;
gBankStartOffset[SFX_BANK_BUILDING_PORN_2] = SFX_PORN_2_LOOP;
gBankStartOffset[SFX_BANK_BUILDING_PORN_3] = SFX_PORN_3_LOOP;
gBankStartOffset[SFX_BANK_BUILDING_POLICE_BALL] = SFX_POLICE_BALL_1;
gBankStartOffset[SFX_BANK_BUILDING_BANK_ALARM] = SFX_BANK_ALARM_1;
gBankStartOffset[SFX_BANK_BUILDING_RAVE_INDUSTRIAL] = SFX_RAVE_INDUSTRIAL;
gBankStartOffset[SFX_BANK_BUILDING_RAVE_COMMERCIAL] = SFX_RAVE_COMMERCIAL;
gBankStartOffset[SFX_BANK_BUILDING_RAVE_SUBURBAN] = SFX_RAVE_SUBURBAN;
gBankStartOffset[SFX_BANK_BUILDING_RAVE_COMMERCIAL_2] = SFX_RAVE_COMMERCIAL_2;
gBankStartOffset[SFX_BANK_BUILDING_39] = SFX_CLUB_1_1;
gBankStartOffset[SFX_BANK_BUILDING_40] = SFX_CLUB_1_2;
gBankStartOffset[SFX_BANK_BUILDING_41] = SFX_CLUB_1_3;
gBankStartOffset[SFX_BANK_BUILDING_42] = SFX_CLUB_1_4;
gBankStartOffset[SFX_BANK_BUILDING_43] = SFX_CLUB_1_5;
gBankStartOffset[SFX_BANK_BUILDING_44] = SFX_CLUB_1_6;
gBankStartOffset[SFX_BANK_BUILDING_45] = SFX_CLUB_1_7;
gBankStartOffset[SFX_BANK_BUILDING_46] = SFX_CLUB_1_8;
gBankStartOffset[SFX_BANK_BUILDING_47] = SFX_CLUB_1_9;
gBankStartOffset[SFX_BANK_GENERIC_EXTRA] = SFX_EXPLOSION_1;
#endif // GTA_PS2
BankStartOffset[SFX_BANK_PED_COMMENTS] = SAMPLEBANK_PED_START;
gBankStartOffset[SFX_BANK_PED_COMMENTS] = SAMPLEBANK_PED_START;
}

void
Expand Down
2 changes: 1 addition & 1 deletion src/audio/oal/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bool bChannelsCreated = false;

int32 CChannel::channelsThatNeedService = 0;

uint8 tempStereoBuffer[PED_BLOCKSIZE * 2];
uint8 tempStereoBuffer[PED_BUFFERSIZE * 2];

void
CChannel::InitChannels()
Expand Down
6 changes: 3 additions & 3 deletions src/audio/sampman.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ enum
};

#define MAX_PEDSFX 7
#define PED_BLOCKSIZE 79000
#define PED_BUFFERSIZE 79000

#define MAXPROVIDERS 64

Expand Down Expand Up @@ -130,7 +130,7 @@ class cSampleManager
bool8 m_bInitialised;
uint8 m_nNumberOfProviders;
char *m_aAudioProviders[MAXPROVIDERS];
tSample m_aSamples[TOTAL_AUDIO_SAMPLES];
tSample m_aSampleDataTable[TOTAL_AUDIO_SAMPLES];

public:

Expand Down Expand Up @@ -217,7 +217,7 @@ class cSampleManager
};

extern cSampleManager SampleManager;
extern uint32 BankStartOffset[MAX_SFX_BANKS];
extern uint32 gBankStartOffset[MAX_SFX_BANKS];

#ifdef AUDIO_OAL
extern int defaultProvider;
Expand Down
Loading

0 comments on commit 091a659

Please sign in to comment.