Method and apparatus for direct irradiation of a liquid or solid sample with microwave or ultrasound irradiation simultaneously, consecutively or alternating