MCPcopy Create free account
hub / github.com/LabSound/LabSound / asioMessages

Function asioMessages

src/backends/RtAudio/RtAudio.cpp:4054–4123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4052}
4053
4054static long asioMessages(long selector, long value, void * /*message*/, double * /*opt*/)
4055{
4056 long ret = 0;
4057
4058 switch (selector)
4059 {
4060 case kAsioSelectorSupported:
4061 if (value == kAsioResetRequest
4062 || value == kAsioEngineVersion
4063 || value == kAsioResyncRequest
4064 || value == kAsioLatenciesChanged
4065 // The following three were added for ASIO 2.0, you don't
4066 // necessarily have to support them.
4067 || value == kAsioSupportsTimeInfo
4068 || value == kAsioSupportsTimeCode
4069 || value == kAsioSupportsInputMonitor)
4070 ret = 1L;
4071 break;
4072 case kAsioResetRequest:
4073 // Defer the task and perform the reset of the driver during the
4074 // next "safe" situation. You cannot reset the driver right now,
4075 // as this code is called from the driver. Reset the driver is
4076 // done by completely destruct is. I.e. ASIOStop(),
4077 // ASIODisposeBuffers(), Destruction Afterwards you initialize the
4078 // driver again.
4079 std::cerr << "\nRtApiAsio: driver reset requested!!!" << std::endl;
4080 ret = 1L;
4081 break;
4082 case kAsioResyncRequest:
4083 // This informs the application that the driver encountered some
4084 // non-fatal data loss. It is used for synchronization purposes
4085 // of different media. Added mainly to work around the Win16Mutex
4086 // problems in Windows 95/98 with the Windows Multimedia system,
4087 // which could lose data because the Mutex was held too long by
4088 // another thread. However a driver can issue it in other
4089 // situations, too.
4090 // std::cerr << "\nRtApiAsio: driver resync requested!!!" << std::endl;
4091 asioXRun = true;
4092 ret = 1L;
4093 break;
4094 case kAsioLatenciesChanged:
4095 // This will inform the host application that the drivers were
4096 // latencies changed. Beware, it this does not mean that the
4097 // buffer sizes have changed! You might need to update internal
4098 // delay data.
4099 std::cerr << "\nRtApiAsio: driver latency may have changed!!!" << std::endl;
4100 ret = 1L;
4101 break;
4102 case kAsioEngineVersion:
4103 // Return the supported ASIO version of the host application. If
4104 // a host application does not implement this selector, ASIO 1.0
4105 // is assumed by the driver.
4106 ret = 2L;
4107 break;
4108 case kAsioSupportsTimeInfo:
4109 // Informs the driver whether the
4110 // asioCallbacks.bufferSwitchTimeInfo() callback is supported.
4111 // For compatibility with ASIO 1.0 drivers the host application

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected