help with the HID.cpp

i have been searching for an answer to this but haven't found a way to make it work.

i am trying to add the Consumer Devices functions to the HID lib(play/pause...and such)

i found this http://blog.derouineau.fr/category/technique/arduino/, its for the old V_usb lib so i think i am just not understanding how to integrate it in to the HID.cpp/USBAPT.h in arduino 1.0

its now giving me this error when i tried Consumer.send(8);

sketch_nov22a.cpp: In function ‘void loop()’:
sketch_nov22a.cpp:43:20: error: no matching function for call to ‘Consumer_::send(int)’
sketch_nov22a.cpp:43:20: note: candidate is:
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:66:0,
                 from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:193,
                 from sketch_nov22a.cpp:2:
/usr/share/arduino/hardware/arduino/cores/arduino/USBAPI.h:93:7: note: void Consumer_::send(byte, byte)
/usr/share/arduino/hardware/arduino/cores/arduino/USBAPI.h:93:7: note:   candidate expects 2 arguments, 1 provided

i have been at this for a week and dont seem to be making any headway

my HID

Mouse_ Mouse;
Keyboard_ Keyboard;
Consumer_ Consumer;
Gamepad_ Gamepad;
//================================================================================
//================================================================================


//(Consumer Devices)
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    0x09, 0x06,                    // USAGE (Keyboard)
    0xa1, 0x01,                    // COLLECTION (Application)
    0x05, 0x0c,                    //   USAGE_PAGE (Consumer Devices)
    0x09, 0xcd,                    //   play/pause
    0x09, 0xe9,                    //   volume up
    0x09, 0xea,                    //   volume down
    0x09, 0xb5,                    //   next track
    0x09, 0xb6,                    //   previous track
    0x09, 0xec,                    //   mute
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
    0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
    0x95, 0x06,                    //   REPORT_COUNT (6)
    0x75, 0x01,                    //   REPORT_SIZE (1)
    0x81, 0x02,                    // INPUT (Data,Var,Abs)
    0xc0                           // END_COLLECTION
/*
//(Consumer Devices)
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    0x09, 0x06,                    // USAGE (Keyboard)
    0xa1, 0x01,                    // COLLECTION (Application)
    0x05, 0x0c,                    //   USAGE_PAGE (Consumer Devices)
  //0x85, 0x01,
    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)
    0x25, 0x01,                    //   LOGICAL_MAXIMUM (1)
    0x95, 0x06,                    //   REPORT_COUNT (2)
    0x75, 0x01,                    //   REPORT_SIZE (1)
    0x81, 0x02,                    // INPUT (Data,Var,Abs)
   /*
    0x05, 0x07,                    //   USAGE_PAGE (Keyboard) 
    0x95, 0x01,                    //   REPORT_COUNT (simultaneous keystrokes) 
    0x75, 0x08,                    //   REPORT_SIZE (8) 
    0x25, 0x65,                    //   LOGICAL_MAXIMUM (101) 
    0x19, 0x00,                    //   USAGE_MINIMUM (Reserved (no event indicated)) 
    0x29, 0x65,                    //   USAGE_MAXIMUM (Keyboard Application) 
    0x81, 0x00,                    //   INPUT (Data,Ary,Abs) 
*/
    //0xc0,                          // END_COLLECTION


//  Gamepad
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    0x09, 0x05,                    // USAGE (Game Pad)
    0xa1, 0x01,                    // COLLECTION (Application)
    0xa1, 0x00,                    //   COLLECTION (Physical)
    0x85, 0x03,                    //     REPORT_ID (3)
    0x05, 0x09,                    //     USAGE_PAGE (Button)
    0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)
    0x29, 0x08,                    //     USAGE_MAXIMUM (Button 8)
    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
    0x95, 0x04,                    //     REPORT_COUNT (4)
    0x75, 0x01,                    //     REPORT_SIZE (1)
    0x81, 0x02,                    //     INPUT (Data,Var,Abs)
    0x05, 0x01,                    //     USAGE_PAGE (Generic Desktop)
    0x09, 0x30,                    //     USAGE (X)
    0x09, 0x31,                    //     USAGE (Y)
    0x15, 0xff,                    //     LOGICAL_MINIMUM (-1)
    0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)
    0x95, 0x02,                    //     REPORT_COUNT (2)
    0x75, 0x02,                    //     REPORT_SIZE (2)
    0x81, 0x02,                    //     INPUT (Data,Var,Abs)
    0xc0,                          //   END_COLLECTION
    0xc0                           // END_COLLECTION

#if RAWHID_ENABLED
// RAW HID
0x06, LSB(RAWHID_USAGE_PAGE), MSB(RAWHID_USAGE_PAGE),   // 30
0x0A, LSB(RAWHID_USAGE), MSB(RAWHID_USAGE),

0xA1, 0x01, // Collection 0x01
    0x85, 0x03, // REPORT_ID (3)
0x75, 0x08, // report size = 8 bits
0x15, 0x00, // logical minimum = 0
0x26, 0xFF, 0x00,   // logical maximum = 255

0x95, 64,   // report count TX
0x09, 0x01, // usage
0x81, 0x02, // Input (array)

0x95, 64,   // report count RX
0x09, 0x02, // usage
0x91, 0x02, // Output (array)
0xC0    // end collection
#endif
};

extern const HIDDescriptor _hidInterface PROGMEM;
const HIDDescriptor _hidInterface =
{
D_INTERFACE(HID_INTERFACE,1,3,0,0),
D_HIDREPORT(sizeof(_hidReportDescriptor)),
D_ENDPOINT(USB_ENDPOINT_IN (HID_ENDPOINT_INT),USB_ENDPOINT_TYPE_INTERRUPT,0x40,0x01)
};




//================================================================================
//================================================================================
// Driver

u8 _hid_protocol = 1;
u8 _hid_idle = 1;

#define WEAK __attribute__ ((weak))

int WEAK HID_GetInterface(u8* interfaceNum)
{
interfaceNum[0] += 1;   // uses 1
return USB_SendControl(TRANSFER_PGM,&_hidInterface,sizeof(_hidInterface));
}

int WEAK HID_GetDescriptor(int i)
{
return USB_SendControl(TRANSFER_PGM,_hidReportDescriptor,sizeof(_hidReportDescriptor));
}

void WEAK HID_SendReport(u8 id, const void* data, int len)
{
USB_Send(HID_TX, &id, 1);
USB_Send(HID_TX | TRANSFER_RELEASE,data,len);
}

bool WEAK HID_Setup(Setup& setup)
{
u8 r = setup.bRequest;
u8 requestType = setup.bmRequestType;
if (REQUEST_DEVICETOHOST_CLASS_INTERFACE == requestType)
{
if (HID_GET_REPORT == r)
{
//HID_GetReport();
return true;
}
if (HID_GET_PROTOCOL == r)
{
//Send8(_hid_protocol); // TODO
return true;
}
}

if (REQUEST_HOSTTODEVICE_CLASS_INTERFACE == requestType)
{
if (HID_SET_PROTOCOL == r)
{
_hid_protocol = setup.wValueL;
return true;
}

if (HID_SET_IDLE == r)
{
_hid_idle = setup.wValueL;
return true;
}
}
return false;
}

//================================================================================
//================================================================================
// Mouse

Mouse_::Mouse_(void) : _buttons(0)
{
}

void Mouse_::begin(void)
{
}

void Mouse_::end(void)
{
}

void Mouse_::click(uint8_t b)
{
_buttons = b;
move(0,0,0);
_buttons = 0;
move(0,0,0);
}

void Mouse_::move(signed char x, signed char y, signed char wheel)
{
u8 m[4];
m[0] = _buttons;
m[1] = x;
m[2] = y;
m[3] = wheel;
HID_SendReport(1,m,4);
}

void Mouse_::buttons(uint8_t b)
{
if (b != _buttons)
{
_buttons = b;
move(0,0,0);
}
}

void Mouse_::press(uint8_t b)
{
buttons(_buttons | b);
}

void Mouse_::release(uint8_t b)
{
buttons(_buttons & ~b);
}

bool Mouse_::isPressed(uint8_t b)
{
if ((b & _buttons) > 0)
return true;
return false;
}


//================================================================================
//================================================================================
//  Consumer

Consumer_::Consumer_(void) 
{
}

void Consumer_::begin(void)
{
}

void Consumer_::end(void)
{
}

/*
void Consumer_::press(uint8_t b)
{
buttons(_buttons | b);
}

void Consumer_::release(uint8_t b)
{
buttons(_buttons & ~b);
}

bool Consumer_::isPressed(uint8_t b)
{
if ((b & _buttons) > 0)

return true;
return false;
}
*/
void Consumer_::send(BYTE keyStroke, BYTE modifiers) {

while (!usbInterruptIsReady()) {
// Note: We wait until we can send keystroke
//       so we know the previous keystroke was
//       sent.
}

memset(reportBuffer, 0, sizeof(reportBuffer));

reportBuffer[0] = keyStroke;

usbSetInterrupt(reportBuffer, sizeof(reportBuffer));

while (!usbInterruptIsReady()) {
// Note: We wait until we can send keystroke
//       so we know the previous keystroke was
//       sent.
}

// This stops endlessly repeating keystrokes:
memset(reportBuffer, 0, sizeof(reportBuffer));
usbSetInterrupt(reportBuffer, sizeof(reportBuffer));

}



//================================================================================
//================================================================================
// Gamepad

Gamepad_::Gamepad_(void) : _buttons(0)
{
}

void Gamepad_::begin(void)
{
}

void Gamepad_::end(void)
{
}

void Gamepad_::press(uint8_t b)
{
_buttons |= b;
HID_SendReport(3,&_buttons,1);
}

void Gamepad_::release(uint8_t b)
{
_buttons &= ~b;
HID_SendReport(3,&_buttons,1);
}

bool Gamepad_::isPressed(uint8_t b)
{
if ((b & _buttons) > 0) 
return true;
return false;
}

i trimmed it to fit in the post.

the snip from the USBAPI.h

//================================================================================
//================================================================================
//  Consumer_
//added as Consumer Devices
#define Key_PLAY            0xcd    // play/pause
#define Key_VOLUME_UP           0xe9    // volume up
#define Key_VOLUME_DOWN         0xea    // volume down
#define Key_NEXT            0xb5    // next track
#define Key_PREVIOUS            0xb6    // previous track
#define Key_MUTE            0xec    // mute
#define key_STOP            0xcc    // stop 


class Consumer_
{
private:
    uint8_t _buttons;
    void buttons(uint8_t b);
public:
    Consumer_(void);
    void begin(void);
    void end(void);
    void send(byte keyStroke, byte modifiers);
};
extern Consumer_ Consumer;

Is there some part of the error message that you do not understand? It is telling you that somewhere in your code, you are calling the send() method on an instance of the Consumer_ class using one int, when, in reality, the method needs to be passed two bytes. Find where you are doing that, and change it.