diff options
Diffstat (limited to 'audio/wavaudio.c')
-rw-r--r-- | audio/wavaudio.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/audio/wavaudio.c b/audio/wavaudio.c index 8a500b9..6f2cc54 100644 --- a/audio/wavaudio.c +++ b/audio/wavaudio.c @@ -22,8 +22,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#define AUDIO_CAP "wav" +#include "hw/hw.h" #include "qemu-timer.h" +#include "audio.h" + +#define AUDIO_CAP "wav" #include "audio_int.h" #include "qemu_file.h" @@ -40,7 +43,7 @@ typedef struct WAVVoiceOut { } WAVVoiceOut; static struct { - audsettings_t settings; + struct audsettings settings; const char *wav_path; } conf_out = { { @@ -57,7 +60,7 @@ static int wav_out_run (HWVoiceOut *hw) WAVVoiceOut *wav = (WAVVoiceOut *) hw; int rpos, live, decr, samples; uint8_t *dst; - st_sample_t *src; + struct st_sample *src; int64_t now = qemu_get_clock (vm_clock); int64_t ticks = now - wav->old_ticks; int64_t bytes = (ticks * hw->info.bytes_per_second) / ticks_per_sec; @@ -112,7 +115,7 @@ static void le_store (uint8_t *buf, uint32_t val, int len) } } -static int wav_out_init (HWVoiceOut *hw, audsettings_t *as) +static int wav_out_init (HWVoiceOut *hw, struct audsettings *as) { WAVVoiceOut *wav = (WAVVoiceOut *) hw; int bits16 = 0, stereo = 0; @@ -122,7 +125,7 @@ static int wav_out_init (HWVoiceOut *hw, audsettings_t *as) 0x02, 0x00, 0x44, 0xac, 0x00, 0x00, 0x10, 0xb1, 0x02, 0x00, 0x04, 0x00, 0x10, 0x00, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00 }; - audsettings_t wav_as = conf_out.settings; + struct audsettings wav_as = conf_out.settings; (void) as; @@ -245,12 +248,12 @@ le_read( const uint8_t* p, int size ) { } static int -wav_in_init (HWVoiceIn *hw, audsettings_t *as) +wav_in_init (HWVoiceIn *hw, struct audsettings *as) { WAVVoiceIn* wav = (WAVVoiceIn *) hw; const char* path = conf_in.wav_path; uint8_t hdr[44]; - audsettings_t wav_as = *as; + struct audsettings wav_as = *as; int nchannels, freq, format, bits; wav->f = qemu_fopen (path, "rb"); @@ -348,7 +351,7 @@ static int wav_in_run (HWVoiceIn *hw) WAVVoiceIn* wav = (WAVVoiceIn *) hw; int wpos, live, decr, samples; uint8_t* src; - st_sample_t* dst; + struct st_sample* dst; int64_t now = qemu_get_clock (vm_clock); int64_t ticks = now - wav->old_ticks; @@ -417,7 +420,7 @@ static void wav_audio_fini (void *opaque) ldebug ("wav_fini"); } -struct audio_option wav_options[] = { +static struct audio_option wav_options[] = { {"FREQUENCY", AUD_OPT_INT, &conf_out.settings.freq, "Frequency", NULL, 0}, |