aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2009-11-18 19:15:19 +0300
committermalc <av1474@comtv.ru>2009-11-18 19:22:53 +0300
commit7cbb28ed5dad73fc39b9cbc94f0e363e9ead6919 (patch)
treee3e0963011527120ceae9e5e865628d6ec18f48f /audio
parentaudio: link with -lpulse in addition to -lpulse-simple (diff)
downloadqemu-kvm-7cbb28ed5dad73fc39b9cbc94f0e363e9ead6919.tar.gz
qemu-kvm-7cbb28ed5dad73fc39b9cbc94f0e363e9ead6919.tar.bz2
qemu-kvm-7cbb28ed5dad73fc39b9cbc94f0e363e9ead6919.zip
audio: Remove conditional around sw which can not be NULL
Noticed by Steve Grubb. Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_template.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/audio/audio_template.h b/audio/audio_template.h
index 14c648c05..1a4707b2e 100644
--- a/audio/audio_template.h
+++ b/audio/audio_template.h
@@ -485,32 +485,30 @@ SW *glue (AUD_open_, TYPE) (
}
}
- if (sw) {
- sw->card = card;
- sw->vol = nominal_volume;
- sw->callback.fn = callback_fn;
- sw->callback.opaque = callback_opaque;
+ sw->card = card;
+ sw->vol = nominal_volume;
+ sw->callback.fn = callback_fn;
+ sw->callback.opaque = callback_opaque;
#ifdef DAC
- if (live) {
- int mixed =
- (live << old_sw->info.shift)
- * old_sw->info.bytes_per_second
- / sw->info.bytes_per_second;
+ if (live) {
+ int mixed =
+ (live << old_sw->info.shift)
+ * old_sw->info.bytes_per_second
+ / sw->info.bytes_per_second;
#ifdef DEBUG_PLIVE
- dolog ("Silence will be mixed %d\n", mixed);
+ dolog ("Silence will be mixed %d\n", mixed);
#endif
- sw->total_hw_samples_mixed += mixed;
- }
+ sw->total_hw_samples_mixed += mixed;
+ }
#endif
#ifdef DEBUG_AUDIO
- dolog ("%s\n", name);
- audio_pcm_print_info ("hw", &sw->hw->info);
- audio_pcm_print_info ("sw", &sw->info);
+ dolog ("%s\n", name);
+ audio_pcm_print_info ("hw", &sw->hw->info);
+ audio_pcm_print_info ("sw", &sw->info);
#endif
- }
return sw;