IRemote sending and receiving in the same sketch - problem

It WORKS!

The code that works -

#include <IRremote.h>
#include <IRremoteInt.h>

IRsend irsend;
int RECV_PIN = 9;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn();
}

void loop() {
  
     if (irrecv.decode(&results)) {
       Serial.println(results.value, HEX);
       switch (results.value) {
         case 0xC1AA09F6: // ON OFF
            for (int i = 0; i < 3; i++) {
            irsend.sendSony(0xa81, 12); // Amp ON/OFF
            irrecv.enableIRIn();
            delay(40);            
            }
            Serial.println("On-off");
            break;
 
         case 0x5EA108F7: // tuner in
            for (int a = 0; a < 3; a++) {
            irsend.sendSony(0x841, 12); // tuner
            irrecv.enableIRIn();
            delay(40);            
            }
            Serial.println("TUNER");
            break;
            
         case 0x5EA18877: // tape 2
            for (int b = 0; b < 3; b++) {
            irsend.sendSony(0x241, 12); // tape 2
            irrecv.enableIRIn();
            delay(40);
            }
            Serial.println("TV");
            break;
            
         }
   irrecv.enableIRIn();
   irrecv.resume();
   }
}

And below the library with changed IRremoteInt.h and keywords.txt to work on Arduino 1.0
www.meggot.nazwa.pl/TEMP/IRremote.zip
Auto cleaning on FTP will delete it in 30 days.

Thank you for help.