Skip to content

Commit 23ac5c3

Browse files
committed
Fix sound range.
1 parent 2e2493d commit 23ac5c3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

app/notification-generator/page.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default function NotificationGeneratorPage() {
9696
soundCategory: "",
9797
titleHide: false,
9898
pitch: "1.0",
99-
volume: "2.0",
99+
volume: "1.0",
100100
});
101101

102102
const [yamlCode, setYamlCode] = useState("");
@@ -137,8 +137,12 @@ export default function NotificationGeneratorPage() {
137137
}
138138

139139
if (notification.sound) {
140-
const volume = notification.volume || "2.0";
141-
const pitch = notification.pitch || "1.0";
140+
const volumeValue = notification.volume || "1.0";
141+
const pitchValue = notification.pitch || "1.0";
142+
143+
const volume = parseFloat(volumeValue).toFixed(1);
144+
const pitch = parseFloat(pitchValue).toFixed(1);
145+
142146
if (notification.soundCategory) {
143147
parts.push(
144148
`sound: "${notification.sound} ${notification.soundCategory} ${volume} ${pitch}"`

0 commit comments

Comments
 (0)