aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-11-21 12:46:07 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-11-21 12:46:07 +0000
commit996970236c00f244ed9518238fef480725a40ff2 (patch)
tree43d1015444a71caa6b2efc4c77de4fa43a438cb9
parent7b5425318a27d0a41c1008a36c502719255b8f5e (diff)
parentc55c974486b0dadf97fe47e2e789d5dba9b77138 (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20191121-pull-request' into staging
two audio fixes and one gtk message fix. # gpg: Signature made Thu 21 Nov 2019 10:04:32 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/fixes-20191121-pull-request: ui/gtk: fix gettext message's charset. display: xlnx_dp: Provide sufficient bytes for silent audio channel audio: fix audio recording Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--audio/audio.c1
-rw-r--r--hw/display/xlnx_dp.c9
-rw-r--r--po/zh_CN.po2
-rw-r--r--ui/gtk.c1
4 files changed, 10 insertions, 3 deletions
diff --git a/audio/audio.c b/audio/audio.c
index 7fc3aa9d16..56fae55047 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1390,6 +1390,7 @@ void *audio_generic_get_buffer_in(HWVoiceIn *hw, size_t *size)
size_t read = hw->pcm_ops->read(hw, hw->buf_emul + hw->pos_emul,
read_len);
hw->pending_emul += read;
+ hw->pos_emul = (hw->pos_emul + read) % hw->size_emul;
if (read < read_len) {
break;
}
diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index fde3b21ea5..7058443797 100644
--- a/hw/display/xlnx_dp.c
+++ b/hw/display/xlnx_dp.c
@@ -394,13 +394,18 @@ static void xlnx_dp_audio_callback(void *opaque, int avail)
written = AUD_write(s->amixer_output_stream,
&s->out_buffer[s->data_ptr], s->byte_left);
} else {
+ int len_to_copy;
/*
* There is nothing to play.. We don't have any data! Fill the
* buffer with zero's and send it.
*/
written = 0;
- memset(s->out_buffer, 0, 1024);
- AUD_write(s->amixer_output_stream, s->out_buffer, 1024);
+ while (avail) {
+ len_to_copy = MIN(AUD_CHBUF_MAX_DEPTH, avail);
+ memset(s->out_buffer, 0, len_to_copy);
+ avail -= AUD_write(s->amixer_output_stream, s->out_buffer,
+ len_to_copy);
+ }
}
} else {
written = AUD_write(s->amixer_output_stream,
diff --git a/po/zh_CN.po b/po/zh_CN.po
index b25e8e3c02..38de6a4f2a 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -66,7 +66,7 @@ msgid "Detach Tab"
msgstr "分离标签页"
msgid "Show Menubar"
-msgstr ""
+msgstr "显示菜单栏"
msgid "_Machine"
msgstr "虚拟机(_M)"
diff --git a/ui/gtk.c b/ui/gtk.c
index 2f23922afc..692ccc7bbb 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2215,6 +2215,7 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions *opts)
setlocale(LC_MESSAGES, "");
setlocale(LC_CTYPE, "C.UTF-8");
bindtextdomain("qemu", CONFIG_QEMU_LOCALEDIR);
+ bind_textdomain_codeset("qemu", "UTF-8");
textdomain("qemu");
window_display = gtk_widget_get_display(s->window);