audio: Remove conditional around sw which can not be NULL
Noticed by Steve Grubb. Signed-off-by: malc <av1474@comtv.ru>
This commit is contained in:
parent
493abda627
commit
7cbb28ed5d
@ -485,32 +485,30 @@ SW *glue (AUD_open_, TYPE) (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sw) {
|
sw->card = card;
|
||||||
sw->card = card;
|
sw->vol = nominal_volume;
|
||||||
sw->vol = nominal_volume;
|
sw->callback.fn = callback_fn;
|
||||||
sw->callback.fn = callback_fn;
|
sw->callback.opaque = callback_opaque;
|
||||||
sw->callback.opaque = callback_opaque;
|
|
||||||
|
|
||||||
#ifdef DAC
|
#ifdef DAC
|
||||||
if (live) {
|
if (live) {
|
||||||
int mixed =
|
int mixed =
|
||||||
(live << old_sw->info.shift)
|
(live << old_sw->info.shift)
|
||||||
* old_sw->info.bytes_per_second
|
* old_sw->info.bytes_per_second
|
||||||
/ sw->info.bytes_per_second;
|
/ sw->info.bytes_per_second;
|
||||||
|
|
||||||
#ifdef DEBUG_PLIVE
|
#ifdef DEBUG_PLIVE
|
||||||
dolog ("Silence will be mixed %d\n", mixed);
|
dolog ("Silence will be mixed %d\n", mixed);
|
||||||
#endif
|
#endif
|
||||||
sw->total_hw_samples_mixed += mixed;
|
sw->total_hw_samples_mixed += mixed;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_AUDIO
|
#ifdef DEBUG_AUDIO
|
||||||
dolog ("%s\n", name);
|
dolog ("%s\n", name);
|
||||||
audio_pcm_print_info ("hw", &sw->hw->info);
|
audio_pcm_print_info ("hw", &sw->hw->info);
|
||||||
audio_pcm_print_info ("sw", &sw->info);
|
audio_pcm_print_info ("sw", &sw->info);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
return sw;
|
return sw;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user