Changeset 777 for GPL/trunk/alsa-kernel/include/sound/wavefront.h
- Timestamp:
- Apr 21, 2025, 7:17:25 PM (4 months ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-exp merged: 766-767,770-771,773-774
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/include/sound/wavefront.h
r772 r777 9 9 */ 10 10 11 #if (!defined(__GNUC__) && !defined(__GNUG__))12 13 You will not be able to compile this file correctly without gcc, because14 it is necessary to pack the "wavefront_alias" structure to a size15 of 22 bytes, corresponding to 16-bit alignment (as would have been16 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)") is19 completely compiler dependent.20 21 All other wavefront_* types end up aligned to 32 bit values and22 still have the same (correct) size.23 24 #else25 26 /* However, note that as of G++ 2.7.3.2, g++ was unable to27 correctly parse *type* __attribute__ tags. It will do the28 right thing if we use the "packed" attribute on each struct29 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 TO36 BE USED WITH EITHER C *OR* C++.37 **********************************************************************/38 39 11 #ifndef NUM_MIDIKEYS 40 12 #define NUM_MIDIKEYS 128 … … 44 16 #define NUM_MIDICHANNELS 16 45 17 #endif /* NUM_MIDICHANNELS */ 46 47 /* These are very useful/important. the original wavefront interface48 was developed on a 16 bit system, where sizeof(int) = 249 bytes. Defining things like this makes the code much more portable, and50 easier to understand without having to toggle back and forth51 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 #endif69 18 70 19 /* Pseudo-commands not part of the WaveFront command set. … … 469 418 470 419 u8 sixteen_bit_padding; 471 } __ attribute__((packed))wavefront_alias;420 } __packed wavefront_alias; 472 421 473 422 typedef struct wf_drum {
Note:
See TracChangeset
for help on using the changeset viewer.