Thanks a lot for your help! I wasn't aware that AUD_write could return zero. Seems that I was just lucky, it didn't do that with 44100 Hz sample rate (c:

Now it works fine with 32000 Hz, and I really encourage people (especially PC users) to test the attached patch. Call QEMU with the switch '-soundhw pcspk', and try to make some noise.

Regards,
Jo.


malc wrote:
b. Once AUD_write return zero one should stop writing untill some space
   becomes available (for all intents and purposes after callback
   will be called next time)

Item b is probably why it hangs: you try to write N bytes, AUD_write
returns zero, yet you are tring again immediately - ad nauseam. We
have only one thread - hence audio can not push the data out of
internal buffers into the host, and what you get is an infinite loop.

--
Joachim Henke
http://he-jo.net/

Attachment: pcspeaker.diff.gz
Description: GNU Zip compressed data

_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to