|
| void | arrived (device_t &device) override |
| ::ASIOError | canSampleRate (::ASIOSampleRate samplerate) noexcept override |
| ::ASIOError | controlPanel () noexcept override |
| ::ASIOError | createBuffers (::ASIOBufferInfo *info, long channels, long iosize, ::ASIOCallbacks *callbacks) noexcept override |
| std::shared_ptr< device_t > | device () noexcept |
| | the device a host call works on: a strong reference under the driver's map lock, so it stands for the whole call
|
| ::ASIOError | disposeBuffers () noexcept override |
| void | exception (const exception &exception, bool filtered=false) const noexcept override |
| ::ASIOError | future (long selector, void *) noexcept override |
| ::ASIOError | getBufferSize (long *min, long *max, long *preferred, long *granularity) noexcept override |
| ::ASIOError | getChannelInfo (::ASIOChannelInfo *info) noexcept override |
| ::ASIOError | getChannels (long *ins, long *outs) noexcept override |
| ::ASIOError | getClockSources (::ASIOClockSource *clocks, long *sources) noexcept override |
| void | getDriverName (char *name) noexcept override |
| long | getDriverVersion () noexcept override |
| void | getErrorMessage (char *string) noexcept override |
| ::ASIOError | getLatencies (long *rx, long *tx) noexcept override |
| ::ASIOError | getSamplePosition (::ASIOSamples *samples, ::ASIOTimeStamp *timestamp) noexcept override |
| | Inquires the sample position/time stamp pair.
|
| ::ASIOError | getSampleRate (::ASIOSampleRate *samplerate) noexcept override |
| ::ASIOBool | init (void *) noexcept override |
| DECLARE_IUNKNOWN ::HRESULT STDMETHODCALLTYPE | NonDelegatingQueryInterface (const ::IID &riid, void **object) noexcept override |
| void | notify () noexcept |
| void | notify (unsigned int samplerate) noexcept |
| ::ASIOError | outputReady () noexcept override |
| void | overload () noexcept |
| void | process (int64_t timestamp) noexcept |
| void | removed (device_t &device) noexcept override |
| | the engine goes with the device's own conclude(); this driver keeps the device until the host releases the COM object, so no host call can meet a released one
|
| ::ASIOError | setClockSource (long index) noexcept override |
| ::ASIOError | setSampleRate (::ASIOSampleRate samplerate) noexcept override |
| void | sleep () override |
| ::ASIOError | start () noexcept override |
| ::ASIOError | stop () noexcept override |
| void | wake () override |
| | ~driver () noexcept |
| | concludes while this driver still stands: its own listeners reach its overrides, and those are gone once a base destructor runs
|
template<typename device_t, typename driver_t>
class dx::asio::driver< device_t, driver_t >
- Todo
- strongly consider getting rid of Bills COM macro orgy https://github.com/AlexBAV/moderncom
template<typename device_t, typename driver_t>
concludes while this driver still stands: its own listeners reach its overrides, and those are gone once a base destructor runs
< ends the session: the pins stop and the group's tick thread is joined, so no tick can reach this object afterwards
template<typename device_t, typename driver_t>
| ::ASIOError dx::asio::driver< device_t, driver_t >::getSamplePosition |
( |
::ASIOSamples * | samples, |
|
|
::ASIOTimeStamp * | timestamp ) |
|
inlineoverrideprotectednoexcept |
Inquires the sample position/time stamp pair.
In order to be able to synchronize properly, the sample position / time stamp pair must refer to the current block, that is, the engine will call ASIOGetSamplePosition() in its bufferSwitch() callback and expect the time for the first sample of the current block. Thus, when requested in the very first bufferSwitch after ASIOStart(), the sample position should be zero, and the time stamp should refer to the very time where the stream was started. It also means that the sample position must be block aligned. The driver must ensure proper interpolation if the system time can not be determined for the block position. The driver is responsible for precise time stamps as it usually has most direct access to lower level resources. Proper behavior of ASIOGetSamplePosition() and ASIOGetLatencies() are essential for precise media synchronization!
- Exceptions
-
| If | no input/output is present, ASE_NotPresent will be returned. If there is no clock, ASE_SPNotAdvancing will be returned. |
- Parameters
-
| samples | will hold the sample position on return. The sample position is reset to zero when ASIOStart() gets called. |
| timestamp | will hold the system time on return when the sample position was latched |