EMU-driver
EMU-driver copied to clipboard
restructure audio output code
I'd like to move all audio output stream related code to the USBOutputStream class that I created already
Main issues before this can be done are
- writeFrameList calls usbInputStream.startingEngine
- use of self->usbInputStream.shouldStop in writeCompleted to stop the driver.
also a problem is waitForFirstUSBFrameCompletion. Seems not used at all?
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???
A bit of cleanup is still needed around init and takedown. In init there seems duplicate code with init of inputstream #5
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.