diff options
Diffstat (limited to 'XMPFiles/source/FormatSupport/WAVE')
6 files changed, 42 insertions, 0 deletions
diff --git a/XMPFiles/source/FormatSupport/WAVE/BEXTMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/BEXTMetadata.cpp index a11e481..5b98ba0 100644 --- a/XMPFiles/source/FormatSupport/WAVE/BEXTMetadata.cpp +++ b/XMPFiles/source/FormatSupport/WAVE/BEXTMetadata.cpp @@ -26,7 +26,11 @@ static const XMP_Uns32 kSizeOriginationDate = 10; static const XMP_Uns32 kSizeOriginationTime = 8; // Needed to be able to memcpy directly to this struct. +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( 1 ) +#else #pragma pack ( push, 1 ) +#endif //#if SUNOS_SPARC || SUNOS_X86 struct BEXT { char mDescription[256]; @@ -40,7 +44,11 @@ static const XMP_Uns32 kSizeOriginationTime = 8; XMP_Uns8 mUMID[64]; XMP_Uns8 mReserved[190]; }; +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( ) +#else #pragma pack ( pop ) +#endif //#if SUNOS_SPARC || SUNOS_X86 //----------------------------------------------------------------------------- // diff --git a/XMPFiles/source/FormatSupport/WAVE/CartMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/CartMetadata.cpp index 07c8969..73165e4 100644 --- a/XMPFiles/source/FormatSupport/WAVE/CartMetadata.cpp +++ b/XMPFiles/source/FormatSupport/WAVE/CartMetadata.cpp @@ -22,7 +22,11 @@ using namespace IFF_RIFF; // Types and globals for the stored form of the cart chunk. +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( 1 ) +#else #pragma pack ( push, 1 ) +#endif //#if SUNOS_SPARC || SUNOS_X86 struct StoredCartChunk { char Version[4]; // All of the fixed size text fields are null-filled local text, @@ -49,7 +53,11 @@ struct StoredCartChunk { static const size_t kMinimumCartChunkSize = sizeof(StoredCartChunk); +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( ) +#else #pragma pack ( pop ) +#endif //#if SUNOS_SPARC || SUNOS_X86 static const size_t kFixedTextCount = (CartMetadata::kLastFixedTextField - CartMetadata::kFirstFixedTextField + 1); diff --git a/XMPFiles/source/FormatSupport/WAVE/Cr8rMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/Cr8rMetadata.cpp index c9cbc23..277924f 100644 --- a/XMPFiles/source/FormatSupport/WAVE/Cr8rMetadata.cpp +++ b/XMPFiles/source/FormatSupport/WAVE/Cr8rMetadata.cpp @@ -24,7 +24,11 @@ static const XMP_Uns32 kSizeAppOtions = 16; static const XMP_Uns32 kSizeAppName = 32; // Needed to be able to memcpy directly to this struct. +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( 1 ) +#else #pragma pack ( push, 1 ) +#endif //#if SUNOS_SPARC || SUNOS_X86 struct Cr8rBoxContent { XMP_Uns32 mMagic; @@ -37,7 +41,11 @@ static const XMP_Uns32 kSizeAppName = 32; char mAppOptions[kSizeAppOtions]; char mAppName[kSizeAppName]; }; +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( ) +#else #pragma pack ( pop ) +#endif //#if SUNOS_SPARC || SUNOS_X86 //----------------------------------------------------------------------------- // diff --git a/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp index 76faaa3..6597f2a 100644 --- a/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp +++ b/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp @@ -217,6 +217,8 @@ XMP_Uns64 INFOMetadata::serialize( XMP_Uns8** outBuffer ) // memcpy( buffer+offset, &id, kSizeChunkID ); memcpy( buffer+offset+kSizeChunkID, &size, kSizeChunkSize ); + //size has been changed in little endian format. Change it back to bigendina + size = LE.getUns32( &size ); memcpy( buffer+offset+kChunkHeaderSize, value.c_str(), size ); // diff --git a/XMPFiles/source/FormatSupport/WAVE/PrmLMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/PrmLMetadata.cpp index c5dc42e..477c31e 100644 --- a/XMPFiles/source/FormatSupport/WAVE/PrmLMetadata.cpp +++ b/XMPFiles/source/FormatSupport/WAVE/PrmLMetadata.cpp @@ -22,7 +22,11 @@ static const XMP_Uns32 kPrmlSizeFix = 282; // always 282 bytes static const XMP_Uns32 kSizeFilePath = 260; // Needed to be able to memcpy directly to this struct. +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( 1 ) +#else #pragma pack ( push, 1 ) +#endif //#if SUNOS_SPARC || SUNOS_X86 struct PrmlBoxContent { XMP_Uns32 mMagic; @@ -34,7 +38,11 @@ static const XMP_Uns32 kSizeFilePath = 260; XMP_Uns32 mMacParID; char mFilePath[kSizeFilePath]; }; +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( ) +#else #pragma pack ( pop ) +#endif //#if SUNOS_SPARC || SUNOS_X86 //----------------------------------------------------------------------------- // diff --git a/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.h b/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.h index 1395cd1..b5a2e3f 100644 --- a/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.h +++ b/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.h @@ -33,7 +33,11 @@ class WAVEBehavior : public IChunkBehavior { // Internal structure to hold RF64 related data public: +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( 1 ) +#else #pragma pack ( push, 1 ) +#endif //#if SUNOS_SPARC || SUNOS_X86 struct ChunkSize64 { XMP_Uns64 size; @@ -55,7 +59,11 @@ public: // ctor DS64(): riffSize(0), dataSize(0), sampleCount(0), tableLength(0), trailingBytes(0) {} }; +#if SUNOS_SPARC || SUNOS_X86 +#pragma pack ( ) +#else #pragma pack ( pop ) +#endif //#if SUNOS_SPARC || SUNOS_X86 /** |