Revision e6d16fa4

b/audio/paaudio.c
289 289
{
290 290
    int error;
291 291
    static pa_sample_spec ss;
292
    static pa_buffer_attr ba;
292 293
    struct audsettings obt_as = *as;
293 294
    PAVoiceOut *pa = (PAVoiceOut *) hw;
294 295

  
......
296 297
    ss.channels = as->nchannels;
297 298
    ss.rate = as->freq;
298 299

  
300
    /*
301
     * qemu audio tick runs at 250 Hz (by default), so processing
302
     * data chunks worth 4 ms of sound should be a good fit.
303
     */
304
    ba.tlength = pa_usec_to_bytes (4 * 1000, &ss);
305
    ba.minreq = pa_usec_to_bytes (2 * 1000, &ss);
306
    ba.maxlength = -1;
307
    ba.prebuf = -1;
308

  
299 309
    obt_as.fmt = pa_to_audfmt (ss.format, &obt_as.endianness);
300 310

  
301 311
    pa->s = pa_simple_new (
......
306 316
        "pcm.playback",
307 317
        &ss,
308 318
        NULL,                   /* channel map */
309
        NULL,                   /* buffering attributes */
319
        &ba,                    /* buffering attributes */
310 320
        &error
311 321
        );
312 322
    if (!pa->s) {

Also available in: Unified diff