Catalyzes the oxidation of aldehydes to the corresponding carboxylic acids by coupling the reaction to the reduction of dioxygen to hydrogen peroxide. Substrates include, methylglyoxal, glycolaldehyde, acetaldehyde, formaldehyde and glyoxal. May act as a source of extracellular hydrogen peroxide required for the oxidation reactions catalyzed by the lignin peroxidases (ligninases) and manganese peroxidases, both involved in lignin degradation. glyoxal + H2O + O2 = glyoxylate + H(+) + H2O2 H2O + methylglyoxal + O2 = H(+) + H2O2 + pyruvate Optimum pH is 6.0.