We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7b0033 commit d38a756Copy full SHA for d38a756
src_py/_audio.py
@@ -139,6 +139,7 @@ def is_playback(self) -> bool:
139
return _base_audio.is_audio_device_playback(self._state)
140
141
# TODO: this doesn't work for the default device ids...
142
+ # https://github.com/libsdl-org/SDL/issues/14615
143
@property
144
def name(self) -> str:
145
return _base_audio.get_audio_device_name(self._state)
@@ -165,6 +166,8 @@ def gain(self) -> float:
165
166
167
@gain.setter
168
def gain(self, value: float) -> None:
169
+ if value < 0:
170
+ raise ValueError("Gain must be >= 0.")
171
_base_audio.set_audio_device_gain(self._state, value)
172
173
0 commit comments