mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Add beep sound to platforms with no beep
This commit is contained in:
@@ -249,7 +249,7 @@ void DoAboutOpenSource(void)
|
||||
|
||||
static const int kAboutOpenSourceDialogTemplateID = 2005;
|
||||
|
||||
const Rect windowRect = Rect::Create(0, 0, 324, 512);
|
||||
const Rect windowRect = Rect::Create(0, 0, 348, 512);
|
||||
|
||||
PortabilityLayer::WindowDef wdef = PortabilityLayer::WindowDef::Create(windowRect, PortabilityLayer::WindowStyleFlags::kAlert, true, 0, 0, PSTR(""));
|
||||
|
||||
|
||||
@@ -115,7 +115,8 @@
|
||||
#define kTransInSound 60 // <20><> <20><>
|
||||
#define kBonusSound 61 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define kHissSound 62 //
|
||||
#define kTriggerSound 63
|
||||
#define kPingSound 63 //
|
||||
#define kTriggerSound 64 // This must be the last one
|
||||
|
||||
#define kHitWallPriority 100 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define kScoreTikPriority 101 // <20><>
|
||||
@@ -177,6 +178,7 @@
|
||||
#define kFollowPriority 904
|
||||
#define kTransInPriority 905
|
||||
#define kTransOutPriority 906
|
||||
#define kPingPriority 907
|
||||
#define kTriggerPriority 999
|
||||
|
||||
#define kArrowCursor 0
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
#define kBaseBufferSoundID 1000
|
||||
#define kMaxSounds 64
|
||||
#define kMaxSounds 65
|
||||
|
||||
|
||||
void CallBack0 (PortabilityLayer::AudioChannel *);
|
||||
@@ -38,7 +38,7 @@ IGpAudioBuffer *ParseAndConvertSound(const THandle<void> &handle);
|
||||
PortabilityLayer::AudioChannel *channel0, *channel1, *channel2;
|
||||
IGpAudioBuffer *theSoundData[kMaxSounds];
|
||||
short numSoundsLoaded;
|
||||
Boolean soundLoaded[kMaxSounds], dontLoadSounds;
|
||||
Boolean dontLoadSounds;
|
||||
Boolean channelOpen, isSoundOn, failedSound;
|
||||
|
||||
//============================================================== Functions
|
||||
@@ -341,6 +341,14 @@ void CloseSoundChannels (void)
|
||||
channelOpen = false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- PingBeep
|
||||
|
||||
void PingBeep (int duration)
|
||||
{
|
||||
PlayPrioritySound(kPingSound, kPingPriority);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------- InitSound
|
||||
|
||||
void InitSound (void)
|
||||
@@ -376,6 +384,8 @@ void InitSound (void)
|
||||
failedSound = true;
|
||||
}
|
||||
}
|
||||
|
||||
SetBeepFunction (PingBeep);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- KillSound
|
||||
|
||||
Reference in New Issue
Block a user