Ignore:
Timestamp:
Apr 21, 2025, 7:17:25 PM (4 months ago)
Author:
David Azarewicz
Message:

Merge from uniaud32-exp branch

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/include/sound/wavefront.h

    r772 r777  
    99 */
    1010
    11 #if (!defined(__GNUC__) && !defined(__GNUG__))
    12 
    13      You will not be able to compile this file correctly without gcc, because
    14      it is necessary to pack the "wavefront_alias" structure to a size
    15      of 22 bytes, corresponding to 16-bit alignment (as would have been
    16      the case on the original platform, MS-DOS). If this is not done,
    17      then WavePatch-format files cannot be read/written correctly.
    18      The method used to do this here ("__attribute__((packed)") is
    19      completely compiler dependent.
    20      
    21      All other wavefront_* types end up aligned to 32 bit values and
    22      still have the same (correct) size.
    23 
    24 #else
    25 
    26      /* However, note that as of G++ 2.7.3.2, g++ was unable to
    27         correctly parse *type* __attribute__ tags. It will do the
    28         right thing if we use the "packed" attribute on each struct
    29         member, which has the same semantics anyway.
    30      */
    31 
    32 #endif /* __GNUC__ */
    33 
    34 /***************************** WARNING ********************************
    35   PLEASE DO NOT MODIFY THIS FILE IN ANY WAY THAT AFFECTS ITS ABILITY TO
    36   BE USED WITH EITHER C *OR* C++.
    37  **********************************************************************/
    38 
    3911#ifndef NUM_MIDIKEYS
    4012#define NUM_MIDIKEYS 128
     
    4416#define NUM_MIDICHANNELS 16
    4517#endif  /* NUM_MIDICHANNELS */
    46 
    47 /* These are very useful/important. the original wavefront interface
    48    was developed on a 16 bit system, where sizeof(int) = 2
    49    bytes. Defining things like this makes the code much more portable, and
    50    easier to understand without having to toggle back and forth
    51    between a 16-bit view of the world and a 32-bit one.
    52  */   
    53 
    54 #ifndef __KERNEL__
    55 /* keep them for compatibility */
    56 typedef short s16;
    57 typedef unsigned short u16;
    58 typedef int s32;
    59 typedef unsigned int u32;
    60 typedef char s8;
    61 typedef unsigned char u8;
    62 typedef s16 INT16;
    63 typedef u16 UINT16;
    64 typedef s32 INT32;
    65 typedef u32 UINT32;
    66 typedef s8 CHAR8;
    67 typedef u8 UCHAR8;
    68 #endif
    6918
    7019/* Pseudo-commands not part of the WaveFront command set.
     
    469418
    470419    u8 sixteen_bit_padding;
    471 } __attribute__((packed)) wavefront_alias;
     420} __packed wavefront_alias;
    472421
    473422typedef struct wf_drum {
Note: See TracChangeset for help on using the changeset viewer.