Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151927986
D48765.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48765.id.diff
View Options
diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c
--- a/sys/dev/sound/pcm/feeder_rate.c
+++ b/sys/dev/sound/pcm/feeder_rate.c
@@ -502,10 +502,6 @@
#define Z_CLIP_CHECK(...)
#endif
-#define Z_CLAMP(v, BIT) \
- (((v) > PCM_S##BIT##_MAX) ? PCM_S##BIT##_MAX : \
- (((v) < PCM_S##BIT##_MIN) ? PCM_S##BIT##_MIN : (v)))
-
/*
* Sine Cardinal (SINC) Interpolation. Scaling is done in 64 bit, so
* there's no point to hold the plate any longer. All samples will be
@@ -574,7 +570,7 @@
else \
v >>= Z_COEFF_SHIFT - Z_GUARD_BIT_##BIT; \
Z_CLIP_CHECK(v, BIT); \
- pcm_sample_write(dst, Z_CLAMP(v, BIT), \
+ pcm_sample_write(dst, pcm_clamp(v, AFMT_##SIGN##BIT##_##ENDIAN),\
AFMT_##SIGN##BIT##_##ENDIAN); \
} while (ch != 0); \
}
@@ -614,7 +610,7 @@
else \
v >>= Z_COEFF_SHIFT - Z_GUARD_BIT_##BIT; \
Z_CLIP_CHECK(v, BIT); \
- pcm_sample_write(dst, Z_CLAMP(v, BIT), \
+ pcm_sample_write(dst, pcm_clamp(v, AFMT_##SIGN##BIT##_##ENDIAN),\
AFMT_##SIGN##BIT##_##ENDIAN); \
} while (ch != 0); \
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 12, 2:09 PM (21 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31352508
Default Alt Text
D48765.id.diff (1 KB)
Attached To
Mode
D48765: sound: Retire Z_CLAMP()
Attached
Detach File
Event Timeline
Log In to Comment