mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
Revert "audio: Log context for audio bug"
This reverts commit8e30d39bad
. Revert commit8e30d39bad
"audio: Log context for audio bug" to make error propagation work again. Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20220917131626.7521-1-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
663df1cc68
commit
12f4abf6a2
2 changed files with 28 additions and 24 deletions
|
@ -118,6 +118,7 @@ int audio_bug (const char *funcname, int cond)
|
|||
AUD_log (NULL, "I am sorry\n");
|
||||
}
|
||||
AUD_log (NULL, "Context:\n");
|
||||
abort();
|
||||
}
|
||||
|
||||
return cond;
|
||||
|
@ -138,7 +139,7 @@ static inline int audio_bits_to_index (int bits)
|
|||
default:
|
||||
audio_bug ("bits_to_index", 1);
|
||||
AUD_log (NULL, "invalid bits %d\n", bits);
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +157,7 @@ void *audio_calloc (const char *funcname, int nmemb, size_t size)
|
|||
AUD_log (NULL, "%s passed invalid arguments to audio_calloc\n",
|
||||
funcname);
|
||||
AUD_log (NULL, "nmemb=%d size=%zu (len=%zu)\n", nmemb, size, len);
|
||||
abort();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return g_malloc0 (len);
|
||||
|
@ -543,7 +544,7 @@ static size_t audio_pcm_hw_get_live_in(HWVoiceIn *hw)
|
|||
size_t live = hw->total_samples_captured - audio_pcm_hw_find_min_in (hw);
|
||||
if (audio_bug(__func__, live > hw->conv_buf->size)) {
|
||||
dolog("live=%zu hw->conv_buf->size=%zu\n", live, hw->conv_buf->size);
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
return live;
|
||||
}
|
||||
|
@ -581,7 +582,7 @@ static size_t audio_pcm_sw_read(SWVoiceIn *sw, void *buf, size_t size)
|
|||
}
|
||||
if (audio_bug(__func__, live > hw->conv_buf->size)) {
|
||||
dolog("live_in=%zu hw->conv_buf->size=%zu\n", live, hw->conv_buf->size);
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
rpos = audio_ring_posb(hw->conv_buf->pos, live, hw->conv_buf->size);
|
||||
|
@ -656,7 +657,7 @@ static size_t audio_pcm_hw_get_live_out (HWVoiceOut *hw, int *nb_live)
|
|||
|
||||
if (audio_bug(__func__, live > hw->mix_buf->size)) {
|
||||
dolog("live=%zu hw->mix_buf->size=%zu\n", live, hw->mix_buf->size);
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
return live;
|
||||
}
|
||||
|
@ -706,7 +707,7 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void *buf, size_t size)
|
|||
live = sw->total_hw_samples_mixed;
|
||||
if (audio_bug(__func__, live > hwsamples)) {
|
||||
dolog("live=%zu hw->mix_buf->size=%zu\n", live, hwsamples);
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (live == hwsamples) {
|
||||
|
@ -998,7 +999,7 @@ static size_t audio_get_avail (SWVoiceIn *sw)
|
|||
if (audio_bug(__func__, live > sw->hw->conv_buf->size)) {
|
||||
dolog("live=%zu sw->hw->conv_buf->size=%zu\n", live,
|
||||
sw->hw->conv_buf->size);
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
ldebug (
|
||||
|
@ -1028,7 +1029,7 @@ static size_t audio_get_free(SWVoiceOut *sw)
|
|||
if (audio_bug(__func__, live > sw->hw->mix_buf->size)) {
|
||||
dolog("live=%zu sw->hw->mix_buf->size=%zu\n", live,
|
||||
sw->hw->mix_buf->size);
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
dead = sw->hw->mix_buf->size - live;
|
||||
|
@ -1170,7 +1171,7 @@ static void audio_run_out (AudioState *s)
|
|||
|
||||
if (audio_bug(__func__, live > hw->mix_buf->size)) {
|
||||
dolog("live=%zu hw->mix_buf->size=%zu\n", live, hw->mix_buf->size);
|
||||
abort();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hw->pending_disable && !nb_live) {
|
||||
|
@ -1203,7 +1204,7 @@ static void audio_run_out (AudioState *s)
|
|||
if (audio_bug(__func__, hw->mix_buf->pos >= hw->mix_buf->size)) {
|
||||
dolog("hw->mix_buf->pos=%zu hw->mix_buf->size=%zu played=%zu\n",
|
||||
hw->mix_buf->pos, hw->mix_buf->size, played);
|
||||
abort();
|
||||
hw->mix_buf->pos = 0;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_OUT
|
||||
|
@ -1223,7 +1224,7 @@ static void audio_run_out (AudioState *s)
|
|||
if (audio_bug(__func__, played > sw->total_hw_samples_mixed)) {
|
||||
dolog("played=%zu sw->total_hw_samples_mixed=%zu\n",
|
||||
played, sw->total_hw_samples_mixed);
|
||||
abort();
|
||||
played = sw->total_hw_samples_mixed;
|
||||
}
|
||||
|
||||
sw->total_hw_samples_mixed -= played;
|
||||
|
@ -1346,7 +1347,7 @@ static void audio_run_capture (AudioState *s)
|
|||
if (audio_bug(__func__, captured > sw->total_hw_samples_mixed)) {
|
||||
dolog("captured=%zu sw->total_hw_samples_mixed=%zu\n",
|
||||
captured, sw->total_hw_samples_mixed);
|
||||
abort();
|
||||
captured = sw->total_hw_samples_mixed;
|
||||
}
|
||||
|
||||
sw->total_hw_samples_mixed -= captured;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue