Only a few studies in the current literature are dedicated to the analysis of the effect of a bulk viscosity (i.e., second viscosity coefficient), and little is known about how to determine this quantity for high frequency compressible flows involving magnetic effect. The dissipation phenomenon associated with rapid expansions in the flow and the consequent attenuation of magnetoacoustic waves by the bulk viscosity has been neglected by several works on gas dynamics at high frequency. In this paper, we present a theoretical study on a compressible flow of an electrically conducting barotropic gas in the presence of a bulk viscosity. The governing equations represent a coupling between hydrodynamics and Maxwell's equations in the context of magnetohydrodynamics (MHD), and the relevant physical parameters of the flow are presented after an appropriate dimensional analysis of these equations. First, an analysis of small perturbations around an equilibrium state of the electrically conducting gas results in a system of linearized equations in the frequency-wavenumber space. The dispersion relation for magnetic waves is determined in terms of magnetic and the bulk viscosity effects. Second, based on the dispersion relation for magnetoacoustic waves, we propose a new expression to estimate the bulk viscosity in terms of the gas barotropic coefficient, the wavenumber, the wave frequency, the orientation of the applied field, and the Euler magnetic parameter, which measures the relative importance between magnetic and thermodynamic pressures. The behavior of the bulk viscosity is examined as a function of the wavenumber for different magnetic Euler numbers and field orientation, revealing how the rate of energy dissipation associated with the bulk viscosity can be controlled by varying the intensity of an applied magnetic field and its orientation. We show that understanding magnetoacoustic waves not only provides a tool for estimating the bulk viscosity in plasma flows in terms of these wave parameters, but also offers a potential pathway to manipulating both the magnitude and orientation of a magnetic field in order to reduce the rate of energy dissipation in most of plasma flows. This rate of dissipation produced by the rapid expansion of a recombining gas can be orders of magnitude larger than the one produced by the standard shear viscosity. These insights into bulk viscosity in compressible MHD flow at high frequency have potential applications in reacting plasmas where magnetoacoustic waves are damped by bulk viscosity, in production and dissipation of turbulence and in phenomenon of sonoluminescence as occurs in liquid containing gas bubble oscillating at fairly high frequency.