SDL: Set the headphones to 50% volume to avoid blasting people's ears

From 1d83b782b85ec7bb9f3d3c582710c26371fa39b4 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 3 Jun 2024 17:28:32 -0700
Subject: [PATCH] Set the headphones to 50% volume to avoid blasting people's
 ears

Also fixed audio routing comments
---
 test/testcontroller.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/testcontroller.c b/test/testcontroller.c
index b5e1041ec8271..598ec081011f9 100644
--- a/test/testcontroller.c
+++ b/test/testcontroller.c
@@ -203,27 +203,27 @@ static void CyclePS5AudioRoute(Controller *device)
     case 0:
         /* Audio disabled */
         state.ucEnableBits1 |= (0x80 | 0x20 | 0x10); /* Modify audio route and speaker / headphone volume */
-        state.ucSpeakerVolume = 0;                   /* Maximum volume */
-        state.ucHeadphoneVolume = 0;                 /* Maximum volume */
+        state.ucSpeakerVolume = 0;                   /* Minimum volume */
+        state.ucHeadphoneVolume = 0;                 /* Minimum volume */
         state.ucAudioEnableBits = 0x00;              /* Output to headphones */
         break;
     case 1:
         /* Headphones */
         state.ucEnableBits1 |= (0x80 | 0x10); /* Modify audio route and headphone volume */
-        state.ucHeadphoneVolume = 100;        /* Maximum volume */
+        state.ucHeadphoneVolume = 50;         /* 50% volume - don't blast into the ears */
         state.ucAudioEnableBits = 0x00;       /* Output to headphones */
         break;
     case 2:
         /* Speaker */
         state.ucEnableBits1 |= (0x80 | 0x20); /* Modify audio route and speaker volume */
         state.ucSpeakerVolume = 100;          /* Maximum volume */
-        state.ucAudioEnableBits = 0x30;       /* Output to headphones */
+        state.ucAudioEnableBits = 0x30;       /* Output to speaker */
         break;
     case 3:
         /* Both */
         state.ucEnableBits1 |= (0x80 | 0x20 | 0x10); /* Modify audio route and speaker / headphone volume */
         state.ucSpeakerVolume = 100;                 /* Maximum volume */
-        state.ucHeadphoneVolume = 100;               /* Maximum volume */
+        state.ucHeadphoneVolume = 50;                /* 50% volume - don't blast into the ears */
         state.ucAudioEnableBits = 0x20;              /* Output to both speaker and headphones */
         break;
     }