Some weird #define problem

This is a discussion on Some weird #define problem within the Windows Programming forums, part of the Platform Specific Boards category; I want to check some data of a waveform extensible file and according to the specifications of this page : ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    76

    Some weird #define problem

    I want to check some data of a waveform extensible file and according to the specifications of this page :
    Code:
    the SubFormat field must be set to KSDATAFORMAT_SUBTYPE_PCM.
    Well that doesnt look to difficult does it ?

    but a little below it is defined as

    Code:
    #define STATIC_KSDATAFORMAT_SUBTYPE_PCM\
        DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_PCM)
    DEFINE_GUIDSTRUCT("00000001-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_PCM);
    #define KSDATAFORMAT_SUBTYPE_PCM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_PCM)
    I dont know what this crap means but cant get it to work. I also tried to include the whole file and then i get a zillion errors during the compilation. Does anyone know how i can get KSDATAFORMAT_SUBTYPE_PCM defined?

    I am using mingw so that probabely explains the errors of the include file.
    Last edited by johny145; 07-31-2005 at 07:42 AM.

  2. #2
    Registered User
    Join Date
    Mar 2005
    Posts
    76
    I found the solution by doing a little searching on the net

    Code:
    #define _KSDATAFORMAT_SUBTYPE_ANALOG         (GUID) {0x6dba3190,0x67bd,0x11cf,{0xa0,0xf7,0x00,0x20,0xaf,0xd1,0x56,0xe4}}
    #define _KSDATAFORMAT_SUBTYPE_PCM            (GUID) {0x00000001,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}}
    #define _KSDATAFORMAT_SUBTYPE_IEEE_FLOAT     (GUID) {0x00000003,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}}
    #define _KSDATAFORMAT_SUBTYPE_DRM            (GUID) {0x00000009,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}}
    #define _KSDATAFORMAT_SUBTYPE_ALAW           (GUID) {0x00000006,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}}
    #define _KSDATAFORMAT_SUBTYPE_MULAW          (GUID) {0x00000007,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}}
    #define _KSDATAFORMAT_SUBTYPE_ADPCM          (GUID) {0x00000002,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}}
    #define _KSDATAFORMAT_SUBTYPE_MPEG           (GUID) {0x00000050,0x0000,0x0010,{0x80,0x00,0x00,0xaa,0x00,0x38,0x9b,0x71}}
    #define _KSDATAFORMAT_SPECIFIER_VC_ID        (GUID) {0xad98d184,0xaac3,0x11d0,{0xa4,0x1c,0x00,0xa0,0xc9,0x22,0x31,0x96}}
    #define _KSDATAFORMAT_SPECIFIER_WAVEFORMATEX (GUID) {0x05589f81,0xc356,0x11ce,{0xbf,0x01,0x00,0xaa,0x00,0x55,0x59,0x5a}}
    #define _KSDATAFORMAT_SPECIFIER_DSOUND       (GUID) {0x518590a2,0xa184,0x11d0,{0x85,0x22,0x00,0xc0,0x4f,0xd9,0xba,0xf3}}
    This board changes the code ... you have to remove the spaces almost at the end when you use it !!
    Last edited by johny145; 07-31-2005 at 03:35 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bor to DevC++ prog convert prob
    By kryptkat in forum Windows Programming
    Replies: 16
    Last Post: 09-18-2007, 05:11 AM
  2. C Programming 2d Array Question
    By jeev2005 in forum C Programming
    Replies: 3
    Last Post: 04-26-2006, 03:18 PM
  3. Adding buttons, edit boxes, etc to the window
    By rainmanddw in forum Windows Programming
    Replies: 1
    Last Post: 04-10-2006, 03:07 PM
  4. very weird problem (pointers I think)
    By hannibar in forum C Programming
    Replies: 2
    Last Post: 10-11-2005, 06:45 AM
  5. Stiff sets of equations
    By Mistert77 in forum C Programming
    Replies: 7
    Last Post: 10-27-2003, 11:36 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21