Mechanism of action of amyl nitrite is: