Skip to content

Commit

Permalink
Fix AVAudioPlayer decoding issues (JohanDegraeve#458)
Browse files Browse the repository at this point in the history
Reencode all sound files as .caf files with PCM mono LIE16 to prevent AVAudioPlayer() from crashing on locally installed instances via Xcode. This stops AVAudioPlayer from crashing in iOS17.
  • Loading branch information
LiroyvH authored Sep 15, 2023
1 parent 7344250 commit 4091be7
Show file tree
Hide file tree
Showing 140 changed files with 70 additions and 70 deletions.
112 changes: 56 additions & 56 deletions xdrip.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions xdrip/Constants/ConstantsSounds.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ enum ConstantsSounds: String, CaseIterable {

// here using case iso properties because we want to iterate through them
// name of the sound as shown to the user, and also stored in the alerttype
case batterwakeup = "Better Wake Up/betterwakeup.mp3"
case bruteforce = "Brute Force/bruteforce.mp3"
case modernalarm2 = "Modern Alert 2/modern2.mp3"
case modernalarm = "Modern Alert/modernalarm.mp3"
case shorthigh1 = "Short High 1/shorthigh1.mp3"
case shorthigh2 = "Short High 2/shorthigh2.mp3"
case shorthigh3 = "Short High 3/shorthigh3.mp3"
case shorthigh4 = "Short High 4/shorthigh4.mp3"
case shortlow1 = "Short Low 1/shortlow1.mp3"
case shortlow2 = "Short Low 2/shortlow2.mp3"
case shortlow3 = "Short Low 3/shortlow3.mp3"
case shortlow4 = "Short Low 4/shortlow4.mp3"
case spaceship = "Space Ship/spaceship.mp3"
case batterwakeup = "Better Wake Up/betterwakeup.caf"
case bruteforce = "Brute Force/bruteforce.caf"
case modernalarm2 = "Modern Alert 2/modern2.caf"
case modernalarm = "Modern Alert/modernalarm.caf"
case shorthigh1 = "Short High 1/shorthigh1.caf"
case shorthigh2 = "Short High 2/shorthigh2.caf"
case shorthigh3 = "Short High 3/shorthigh3.caf"
case shorthigh4 = "Short High 4/shorthigh4.caf"
case shortlow1 = "Short Low 1/shortlow1.caf"
case shortlow2 = "Short Low 2/shortlow2.caf"
case shortlow3 = "Short Low 3/shortlow3.caf"
case shortlow4 = "Short Low 4/shortlow4.caf"
case spaceship = "Space Ship/spaceship.caf"
case xdripalert = "xDrip Alert/xdripalert.aif"

// copied from Spike project https://github.com/SpikeApp/Spike/tree/master/src/assets/sounds
Expand Down
2 changes: 1 addition & 1 deletion xdrip/Constants/ConstantsSuspensionPrevention.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
enum ConstantsSuspensionPrevention {

/// name of the file that has the sound to play
static let soundFileName = "1-millisecond-of-silence.mp3"//20ms-of-silence.caf"
static let soundFileName = "1-millisecond-of-silence.caf"//20ms-of-silence.caf"

/// how often to play the sound, in seconds
static let interval = 5
Expand Down
Binary file not shown.
Binary file removed xdrip/Resources/sounds/1-millisecond-of-silence.mp3
Binary file not shown.
Binary file modified xdrip/Resources/sounds/20ms-of-silence.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Alarm_Buzzer.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Alarm_Clock.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Alert_Tone_Busy.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Alert_Tone_Ringtone_1.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Alert_Tone_Ringtone_2.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Alien_Siren.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Ambulance.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Analog_Watch_Alarm.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Big_Clock_Ticking.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Burglar_Alarm_Siren_1.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Burglar_Alarm_Siren_2.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/CSFX-2_Alarm.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Ascend_Climb_Sneaky.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Ascend_Then_Descend.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Bounce_To_Ceiling.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Dreamy_Glissando_Harp.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Fail_Strings_Trumpet.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Machine_Clumsy_Loop.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Siren.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Tip_Toe_Sneaky_Walk.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Uh_Oh.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cartoon_Villain_Horns.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cell_Phone_Ring_Tone.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Chimes_Glassy.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Computer_Magic.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Cuckoo_Clock.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Dhol_Shuffleloop.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Discreet.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Early_Sunrise.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Emergency_Alarm.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Emergency_Alarm_Carbon_Monoxide.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Emergency_Alarm_Siren.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Ending_Reached.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Fly.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Ghost_Hover.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Good_Morning.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Hell_Yeah_Somewhat_Calmer.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/In_A_Hurry.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Indeed.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Insistently.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Jingle_All_The_Way.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Laser_Shoot.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Machine_Charge.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Magical_Twinkle.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Marching_Heavy_Footed_Fat_Elephants.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Marimba_Descend.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Marimba_Flutter_or_Shake.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Martian_Gun.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Martian_Scanner.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Metallic.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Nightguard.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Not_Kiddin.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Open_Your_Eyes_And_See.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Orchestral_Horns.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Oringz.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Pager_Beeps.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Remembers_Me_Of_Asia.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Rise_And_Shine.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Rush.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Air_Raid_Alarm.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Alarm.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Alarm_Loop_1.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Alarm_Loop_2.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Alarm_Loop_3.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Alarm_Loop_4.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Computer_Console_Alarm.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Console_Alarm.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Eerie_Alarm.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Engine_Shut_Down.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Incoming_Message_Alert.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Spaceship_Message.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Spaceship_Warm_Up.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sci-Fi_Warning.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Signature_Corporate.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_Calibration_Needed.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_Device_Muted.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_Glucose_Dropping_Fast.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_Glucose_Rising_Fast.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_High_Glucose.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_Low_Glucose.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_Missed_Readings.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_Transmitter_Battery_Low.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_Urgent_High_Glucose.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Alert_Urgent_Low_Glucose.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Calibration_Needed.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Device_Muted.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Glucose_Dropping_Fast.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Glucose_Rising_Fast.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_High_Glucose.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Low_Glucose.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Missed_Readings.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Transmitter_Battery_Low.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Urgent_High_Glucose.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Siri_Urgent_Low_Glucose.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Soft_Marimba_Pad_Positive.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Soft_Warm_Airy_Optimistic.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Soft_Warm_Airy_Reassuring.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Store_Door_Chime.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Sunny.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Thunder_Sound_FX.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Time_Has_Come.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Tornado_Siren.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Two_Turtle_Doves.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Unpaved.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Wake_Up_Will_You.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Win_Gain.caf
Binary file not shown.
Binary file modified xdrip/Resources/sounds/Wrong_Answer.caf
Binary file not shown.
Binary file added xdrip/Resources/sounds/betterwakeup.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/betterwakeup.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/bruteforce.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/bruteforce.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/modern2.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/modern2.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/modernalarm.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/modernalarm.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/shorthigh1.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/shorthigh1.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/shorthigh2.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/shorthigh2.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/shorthigh3.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/shorthigh3.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/shorthigh4.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/shorthigh4.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/shortlow1.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/shortlow1.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/shortlow2.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/shortlow2.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/shortlow3.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/shortlow3.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/shortlow4.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/shortlow4.mp3
Binary file not shown.
Binary file added xdrip/Resources/sounds/spaceship.caf
Binary file not shown.
Binary file removed xdrip/Resources/sounds/spaceship.mp3
Binary file not shown.
Binary file modified xdrip/Resources/sounds/xdripalert.aif
Binary file not shown.

0 comments on commit 4091be7

Please sign in to comment.