(SECTION A)


#define  ALLOC_CHANNEL            11


and an array that specifies the operation (or operations) to be carried out...

UBYTE g_playsound_vector[2] = { 1, count of labels to follow
   
                              ALLOC_CHANNEL

                              }






(SECTION B)
   
           case ALLOC_CHANNEL:

               g_audio_request_p->ioa_Request.io_Command=ADCMD_ALLOCATE;
         
               g_audio_request_p->ioa_Data=g_channel_spec;      

               g_audio_request_p->ioa_Length=sizeof(g_channel_spec);

               BeginIO((struct IORequest *)g_audio_request_p);
                  
               WaitPort(g_audio_port_p);
                  
               GetMsg(g_audio_port_p);

               if(g_audio_request_p->ioa_Request.io_Error) 
                  
                error_flag=TRUE;
                  
               break;





(SECTION C)

      case ALLOC_CHANNEL:           

               g_audio_request_p->ioa_Request.io_Command=ADCMD_FREE;
         
               BeginIO((struct IORequest *)g_audio_request_p);
                  
               WaitPort(g_audio_port_p);
                  
               GetMsg(g_audio_port_p);
      
               break;







(SECTION D)

                  
   #define  OPEN_INTUITION_LIBRARY    1              

   #define  OPEN_GRAPHICS_LIBRARY     2       

   #define  OPEN_WINDOW               3

   #define  SET_MENU_STRIP            4

   #define  ALLOC_AIO_STRUCTURE       5              

   #define  CREATE_PORT               6       

   #define  INIT_AIO_STRUCTURE        7   
   
   #define  OPEN_AUDIO_DEVICE         8

   #define  SET_UP_SOUND1             9

   #define  SET_UP_SOUND2            10

   #define  ALLOC_CHANNEL            11







(SECTION E)

UBYTE g_audio_vector[7] = {6,    /* count of labels to follow */

                            ALLOC_AIO_STRUCTURE,

                            CREATE_PORT,

                            INIT_AIO_STRUCTURE,

                            OPEN_AUDIO_DEVICE, 

                            SET_UP_SOUND1,
                            
                            SET_UP_SOUND2
                            
                           };






(SECTION F)

 if(!(AllocateVector(g_audio_vector))) 

      { 
      
      /* rest of program code */   
         
      DeallocateVector(g_audio_vector)'
      
      }






