EMU-driver icon indicating copy to clipboard operation
EMU-driver copied to clipboard

restructure audio output code

Open Wouter1 opened this issue 10 years ago • 5 comments

I'd like to move all audio output stream related code to the USBOutputStream class that I created already

Wouter1 avatar Jan 03 '15 19:01 Wouter1

Main issues before this can be done are

  • writeFrameList calls usbInputStream.startingEngine
  • use of self->usbInputStream.shouldStop in writeCompleted to stop the driver.

Wouter1 avatar Jan 03 '15 19:01 Wouter1

also a problem is waitForFirstUSBFrameCompletion. Seems not used at all?

Wouter1 avatar Jan 04 '15 07:01 Wouter1

It is not clear why we have this in writeFrameList

        result = mOutput.pipe->Write(mOutput.bufferDescriptors[frameListNum],kAppleUSBSSIsocContinuousFrame,
            mOutput.numUSBFramesPerList,&mOutput.usbIsocFrames[frameListNum * mOutput.numUSBFramesPerList], &mOutput.usbCompletion[frameListNum], (TRUE == usbInputStream.startingEngine));

(TRUE == usbInputStream.startingEngine) ??

this is the poll interval, it becomes 0ms or 1ms depending on whether engine is starting???

Wouter1 avatar Jan 04 '15 07:01 Wouter1

A bit of cleanup is still needed around init and takedown. In init there seems duplicate code with init of inputstream #5

Wouter1 avatar Jan 04 '15 21:01 Wouter1

Checked if wrapDescriptors are used. Yes, about 4 times per second at 44k and 48k, but at not regular moments. At 96k it always appears at framelist 1.

Wouter1 avatar Mar 07 '15 09:03 Wouter1