IR remote

Good night,
I have a problem and need to solve urgently.
The code should work, but is a problem in the library VirtualWire or IR Remote.
The first time the IR code is sent and the box changes channel, but as you enter the sub program receive when the IR code is sent again, no longer works.

If not using VirtualWire the code works fine, but the VirutalWire need to receive data from the rf.

I thank you

#include <VirtualWire.h>
#include <IRremote.h>

IRsend irsend;

int led = 13;
int code;
int device;
int toggle, old_toggle;

unsigned int channel[78] = {
4550,4400,500,500,500,450,550,450,550,450,500,500,500,1450,500,450,550,450,550,450,500,500,500,450,550,450,550,450,500,500,500,450,550,450,500,4450,550,1400,550,450,550,400,550,450,550,450,500,500,500,1400,550,1450,500,450,550,450,550,450,500,500,500,1450,500,1450,500,450,550,450,500,1450,500,1450,500,1450,500,1450,500};

uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;

void setup()
{
Serial.begin(9600);
pinMode(7,INPUT);
pinMode(led, OUTPUT);
// declarações

}

void loop()
{

irsend.sendRaw(channel, 78, 38);
delay(500);

receber();

}

void receber(){

vw_set_rx_pin(7); // Pino de recepção
vw_set_ptt_inverted(true);
vw_setup(2000);
code = 0;
device = 0;
old_toggle = 2;
vw_rx_start(); // Necessário para começar a receber informação

if (vw_get_message(buf, &buflen)) // Caso chegue alguma mensagem ao receptor
{
code = atoi((char*) buf);

device = (code & 0x7C0) >> 6;
toggle = (code & 0x800) >> 11;
code = code & 0x03F;

if(toggle != old_toggle) {
old_toggle = toggle; // Para nao repetir teclas

// Serial.println("\nToggle = " + String(toggle)); // Enviamos pela porta Serial o toggle
// Serial.println("Endereco = " + String(device)); // Enviamos pela porta Serial o endereco
Serial.println("Codigo = " + String(code)); // Enviamos pela porta Serial o codigo
memset( &buf, 0, sizeof(buf) ); // Fazemos reset à variável info para utilizar uma outra vez
}
}

delay(100);
}