Skip to content

Commit 012f50b

Browse files
committed
AudioInfo: bool() check for range
1 parent f55df64 commit 012f50b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AudioTools/CoreAudio/AudioTypes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ struct AudioInfo {
111111
#endif
112112
/// Returns true if all components are defined (no component is 0)
113113
operator bool() {
114-
return sample_rate > 0 && channels > 0 && bits_per_sample > 0;
114+
return sample_rate > 0 && sample_rate <= 100000 && channels > 0 && channels < 20 && bits_per_sample > 0 && bits_per_sample <= 64;
115115
}
116116

117117
virtual void clear() {

0 commit comments

Comments
 (0)