]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - audio/coreaudio.c
hw/isa/piix4: Move piix4_create() to hw/isa/piix4.c
[thirdparty/qemu.git] / audio / coreaudio.c
index 1427c9f622d9989a2cf16c1942ac2841d9158a68..66f0f459cf09f9f796342eb89e6df929bddc3a70 100644 (file)
@@ -440,7 +440,7 @@ static OSStatus audioDeviceIOProc(
     }
 
     frameCount = core->audioDevicePropertyBufferFrameSize;
-    pending_frames = hw->pending_emul >> hw->info.shift;
+    pending_frames = hw->pending_emul / hw->info.bytes_per_frame;
 
     /* if there are not enough samples, set signal and return */
     if (pending_frames < frameCount) {
@@ -449,7 +449,7 @@ static OSStatus audioDeviceIOProc(
         return 0;
     }
 
-    len = frameCount << hw->info.shift;
+    len = frameCount * hw->info.bytes_per_frame;
     while (len) {
         size_t write_len;
         ssize_t start = ((ssize_t) hw->pos_emul) - hw->pending_emul;