2015-06-03 21:19 keltezéssel, Peter Maydell írta:
On 3 June 2015 at 11:49, Kővágó, Zoltán <dirty.ice...@gmail.com> wrote:
Signed-off-by: Kővágó, Zoltán <dirty.ice...@gmail.com>
---
  audio/coreaudio.c | 43 ++++++++++++++++++++++++-------------------
  1 file changed, 24 insertions(+), 19 deletions(-)

+static CoreaudioConf glob_conf = {
+    .buffer_frames = 512,
+    .nbuffers = 4,
+};
+
  static void *coreaudio_audio_init (void)
  {
+    CoreaudioConf *conf = g_malloc(sizeof(CoreaudioConf));
+    *conf = glob_conf;
+
      atexit(coreaudio_atexit);
-    return &coreaudio_audio_init;
+    return conf;
  }

  static void coreaudio_audio_fini (void *opaque)
  {
-    (void) opaque;
+    g_free(opaque);
  }

  static struct audio_option coreaudio_options[] = {
      {
          .name  = "BUFFER_SIZE",
          .tag   = AUD_OPT_INT,
-        .valp  = &conf.buffer_frames,
+        .valp  = &glob_conf.buffer_frames,
          .descr = "Size of the buffer in frames"
      },
      {
          .name  = "BUFFER_COUNT",
          .tag   = AUD_OPT_INT,
-        .valp  = &conf.nbuffers,
+        .valp  = &glostconf.nbuffers,
          .descr = "Number of buffers"
      },

/Users/pm215/src/qemu/audio/coreaudio.c:529:19: error: use of
undeclared identifier 'glostconf'; did you mean 'glob_conf'?
         .valp  = &glostconf.nbuffers,
                   ^~~~~~~~~
                   glob_conf
/Users/pm215/src/qemu/audio/coreaudio.c:500:22: note: 'glob_conf' declared here
static CoreaudioConf glob_conf = {
                      ^
10 warnings and 1 error generated.

crap, i should used search & replace... does it work with glob_conf or there are other problems?

Thanks,
Zoltan


Reply via email to