diff options
author | David 'Digit' Turner <digit@android.com> | 2011-01-02 12:58:51 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-01-02 13:05:31 +0100 |
commit | 5d0e37bc290d1743cb5acf76eb6608f1303f27dd (patch) | |
tree | 142486cd40940a38aa4fe5947521b39dc2cec339 /audio/audio_template.h | |
parent | e3650680f44fed0262d33eb4f486e5c1e58ddc32 (diff) | |
download | external_qemu-5d0e37bc290d1743cb5acf76eb6608f1303f27dd.zip external_qemu-5d0e37bc290d1743cb5acf76eb6608f1303f27dd.tar.gz external_qemu-5d0e37bc290d1743cb5acf76eb6608f1303f27dd.tar.bz2 |
upstream: audio sub-system improvements.
This patch updates the audio subsystem to match the one
in upstream. Note that this gets rid of the ability to
specify different audio backends for input and output,
which was never really used.
A future patch will remove the -audio-in and -audio-out
options and related code.
Change-Id: I37c21672bcb15ef1f0e928c56bf99fbecda2bce6
Diffstat (limited to 'audio/audio_template.h')
-rw-r--r-- | audio/audio_template.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/audio/audio_template.h b/audio/audio_template.h index 9f75f19..d3764c8 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -245,8 +245,8 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (struct audsettings *as) { HW *hw; AudioState *s = &glob_audio_state; - struct audio_driver *drv = glue(s->drv_, TYPE); - int err; + struct audio_driver *drv = s->drv; + int err; if (!glue (s->nb_hw_voices_, TYPE)) { return NULL; @@ -433,7 +433,7 @@ SW *glue (AUD_open_, TYPE) ( goto fail; } - if (audio_bug (AUDIO_FUNC, !glue (s->drv_, TYPE))) { + if (audio_bug (AUDIO_FUNC, !s->drv)) { dolog ("Can not open `%s' (no host audio driver)\n", name); goto fail; } @@ -452,9 +452,9 @@ SW *glue (AUD_open_, TYPE) ( SW_NAME (sw), sw->info.freq, sw->info.bits, sw->info.nchannels); dolog ("New %s freq %d, bits %d, channels %d\n", name, - freq, - (fmt == AUD_FMT_S16 || fmt == AUD_FMT_U16) ? 16 : 8, - nchannels); + as->freq, + (as->fmt == AUD_FMT_S16 || as->fmt == AUD_FMT_U16) ? 16 : 8, + as->nchannels); #endif if (live) { @@ -548,7 +548,7 @@ uint64_t glue (AUD_get_elapsed_usec_, TYPE) (SW *sw, QEMUAudioTimeStamp *ts) cur_ts = sw->hw->ts_helper; old_ts = ts->old_ts; - /* dolog ("cur %lld old %lld\n", cur_ts, old_ts); */ + /* dolog ("cur %" PRId64 " old %" PRId64 "\n", cur_ts, old_ts); */ if (cur_ts >= old_ts) { delta = cur_ts - old_ts; |