116 is turned off so that diode 50 emits light when data vdatl is 34 0 34 switch 115 is turned off and switch 116 is turned on so that diode 50 does not emit light in accordance with data vdat2 output from buffer 132 switch 118 is turned on off and switch 117 is turned on off in accordance with an output from nor gate 131 thus laser diode 51 emits does not emit light that is when data vdat2 is 34 1 34 switch 117 is turned on and switch 118 is turned off so that diode 51 emits light when data vdat2 is 34 0 34 switch 117 is turned off and switch 118 is turned on so that diode 51 does not emit light assume that the forced on signal is supplied to nor gate 129 in this case since the first and second sampling signals are not supplied capacitors c3 and c4 are kept charged therefore switch 115 is turned on in accordance with a 34 0 34 signal output from nor gate 129 and only diode 50 emits light since only diode 50 emits light only beam detector 308 is irradiated as described above two laser diodes generate two laser beams as scanning beams.