- get_guid : I assume it's used to get guid of the output deviceIn g_get_guid() you return the GUID of your component. Use the Create GUID menu command in Visual Studio to generate your own.
Individual ASIO devices you would handle in g_enum_devices(). The callback has function on_device() which you call with the GUID and the name of each ASIO device.
- output constructor : in case of Asio, init (and open ?) the driverYes. The constructor will only be called when playback starts with your output.
- get_latency : seems to be used to know the length of sample to be playedYou return how many seconds the playback is delayed. This includes the amount of data you have buffered and the latency of the output, if you know it.
But in which buffers samples are stored ? Is there some helpers functions ?
You allocate the buffer. Your constructor is told how many seconds of buffer user has requested so use that to calculate how many bytes you need.
- update : Which is the purpose ?? Also there is an on_update() function (currently commented in my impl)You tell the core if you have space in your buffers to take more bytes. Once you have room in buffers and you inform the core, process_samples() will get called with new data.
Apart SDK, could somebody shows me sample code ?There's saivert's pipe output. Though it doesn't do everything and doesn't calculate accurate latencies.