Todo List

File pa_asio.cpp

check that CoInitialize()/CoUninitialize() are always correctly paired, even in error cases.

implement host api specific extension to set i/o buffer sizes in frames

implement ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable

implement IsFormatSupported

work out how to implement stream stoppage from callback and implement IsStreamActive properly. Stream stoppage could be implemented using a high-priority thread blocked on an Event which is signalled by the callback. Or, we could just call ASIO stop from the callback and see what happens.

rigorously check asio return codes and convert to pa error codes

Different channels of a multichannel stream can have different sample formats, but we assume that all are the same as the first channel for now. Fixing this will require the block processor to maintain per-channel conversion functions - could get nasty.

investigate whether the asio processNow flag needs to be honoured

handle asioMessages() callbacks in a useful way, or at least document what cases we don't handle.

miscellaneous other FIXMEs

provide an asio-specific method for setting the systems specific value (aka main window handle) - check that this matches the value passed to PaAsio_ShowControlPanel, or remove it entirely from PaAsio_ShowControlPanel. - this would allow PaAsio_ShowControlPanel to be called for the currently open stream (at present all streams must be closed).

Global Pa_CloseStream
REVIEW: shouldn't we close anyway?

File pa_converters.c

Consider whether functions which dither but don't clip should exist, V18 automatically enabled clipping whenever dithering was selected. Perhaps we should do the same.

implement the converters marked IMPLEMENT ME: Float32_To_UInt8_Dither, Float32_To_UInt8_Clip, Float32_To_UInt8_DitherClip, Int32_To_Int24_Dither, Int32_To_UInt8_Dither, Int24_To_Int16_Dither, Int24_To_Int8_Dither, Int24_To_UInt8_Dither, Int16_To_Int8_Dither, Int16_To_UInt8_Dither,

review the converters marked REVIEW: Float32_To_Int32, Float32_To_Int32_Dither, Float32_To_Int32_Clip, Float32_To_Int32_DitherClip, Int32_To_Int16_Dither, Int32_To_Int8_Dither, Int16_To_Int32

File pa_cpuload.c
Dynamically calculate the coefficients used to smooth the CPU Load Measurements over time to provide a uniform characterisation of CPU Load independent of rate at which PaUtil_BeginCpuLoadMeasurement / PaUtil_EndCpuLoadMeasurement are called.

File pa_debugprint.c

Consider allocating strdump using dynamic allocation.

Consider reentrancy and possibly corrupted strdump buffer.

File pa_front.c

Consider adding host API specific error text in Pa_GetErrorText() for paUnanticipatedHostError

Consider adding a new error code for when (inputParameters == NULL) && (outputParameters == NULL)

review whether Pa_CloseStream() should call the interface's CloseStream function if aborting the stream returns an error code.

Create new error codes if a NULL buffer pointer, or a zero frame count is passed to Pa_ReadStream or Pa_WriteStream.

Global Pa_GetErrorText
could catenate the last host error text to result in the case of paUnanticipatedHostError

File pa_process.c

Consider cache tilings for intereave<->deinterleave.

implement timeInfo->currentTime int PaUtil_BeginBufferProcessing()

specify and implement some kind of logical policy for handling the underflow and overflow stream flags when the underflow/overflow overlaps multiple user buffers/callbacks.

provide support for priming the buffers with data from the callback. The client interface is now implemented through PaUtil_SetNoInput() which sets bp->hostInputChannels[0][0].data to zero. However this is currently only implemented in NonAdaptingProcess(). It shouldn't be needed for AdaptingInputOnlyProcess() (no priming should ever be requested for AdaptingInputOnlyProcess()). Not sure if additional work should be required to make it work with AdaptingOutputOnlyProcess, but it definitely is required for AdaptingProcess.

implement PaUtil_SetNoOutput for AdaptingProcess

don't allocate temp buffers for blocking streams unless they are needed. At the moment they are needed, but perhaps for host APIs where the implementation passes a buffer to the host they could be used.

File pa_util.h
Document and adhere to the alignment guarantees provided by PaUtil_AllocateMemory().

File pa_win_ds.c

implement paInputOverflow callback status flag

implement paNeverDropInput.

implement host api specific extension to set i/o buffer sizes in frames

implement initialisation of PaDeviceInfo default*Latency fields (currently set to 0.)

implement ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable

audit handling of DirectSound result codes - in many cases we could convert a HRESULT into a native portaudio error code. Standard DirectSound result codes are documented at msdn.

implement IsFormatSupported

call PaUtil_SetLastHostErrorInfo with a specific error string (currently just "DSound error").

make sure all buffers have been played before stopping the stream when the stream callback returns paComplete

retrieve default devices using the DRVM_MAPPER_PREFERRED_GET functions used in the wmme api these wave device ids can be aligned with the directsound devices either by retrieving the system interface device name using DRV_QUERYDEVICEINTERFACE or by using the wave device id retrieved in KsPropertySetEnumerateCallback.

File pa_win_hostapis.c
Consider using PA_USE_WMME etc instead of PA_NO_WMME. This is what the Unix version does, we should consider being consistent.

File pa_win_util.c
Implement workaround for QueryPerformanceCounter() skipping forward bug. (see msdn kb Q274323).

File pa_win_wmme.c

Fix buffer catch up code, can sometimes get stuck (perhaps fixed now, needs to be reviewed and tested.)

implement paInputUnderflow, paOutputOverflow streamCallback statusFlags, paNeverDropInput.

BUG: PA_MME_SET_LAST_WAVEIN/OUT_ERROR is used in functions which may be called asynchronously from the callback thread. this is bad.

implement inputBufferAdcTime in callback thread

review/fix error recovery and cleanup in marked functions

implement timeInfo for stream priming

handle the case where the callback returns paAbort or paComplete during stream priming.

review input overflow and output underflow handling in ReadStream and WriteStream

Investigate supporting host buffer formats > 16 bits

define UNICODE and _UNICODE in the project settings and see what breaks

refactor conversion of MMSYSTEM errors into PA arrors into a single function.

cleanup WAVEFORMATEXTENSIBLE retry in InitializeWaveHandles to not use a for loop

Global PaAsio_GetAvailableLatencyValues
This function should have a better name, any suggestions?

Global paCanNotReadFromACallbackStream
review error code name

Global paCanNotReadFromAnOutputOnlyStream
review error code name

Global paCanNotWriteToACallbackStream
review error code name

Global paCanNotWriteToAnInputOnlyStream
review error code name

Global PaUtil_BeginBufferProcessing
time info currentTime not implemented

Global PaUtil_EndCpuLoadMeasurement
these coefficients shouldn't be hardwired

Global ReadStream
REVIEW: consider what to do if the input overflows. do we requeue all of the buffers? should we be running a thread to make sure they are always queued?

Global WriteStream
REVIEW: consider what to do if the output underflows. do we requeue all the existing buffers with zeros? should we run a separate thread to keep the buffers enqueued at all times?

Generated for PortAudio by  doxygen1.6.1