| Summary: | SDL_BuildAudioCVT add useless endianness conversion in some cases | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Patrice Mandin <patmandin> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.9 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Patrice Mandin
2006-09-14 17:50:45 UTC
This is definitely fixed in 1.3, since the datatype conversion code is completely rewritten, but I'll look at this for 1.2. --ryan. This small check fixed the problem for me. It just checks both src and dst are 16bits to convert endianness. I will commit it if there are no problems.
@@ -1374,12 +1375,14 @@
/* First filter: Endian conversion from src to dst */
if ( (src_format & 0x1000) != (dst_format & 0x1000)
- && ((src_format & 0xff) != 8) ) {
+ && ((src_format & 0xff) == 16) && ((dst_format & 0xff) == 16)) {
cvt->filters[cvt->filter_index++] = SDL_ConvertEndian;
}
Go ahead. --ryan. |