339 | | // all audio data is set to zero. Therefore we can just use |
---|
340 | | // generatePacketHeader() to do the work here. |
---|
341 | | return generatePacketHeader(data, length, tag, sy, cycle, dropped, max_length); |
---|
| 339 | // all audio data is set to zero. |
---|
| 340 | |
---|
| 341 | // The number of events per packet expected by the MOTU is solely |
---|
| 342 | // dependent on the current sample rate. An 'event' is one sample from |
---|
| 343 | // all channels plus possibly other midi and control data. |
---|
| 344 | signed n_events = getNominalFramesPerPacket(); |
---|
| 345 | |
---|
| 346 | // Do housekeeping expected for all packets sent to the MOTU, even |
---|
| 347 | // for packets containing no audio data. |
---|
| 348 | *sy = 0x00; |
---|
| 349 | *tag = 1; // All MOTU packets have a CIP-like header |
---|
| 350 | |
---|
| 351 | /* Assume the packet will have audio data. This is not strictly valid |
---|
| 352 | * but seems to work most of the time. The MOTU data packets have |
---|
| 353 | * either 8, 16 or 32 samples in them. This is more than would normally |
---|
| 354 | * be required in each cycle period and so every so often an empty |
---|
| 355 | * packet must be sent to allow things to "catch up". |
---|
| 356 | */ |
---|
| 357 | *length = n_events*m_event_size + 8; |
---|
| 358 | |
---|
| 359 | return eCRV_Packet; |
---|
| 360 | //generatePacketHeader(data, length, tag, sy, cycle, dropped, max_length); |
---|