We have measured the dispersion of the Brillouin scattering from acoustoelectrical domains in CdS and ZnO. These spectra are compared with the birefringence spectra obtained by applying uniaxial stress. The resonant cancellation of the Brillouin scattering occurs at the spectral position of the isotropic point of the stress-induced birefringence. From these spectra it is concluded that the Brillouin scattering in CdS and ZnO is determined by elasto-optic effects alone. The spectra of some of the photoelastic coefficients have been determined. A model dielectric constant is derived where both ground-state excitons and unbound continuum exciton states contribute. From this dielectric constant and the quasicubic model we calculate all the six independent photoelastic coefficents. By comparison with the experimental results the shear deformation potentials of the valence bands are obtained. It is found that the exchange interaction between the excitons may change the values of the photoelastic coefficients in ZnO about 10%.