mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
audio/polyphone: fix build on big-endian
../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:293:5: error: use of undeclared identifier 'bioP' 293 | INBITS(w, n); | ^ ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:62:5: note: expanded from macro 'INBITS' 62 | CHECK_INBUFFER \ | ^ ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:76:9: note: expanded from macro 'CHECK_INBUFFER' 76 | if (bioP == BIOBUFSIZE) \ | ^ ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:293:5: error: use of undeclared identifier 'bioWholeBlocks'; did you mean '_bioWholeBlocks'? ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:62:5: note: expanded from macro 'INBITS' 62 | CHECK_INBUFFER \ | ^ ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.cpp:78:5: note: expanded from macro 'CHECK_INBUFFER' 78 | bioWholeBlocks++; \ | ^ ../polyphone-2.4.1/sources/core/input/sfark/sfarkextractor2.h:411:12: note: '_bioWholeBlocks' declared here 411 | int _bioWholeBlocks; // Count blocks read from disk | ^
This commit is contained in:
parent
2b3b5058a2
commit
3cc18ad229
1 changed files with 21 additions and 0 deletions
|
@ -0,0 +1,21 @@
|
||||||
|
--- core/input/sfark/sfarkextractor2.cpp.orig 2024-12-27 19:56:25 UTC
|
||||||
|
+++ core/input/sfark/sfarkextractor2.cpp
|
||||||
|
@@ -73,13 +73,13 @@ const char SfArkExtractor2::UpgradeMsg[] = "Please see
|
||||||
|
#define WFIX(I) s = bp[I+0]; bp[I+0] = bp[I+1]; bp[I+1] = s;
|
||||||
|
// Read from disk if needed, and fix endians
|
||||||
|
#define CHECK_INBUFFER \
|
||||||
|
- if (bioP == BIOBUFSIZE) \
|
||||||
|
+ if (_bioP == BIOBUFSIZE) \
|
||||||
|
{ \
|
||||||
|
- bioWholeBlocks++; \
|
||||||
|
- bioP = 0; \
|
||||||
|
- int ReadLen = ReadInputFile((quint8 *) bioBuf, BIOBUFSIZE * sizeof(quint16)); \
|
||||||
|
+ _bioWholeBlocks++; \
|
||||||
|
+ _bioP = 0; \
|
||||||
|
+ int ReadLen = ReadInputFile((quint8 *) _bioBuf, BIOBUFSIZE * sizeof(quint16)); \
|
||||||
|
if (ReadLen <= 0) return 0; \
|
||||||
|
- quint8 *bp = (quint8 *) bioBuf, *ep = (quint8 *) (bioBuf+BIOBUFSIZE); \
|
||||||
|
+ quint8 *bp = (quint8 *) _bioBuf, *ep = (quint8 *) (_bioBuf+BIOBUFSIZE); \
|
||||||
|
do { \
|
||||||
|
quint8 s; \
|
||||||
|
WFIX(0); WFIX(2); WFIX(4); WFIX(6); \
|
Loading…
Add table
Reference in a new issue