AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
ntv2audio.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
7 #include "ntv2card.h"
8 #include "ntv2devicefeatures.h"
9 #include "ntv2utils.h"
10 #include "ntv2audiodefines.h"
11 #include "ajabase/common/common.h"
12 #include "ajabase/system/debug.h"
13 #ifdef MSWindows
14  #include <math.h>
15  #pragma warning(disable: 4800)
16 #endif // MSWindows
17 
18 using namespace std;
19 
20 
21 #define AUDFAIL(__x__) AJA_sERROR (AJA_DebugUnit_AudioGeneric, " " << HEX0N(uint64_t(this),16) << "::" << AJAFUNC << ": " << __x__)
22 #define AUDWARN(__x__) AJA_sWARNING(AJA_DebugUnit_AudioGeneric, " " << HEX0N(uint64_t(this),16) << "::" << AJAFUNC << ": " << __x__)
23 #define AUDNOTE(__x__) AJA_sNOTICE (AJA_DebugUnit_AudioGeneric, " " << HEX0N(uint64_t(this),16) << "::" << AJAFUNC << ": " << __x__)
24 #define AUDINFO(__x__) AJA_sINFO (AJA_DebugUnit_AudioGeneric, " " << HEX0N(uint64_t(this),16) << "::" << AJAFUNC << ": " << __x__)
25 #define AUDDBUG(__x__) AJA_sDEBUG (AJA_DebugUnit_AudioGeneric, " " << HEX0N(uint64_t(this),16) << "::" << AJAFUNC << ": " << __x__)
26 
27 
30 
33 
36 
39 
42 
45 
47 
50 
53 
56 
61  inline PCM_CONTROL_INFO(ULWord regNum, ULWord mask, ULWord shift) : pcmControlReg(regNum), pcmControlMask(mask), pcmControlShift(shift){}
62 };
63 
65 {
66  {
75  },
76  {
85  },
86  {
95  },
96  {
105  },
106  {
115  },
116  {
125  },
126  {
135  },
136  {
145  }
146 };
147 
148 
149 bool CNTV2Card::SetNumberAudioChannels (const ULWord inNumChannels, const NTV2AudioSystem inAudioSystem)
150 {
151  const ULWord regAudControl (NTV2_IS_VALID_AUDIO_SYSTEM (inAudioSystem) ? gAudioSystemToAudioControlRegNum [inAudioSystem] : 0);
152 
153  if (regAudControl == 0)
154  return false;
155  else if (inNumChannels == 6 || inNumChannels == 8)
156  {
157  // Make sure 16 channel audio is off
158  WriteRegister (regAudControl, 0, kRegMaskAudio16Channel, kRegShiftAudio16Channel);
159 
160  // Now turn on 6 or 8 channel audio
161  return WriteRegister (regAudControl, inNumChannels == 8, kRegMaskNumChannels, kRegShiftNumChannels);
162  }
163  else if (inNumChannels == 16)
164  {
165  // Turn 16 channel audio on, doesn't matter how 8 or 6 channel is set
166  return WriteRegister (regAudControl, 1, kRegMaskAudio16Channel, kRegShiftAudio16Channel);
167  }
168  else
169  return false;
170 }
171 
172 
173 bool CNTV2Card::SetNumberAudioChannels (const ULWord inNumChannels, const NTV2AudioSystemSet & inAudioSystems)
174 {
175  size_t numFailures(0);
176  for (NTV2AudioSystemSetConstIter it(inAudioSystems.begin()); it != inAudioSystems.end(); ++it)
177  if (!SetNumberAudioChannels (inNumChannels, *it))
178  numFailures++;
179  return numFailures == 0;
180 }
181 
182 
183 bool CNTV2Card::GetNumberAudioChannels (ULWord & outNumChannels, const NTV2AudioSystem inAudioSystem)
184 {
185  const ULWord regAudControl (NTV2_IS_VALID_AUDIO_SYSTEM (inAudioSystem) ? gAudioSystemToAudioControlRegNum [inAudioSystem] : 0);
186  ULWord value (0);
187  bool status (false);
188 
189  if (regAudControl == 0)
190  return false;
191 
192  status = ReadRegister (regAudControl, value, kRegMaskAudio16Channel, kRegShiftAudio16Channel);
193  if (value == 1)
194  outNumChannels = 16;
195  else
196  {
197  status = ReadRegister (regAudControl, value, kRegMaskNumChannels, kRegShiftNumChannels);
198  if (value == 1)
199  outNumChannels = 8;
200  else
201  outNumChannels = 6;
202  }
203 
204  return status;
205 }
206 
207 
208 bool CNTV2Card::SetAudioRate (const NTV2AudioRate inRate, const NTV2AudioSystem inAudioSystem)
209 {
210  ULWord rateLow (0);
211  ULWord rateHigh (0);
212  bool status;
213 
214  if ((inRate == NTV2_AUDIO_192K) && (inAudioSystem == NTV2_AUDIOSYSTEM_1))
215  return false;
216 
217  if (inRate == NTV2_AUDIO_96K)
218  rateLow = 1;
219  else if (inRate == NTV2_AUDIO_192K)
220  rateHigh = 1;
221 
222  status = WriteRegister (gAudioSystemToAudioControlRegNum [inAudioSystem], rateLow, kRegMaskAudioRate, kRegShiftAudioRate);
223  status &= WriteRegister (kRegAudioControl2, rateHigh, gAudioRateHighMask [inAudioSystem], gAudioRateHighShift [inAudioSystem]);
224 
225  return status;
226 }
227 
228 
229 bool CNTV2Card::GetAudioRate (NTV2AudioRate & outRate, const NTV2AudioSystem inAudioSystem)
230 {
231  ULWord rateLow (0);
232  ULWord rateHigh (0);
233  bool status;
234 
235  status = ReadRegister (gAudioSystemToAudioControlRegNum [inAudioSystem], rateLow, kRegMaskAudioRate, kRegShiftAudioRate);
236  status &= ReadRegister (kRegAudioControl2, rateHigh, gAudioRateHighMask [inAudioSystem], gAudioRateHighShift [inAudioSystem]);
237  if (status)
238  {
239  if ((rateLow == 0) && (rateHigh == 0))
240  outRate = NTV2_AUDIO_48K;
241  else if ((rateLow == 1) && (rateHigh == 0))
242  outRate = NTV2_AUDIO_96K;
243  else if ((rateLow == 0) && (rateHigh == 1))
244  outRate = NTV2_AUDIO_192K;
245  else
246  status = false;
247  }
248  return status;
249 }
250 
251 
252 bool CNTV2Card::SetAudioBufferSize (const NTV2AudioBufferSize inValue, const NTV2AudioSystem inAudioSystem)
253 {
254  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
255  return false;
256  if (inValue != NTV2_AUDIO_BUFFER_SIZE_4MB && ::NTV2DeviceCanDoStackedAudio(_boardID))
257  return false; // Stacked audio devices are fixed at 4MB
258  return WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inValue, kK2RegMaskAudioBufferSize, kK2RegShiftAudioBufferSize);
259 }
260 
261 bool CNTV2Card::SetAudioBufferSize (const NTV2AudioBufferSize inMode, const NTV2AudioSystemSet & inAudioSystems)
262 {
263  size_t numFailures(0);
264  for (NTV2AudioSystemSetConstIter it(inAudioSystems.begin()); it != inAudioSystems.end(); ++it)
265  if (!SetAudioBufferSize (inMode, *it))
266  numFailures++;
267  return numFailures == 0;
268 }
269 
270 
272 {
273  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
274  return false;
275  outSize = NTV2_AUDIO_BUFFER_SIZE_4MB; // NTV2 has standardized on 4MB audio buffers
276  if (::NTV2DeviceCanDoStackedAudio(_boardID))
277  return true; // Done!
278 
280 }
281 
282 
283 bool CNTV2Card::SetAudioAnalogLevel (const NTV2AudioLevel inLevel, const NTV2AudioSystem inAudioSystem)
284 {
285  (void)inAudioSystem;
286  if (IsBreakoutBoardConnected())
288  else
289  return WriteRegister (kRegAud1Control, inLevel, kFS1RegMaskAudioLevel, kFS1RegShiftAudioLevel);
290 }
291 
292 
293 bool CNTV2Card::GetAudioAnalogLevel (NTV2AudioLevel & outLevel, const NTV2AudioSystem inAudioSystem)
294 {
295  (void)inAudioSystem;
296  if (IsBreakoutBoardConnected())
298  else
300 }
301 
302 
303 bool CNTV2Card::SetAudioLoopBack (const NTV2AudioLoopBack inValue, const NTV2AudioSystem inAudioSystem)
304 {
305  if (!NTV2_IS_VALID_AUDIO_LOOPBACK(inValue))
306  return false;
307  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
308  return false;
309  if (inValue == NTV2_AUDIO_LOOPBACK_ON)
310  SetEmbeddedAudioClock (NTV2_EMBEDDED_AUDIO_CLOCK_REFERENCE, inAudioSystem); // Use board reference as audio clock
311  return WriteRegister (gAudioSystemToAudioControlRegNum [inAudioSystem], inValue, kRegMaskLoopBack, kRegShiftLoopBack);
312 }
313 
314 bool CNTV2Card::SetAudioLoopBack (const NTV2AudioLoopBack inMode, const NTV2AudioSystemSet & inAudioSystems)
315 {
316  size_t numFailures(0);
317  for (NTV2AudioSystemSetConstIter it(inAudioSystems.begin()); it != inAudioSystems.end(); ++it)
318  if (!SetAudioLoopBack (inMode, *it))
319  numFailures++;
320  return numFailures == 0;
321 }
322 
323 
324 bool CNTV2Card::GetAudioLoopBack (NTV2AudioLoopBack & outValue, const NTV2AudioSystem inAudioSystem)
325 {
326  outValue = NTV2_AUDIO_LOOPBACK_INVALID;
327  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
328  return false;
330 }
331 
332 
334 {
335  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
336  return false;
337  return WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inMode, kRegMaskEncodedAudioMode, kRegShiftEncodedAudioMode);
338 }
339 
340 
342 {
343  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
344  return false;
346 }
347 
348 
349 bool CNTV2Card::SetEmbeddedAudioInput (const NTV2EmbeddedAudioInput inAudioInput, const NTV2AudioSystem inAudioSystem)
350 {
351  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
352  return false;
353  const ULWord regAudSource (gAudioSystemToSrcSelectRegNum [inAudioSystem]);
354  const ULWord numInputs (::NTV2DeviceGetNumVideoInputs (_boardID));
355  const ULWord numHDMI (::NTV2DeviceGetNumHDMIVideoInputs (_boardID));
356  bool status (false);
357  ULWord value1 (0);
358  ULWord value2 (0);
359 
360  switch (inAudioInput)
361  { // Sparse bits
362  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1: value1 = 0x0; value2 = 0x0; break;
363  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_2: value1 = 0x1; value2 = 0x0; break;
364  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_3: value1 = 0x0; value2 = 0x1; break;
365  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4: value1 = 0x1; value2 = 0x1; break;
366  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_5: value1 = 0x0; value2 = 0x0; break;
367  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_6: value1 = 0x1; value2 = 0x0; break;
368  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_7: value1 = 0x0; value2 = 0x1; break;
369  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_8: value1 = 0x1; value2 = 0x1; break;
370  default: return false;
371  }
372 
373  status = WriteRegister (regAudSource, value1, kRegMaskEmbeddedAudioInput, kRegShiftEmbeddedAudioInput);
374  if (numInputs > 2 || inAudioInput > NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4 || numHDMI > 1)
375  status = WriteRegister (regAudSource, value2, kRegMaskEmbeddedAudioInput2, kRegShiftEmbeddedAudioInput2);
376  return status;
377 }
378 
379 
381 {
382  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
383  return false;
384  const ULWord srcSelectReg (gAudioSystemToSrcSelectRegNum [inAudioSystem]);
385  const ULWord numInputs (::NTV2DeviceGetNumVideoInputs (_boardID));
386  ULWord value (0);
387  bool status (false);
388 
389  if (numInputs <= 2)
390  status = ReadRegister (srcSelectReg, value, kRegMaskEmbeddedAudioInput, kRegShiftEmbeddedAudioInput);
391  else
392  {
393  ULWord sparse1(0), sparse2(0); // Sparse bits
394  status = ReadRegister (srcSelectReg, sparse1, kRegMaskEmbeddedAudioInput, kRegShiftEmbeddedAudioInput)
395  && ReadRegister (srcSelectReg, sparse2, kRegMaskEmbeddedAudioInput2, kRegShiftEmbeddedAudioInput2);
396  if (!sparse1 && !sparse2)
398  else if (sparse1 && !sparse2)
400  else if (!sparse1 && sparse2)
402  else if (sparse1 && sparse2)
404 
405  if (inAudioSystem >= NTV2_AUDIOSYSTEM_5)
406  switch (value)
407  {
412  }
413  }
414  if (status)
415  outAudioInput = NTV2EmbeddedAudioInput(value);
416  return status;
417 }
418 
419 
421 {
422  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
423  return false;
424  return WriteRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], inValue, kRegMaskEmbeddedAudioClock, kRegShiftEmbeddedAudioClock);
425 }
426 
427 
429 {
430  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
431  return false;
433 }
434 
435 
436 bool CNTV2Card::GetAudioWrapAddress (ULWord & outWrapAddress, const NTV2AudioSystem inAudioSystem)
437 {
439  if (!GetAudioBufferSize (bufferSize, inAudioSystem))
440  return false;
441 
442  switch (bufferSize)
443  {
444  case NTV2_AUDIO_BUFFER_SIZE_1MB: outWrapAddress = NTV2_AUDIO_WRAPADDRESS; break; // (0x000FF000 * 1)
445  case NTV2_AUDIO_BUFFER_SIZE_4MB: outWrapAddress = NTV2_AUDIO_WRAPADDRESS_BIG; break; // (0x000FF000 * 4)
446  default: outWrapAddress = NTV2_AUDIO_WRAPADDRESS; break;
447  }
448  return true;
449 }
450 
451 
452 bool CNTV2Card::GetAudioReadOffset (ULWord & outReadOffset, const NTV2AudioSystem inAudioSystem)
453 {
455  if (!GetAudioBufferSize (bufferSize, inAudioSystem))
456  return false;
457 
458  switch (bufferSize)
459  {
460  case NTV2_AUDIO_BUFFER_SIZE_1MB: outReadOffset = NTV2_AUDIO_READBUFFEROFFSET; break; // (0x00100000 * 1) 1MB
461  case NTV2_AUDIO_BUFFER_SIZE_4MB: outReadOffset = NTV2_AUDIO_READBUFFEROFFSET_BIG; break; // (0x00100000 * 4) 4MB
462  default: outReadOffset = NTV2_AUDIO_READBUFFEROFFSET; break; // (0x00100000 * 1) 1MB
463  }
464  return true;
465 }
466 
467 
468 bool CNTV2Card::ReadAudioLastIn (ULWord & outValue, const NTV2AudioSystem inAudioSystem)
469 {
470  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
471  return false;
472  return ReadRegister (gChannelToAudioInLastAddrRegNum[inAudioSystem], outValue);
473 }
474 
475 bool CNTV2Card::ReadAudioLastOut (ULWord & outValue, const NTV2AudioSystem inAudioSystem)
476 {
477  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
478  return false;
479  return ReadRegister (gChannelToAudioOutLastAddrRegNum[inAudioSystem], outValue);
480 }
481 
482 #if !defined(NTV2_DEPRECATE_16_0)
483  bool CNTV2Card::ReadAudioSource (ULWord & outValue, const NTV2Channel inChannel) {return ReadRegister(gAudioSystemToSrcSelectRegNum[inChannel], outValue);}
484  bool CNTV2Card::WriteAudioSource (const ULWord inValue, const NTV2Channel inChannel) {return WriteRegister(gAudioSystemToSrcSelectRegNum[inChannel], inValue);}
485 #endif // !defined(NTV2_DEPRECATE_16_0)
486 
487 
488 bool CNTV2Card::SetAudioSystemInputSource (const NTV2AudioSystem inAudioSystem, const NTV2AudioSource inAudioSource, const NTV2EmbeddedAudioInput inEmbeddedSource)
489 {
490  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
491  return false;
492  bool result(false);
493  static const ULWord sAudioSourceToRegValues [] = { 0x1, // NTV2_AUDIO_EMBEDDED
494  0x0, // NTV2_AUDIO_AES
495  0x9, // NTV2_AUDIO_ANALOG
496  0xA, // NTV2_AUDIO_HDMI
497  0xB}; // NTV2_AUDIO_MIC
498 
499  if (ULWord(inAudioSystem) < GetNumSupported(kDeviceGetTotalNumAudioSystems))
500  if (NTV2_IS_VALID_AUDIO_SOURCE(inAudioSource))
501  result = WriteRegister (gAudioSystemToSrcSelectRegNum [inAudioSystem],
502  sAudioSourceToRegValues [inAudioSource],
504  if (result)
505  {
506  if ((inAudioSource == NTV2_AUDIO_EMBEDDED) || (inAudioSource == NTV2_AUDIO_HDMI))
507  if (SetEmbeddedAudioInput (inEmbeddedSource, inAudioSystem)) // Use the specified input for grabbing embedded audio
508  result = SetEmbeddedAudioClock (NTV2_EMBEDDED_AUDIO_CLOCK_VIDEO_INPUT, inAudioSystem); // Use video input clock (not reference)
509 
510  if (NTV2DeviceCanDoBreakoutBoard(_boardID))
511  {
512  if(IsBreakoutBoardConnected() && inAudioSource == NTV2_AUDIO_ANALOG)
513  result = EnableBOBAnalogAudioIn(true);
514  else
515  result = EnableBOBAnalogAudioIn(false);
516  }
517  }
518  return result;
519 
520 } // SetAudioSystemInputSource
521 
522 
523 bool CNTV2Card::GetAudioSystemInputSource (const NTV2AudioSystem inAudioSystem, NTV2AudioSource & outAudioSource, NTV2EmbeddedAudioInput & outEmbeddedSource)
524 {
525  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
526  return false;
527  ULWord regValue (0);
528 
529  outAudioSource = NTV2_AUDIO_SOURCE_INVALID;
530  outEmbeddedSource = NTV2_EMBEDDED_AUDIO_INPUT_INVALID;
531 
532  if (ULWord(inAudioSystem) >= GetNumSupported(kDeviceGetTotalNumAudioSystems))
533  return false; // Invalid audio system
534  if (!ReadRegister (gAudioSystemToSrcSelectRegNum [inAudioSystem], regValue, kRegMaskAudioSource, kRegShiftAudioSource))
535  return false;
536  switch (regValue & 0x0000000F)
537  {
538  case 0x1: outAudioSource = NTV2_AUDIO_EMBEDDED; break;
539  case 0x0: outAudioSource = NTV2_AUDIO_AES; break;
540  case 0x9: outAudioSource = NTV2_AUDIO_ANALOG; break;
541  case 0xA: outAudioSource = NTV2_AUDIO_HDMI; break;
542  case 0xB: outAudioSource = NTV2_AUDIO_MIC; break;
543  default: return false;
544  }
545 
546  if (outAudioSource == NTV2_AUDIO_EMBEDDED)
547  GetEmbeddedAudioInput(outEmbeddedSource, inAudioSystem);
548  return true;
549 
550 }
551 
552 
553 bool CNTV2Card::GetSDIOutputAudioSystem (const NTV2Channel inChannel, NTV2AudioSystem & outAudioSystem)
554 {
555  outAudioSystem = NTV2_AUDIOSYSTEM_INVALID;
556  if (ULWord(inChannel) >= ::NTV2DeviceGetNumVideoOutputs(_boardID))
557  return false; // illegal channel
558 
559  ULWord b2(0), b1(0), b0(0); // The three bits that determine which audio system feeds the SDI output
560  const ULWord regNum (gChannelToSDIOutControlRegNum[inChannel]);
561  if (!ReadRegister (regNum, b2, BIT(18), 18)) // bit 18 is MSB
562  return false;
563  if (!ReadRegister (regNum, b1, BIT(28), 28))
564  return false;
565  if (!ReadRegister (regNum, b0, BIT(30), 30)) // bit 30 is LSB
566  return false;
567  outAudioSystem = NTV2AudioSystem(b2 * 4 + b1 * 2 + b0);
568  return true;
569 
570 } // GetSDIOutputAudioSystem
571 
572 
573 bool CNTV2Card::SetSDIOutputAudioSystem (const NTV2Channel inChannel, const NTV2AudioSystem inAudioSystem)
574 {
575  if (ULWord(inChannel) >= ::NTV2DeviceGetNumVideoOutputs (_boardID))
576  return false; // Invalid channel
577  if (ULWord(inAudioSystem) >= GetNumSupported(kDeviceGetTotalNumAudioSystems))
578  return false; // Invalid audio system
579 
580  ULWord value (inAudioSystem);
581  ULWord b2 (value / 4);
582  if (!WriteRegister (gChannelToSDIOutControlRegNum [inChannel], b2, BIT(18), 18)) // bit 18 is MSB
583  return false;
584 
585  value -= b2 * 4;
586  ULWord b1 (value / 2);
587  if (!WriteRegister (gChannelToSDIOutControlRegNum [inChannel], b1, BIT(28), 28))
588  return false;
589 
590  value -= b1 * 2;
591  ULWord b0 (value);
592  if (!WriteRegister (gChannelToSDIOutControlRegNum [inChannel], b0, BIT(30), 30)) // bit 30 is LSB
593  return false;
594 
595  return true;
596 
597 } // SetSDIOutputAudioSystem
598 
599 
600 bool CNTV2Card::SetSDIOutputAudioSystem (const NTV2ChannelSet & inSDIOutputs, const NTV2AudioSystem inAudioSystem, const bool inDS2)
601 {
602  size_t numFailures(0);
603  for (NTV2ChannelSet::const_iterator it(inSDIOutputs.begin()); it != inSDIOutputs.end(); ++it)
604  if (!(inDS2 ? SetSDIOutputDS2AudioSystem(*it, inAudioSystem) : SetSDIOutputAudioSystem(*it, inAudioSystem)))
605  numFailures++;
606  return numFailures == 0;
607 }
608 
609 
610 bool CNTV2Card::GetSDIOutputDS2AudioSystem (const NTV2Channel inChannel, NTV2AudioSystem & outAudioSystem)
611 {
612  outAudioSystem = NTV2_AUDIOSYSTEM_INVALID;
613  if (ULWord(inChannel) >= ::NTV2DeviceGetNumVideoOutputs(_boardID))
614  return false; // illegal channel
615 
616  ULWord b2(0), b1(0), b0(0); // The three bits that determine which audio system feeds the SDI output's DS2
617  const ULWord regNum (gChannelToSDIOutControlRegNum[inChannel]);
618  if (!ReadRegister (regNum, b2, BIT(19), 19)) // bit 19 is MSB
619  return false;
620  if (!ReadRegister (regNum, b1, BIT(29), 29))
621  return false;
622  if (!ReadRegister (regNum, b0, BIT(31), 31)) // bit 31 is LSB
623  return false;
624  outAudioSystem = NTV2AudioSystem(b2 * 4 + b1 * 2 + b0);
625  return true;
626 
627 } // GetSDIOutputDS2AudioSystem
628 
629 
630 bool CNTV2Card::SetSDIOutputDS2AudioSystem (const NTV2Channel inChannel, const NTV2AudioSystem inAudioSystem)
631 {
632  if (ULWord(inChannel) >= ::NTV2DeviceGetNumVideoOutputs(_boardID))
633  return false; // Invalid channel
634  if (ULWord(inAudioSystem) >= GetNumSupported(kDeviceGetTotalNumAudioSystems))
635  return false; // Invalid audio system
636 
637  ULWord value (inAudioSystem);
638  ULWord b2 (value / 4);
639  if (!WriteRegister (gChannelToSDIOutControlRegNum [inChannel], b2, BIT(19), 19)) // bit 19 is MSB
640  return false;
641 
642  value -= b2 * 4;
643  ULWord b1 (value / 2);
644  if (!WriteRegister (gChannelToSDIOutControlRegNum [inChannel], b1, BIT(29), 29))
645  return false;
646 
647  value -= b1 * 2;
648  ULWord b0 (value);
649  if (!WriteRegister (gChannelToSDIOutControlRegNum [inChannel], b0, BIT(31), 31)) // bit 31 is LSB
650  return false;
651 
652  //NTV2AudioSystem compareA;
653  //GetSDIOutputDS2AudioSystem (inChannel, compareA);
654  //NTV2_ASSERT(compareA == inAudioSystem);
655  return true;
656 
657 } // SetSDIOutputDS2AudioSystem
658 
659 
662 
663 
665 {
666  outAudioSystem = NTV2_AUDIOSYSTEM_INVALID;
667  if (!IsSupported(kDeviceCanDoAudioMixer))
668  return false; // No Audio Mixer -- shouldn't be calling this function
669  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
670  return false; // Bad Mixer Input specified
672  sAudioMixerInputSelectMasks[inMixerInput],
673  sAudioMixerInputSelectShifts[inMixerInput]);
674 }
675 
677 {
678  if (!IsSupported(kDeviceCanDoAudioMixer))
679  return false; // No Audio Mixer -- shouldn't be calling this function
680  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
681  return false; // Bad Mixer Input specified
682  if (UWord(inAudioSystem) >= ::NTV2DeviceGetNumAudioSystems(_boardID) + 1)
683  return false; // No such audio system on this device
684  return WriteRegister (kRegAudioMixerInputSelects, ULWord(inAudioSystem),
685  sAudioMixerInputSelectMasks[inMixerInput],
686  sAudioMixerInputSelectShifts[inMixerInput]);
687 }
688 
690 {
691  outChannelPair = NTV2_AUDIO_CHANNEL_PAIR_INVALID;
692  if (!IsSupported(kDeviceCanDoAudioMixer))
693  return false; // No Audio Mixer -- shouldn't be calling this function
694  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
695  return false; // Bad Mixer Input specified
696  if (NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
700  outChannelPair = NTV2_AudioChannel1_2; // Aux1/Aux2 always use 1&2
701  return true;
702 }
703 
705 {
706  if (!IsSupported(kDeviceCanDoAudioMixer))
707  return false; // No Audio Mixer -- shouldn't be calling this function
708  if (!NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
709  return false; // Can only change Main channel selection
710  if (!NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16(inChannelPair))
711  return false; // Only audio channels 1 thru 16 allowed
712  return WriteRegister (kRegAudioMixerChannelSelect, ULWord(inChannelPair),
714 }
715 
718 
719 bool CNTV2Card::GetAudioMixerInputGain (const NTV2AudioMixerInput inMixerInput, const NTV2AudioMixerChannel inChannel, ULWord & outGainValue)
720 {
721  outGainValue = 0;
722  if (!IsSupported(kDeviceCanDoAudioMixer))
723  return false; // No Audio Mixer -- shouldn't be calling this function
724  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
725  return false; // Bad Mixer Input specified
726  if (!NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2(inChannel))
727  return false; // Bad audio channel specified -- must be Ch1 or Ch2
728  return ReadRegister (inChannel == NTV2_AudioMixerChannel1
729  ? sAudioMixerInputGainCh1Regs[inMixerInput]
730  : sAudioMixerInputGainCh2Regs[inMixerInput], outGainValue);
731 }
732 
733 bool CNTV2Card::SetAudioMixerInputGain (const NTV2AudioMixerInput inMixerInput, const NTV2AudioMixerChannel inChannel, const ULWord inGainValue)
734 {
735  if (!IsSupported(kDeviceCanDoAudioMixer))
736  return false; // No Audio Mixer -- shouldn't be calling this function
737  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
738  return false; // Bad Mixer Input specified
739  if (!NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2(inChannel))
740  return false; // Bad audio channel specified -- must be Ch1 or Ch2
741  return WriteRegister(inChannel == NTV2_AudioMixerChannel1
742  ? sAudioMixerInputGainCh1Regs[inMixerInput]
743  : sAudioMixerInputGainCh2Regs[inMixerInput], inGainValue);
744 }
745 
747 {
748  outGainValue = 0;
749  if (!IsSupported(kDeviceCanDoAudioMixer))
750  return false; // No Audio Mixer -- shouldn't be calling this function
751  return ReadRegister (kRegAudioMixerOutGain, outGainValue);
752 }
753 
755 {
756  if (!IsSupported(kDeviceCanDoAudioMixer))
757  return false; // No Audio Mixer -- shouldn't be calling this function
758  WriteRegister(kRegAudioMixerOutLGain, inGainValue);
759  return WriteRegister(kRegAudioMixerOutRGain, inGainValue);
760 }
761 
763  vector<uint32_t> & outLevels)
764 {
769  outLevels.clear();
770  if (!IsSupported(kDeviceCanDoAudioMixer))
771  return false;
772 
773  // If caller specified empty channelPairs set, do "all" possible pairs...
774  NTV2AudioChannelPairs chanPairs;
775  if (inChannelPairs.empty())
776  {
778  chanPairs.insert(chPr); // Main supports Ch 1-16
779  }
780  else
781  chanPairs = inChannelPairs; // Non-empty set: do what the caller requested
782 
783  // Build a bulk register read...
784  NTV2RegisterReads regs;
785  std::set<ULWord> regsToRead;
786  for (NTV2AudioChannelPairsConstIter it(chanPairs.begin()); it != chanPairs.end(); ++it)
787  {
788  const NTV2AudioChannelPair chanPair(*it);
790  return false;
791  uint32_t regNum(gAudMxrMainOutLvlRegs[chanPair]);
792  regsToRead.insert(regNum);
793  } // for each audio channel pair
794  for (std::set<ULWord>::const_iterator it(regsToRead.begin()); it != regsToRead.end(); ++it)
795  regs.push_back(NTV2RegInfo(*it));
796 
797  // Read the level registers...
798  const bool result(ReadRegisters(regs));
799  if (result)
800  for (NTV2RegisterReadsConstIter it(regs.begin()); it != regs.end(); ++it)
801  {
802  ULWord rawLevels(it->IsValid() ? it->registerValue : 0);
803  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputLeftLevel) >> kRegShiftAudioMixerInputLeftLevel));
804  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputRightLevel) >> kRegShiftAudioMixerInputRightLevel));
805  }
806  else
807  while (outLevels.size() < chanPairs.size() * 2)
808  outLevels.push_back(0);
809  return result;
810 }
811 
813 {
814  outGainValue = 0;
815  if (!NTV2DeviceHasRotaryEncoder(GetDeviceID()))
816  return false; // No Audio Mixer -- shouldn't be calling this function
817  return ReadRegister (kRegRotaryEncoder, outGainValue, kRegMaskRotaryEncoderGain, kRegShiftRotaryEncoderGain);
818 }
819 
821 {
822  if (!NTV2DeviceHasRotaryEncoder(GetDeviceID()))
823  return false; // No Audio Mixer -- shouldn't be calling this function
824  return WriteRegister(kRegRotaryEncoder, inGainValue, kRegMaskRotaryEncoderGain, kRegShiftRotaryEncoderGain);
825 }
826 
829 
831 {
832  outMutes.reset();
833  if (!IsSupported(kDeviceCanDoAudioMixer))
834  return false; // No Audio Mixer -- shouldn't be calling this function
835  unsigned long ulongvalue(0);
837  return false;
838  outMutes = NTV2AudioChannelsMuted16(ulongvalue); // Hardware uses 1=mute 0=enabled
839  return true;
840 }
841 
843 {
844  if (!IsSupported(kDeviceCanDoAudioMixer))
845  return false; // No Audio Mixer -- shouldn't be calling this function
847 }
848 
850 {
851  outMutes.reset();
852  if (!IsSupported(kDeviceCanDoAudioMixer))
853  return false; // No Audio Mixer -- shouldn't be calling this function
854  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
855  return false; // Bad Mixer Input specified
856  ULWord muteBits(0);
857  if (!ReadRegister(kRegAudioMixerMutes, muteBits, sAudioMixerInputMuteMasks[inMixerInput], sAudioMixerInputMuteShifts[inMixerInput]))
858  return false;
859  outMutes = NTV2AudioChannelsMuted16(muteBits);
860  return true;
861 }
862 
864 {
865  if (!IsSupported(kDeviceCanDoAudioMixer))
866  return false; // No Audio Mixer -- shouldn't be calling this function
867  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
868  return false; // Bad Mixer Input specified
869  const ULWord muteBits(ULWord(inMutes.to_ulong()));
870  return WriteRegister (kRegAudioMixerMutes, muteBits, sAudioMixerInputMuteMasks[inMixerInput], sAudioMixerInputMuteShifts[inMixerInput]);
871 }
872 
873 
875  const NTV2AudioChannelPairs & inChannelPairs,
876  vector<uint32_t> & outLevels)
877 {
882  outLevels.clear();
883  if (!IsSupported(kDeviceCanDoAudioMixer))
884  return false;
885  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
886  return false;
887 
888  // If caller specified empty channelPairs set, do "all" possible pairs...
889  NTV2AudioChannelPairs chanPairs;
890  if (inChannelPairs.empty())
891  {
892  if (!NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
893  chanPairs.insert(NTV2_AudioChannel1_2); // Aux1/Aux2 only support Ch1&2
894  else
896  chanPairs.insert(chPr); // Main supports Ch 1-16
897  }
898  else
899  chanPairs = inChannelPairs; // Non-empty set: do what the caller requested
900 
901  // Build a bulk register read...
902  NTV2RegisterReads regs;
903  std::set<ULWord> regsToRead;
904  for (NTV2AudioChannelPairsConstIter it(chanPairs.begin()); it != chanPairs.end(); ++it)
905  {
906  const NTV2AudioChannelPair chanPair(*it);
908  return false;
909  uint32_t regNum(gAudMxrMainInLvlRegs[chanPair]);
910  if (!NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
911  {
912  if (chanPair != NTV2_AudioChannel1_2)
913  return false; // Aux1 & Aux2 can only report Chan 1&2 levels
914  regNum = (inMixerInput == NTV2_AudioMixerInputAux1)
917  }
918  regsToRead.insert(regNum);
919  } // for each audio channel pair
920  for (std::set<ULWord>::const_iterator it(regsToRead.begin()); it != regsToRead.end(); ++it)
921  regs.push_back(NTV2RegInfo(*it));
922 
923  // Read the level registers...
924  const bool result(ReadRegisters(regs));
925  if (result)
926  for (NTV2RegisterReadsConstIter it(regs.begin()); it != regs.end(); ++it)
927  {
928  ULWord rawLevels(it->IsValid() ? it->registerValue : 0);
929  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputLeftLevel) >> kRegShiftAudioMixerInputLeftLevel));
930  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputRightLevel) >> kRegShiftAudioMixerInputRightLevel));
931  }
932  else
933  while (outLevels.size() < chanPairs.size() * 2)
934  outLevels.push_back(0);
935  return result;
936 }
937 
939 {
940  outSampleCount = 0;
942  return false;
943  outSampleCount = 1 << outSampleCount;
944  return true;
945 }
946 
948 {
949  if (!inSampleCount)
950  return false; // Must be > 0
951  if (inSampleCount > 0x00008000)
952  return false; // Must be <= 0x8000
953  ULWord result(0), sampleCount(inSampleCount);
954  while (sampleCount >>= 1)
955  ++result;
957 }
958 
959 
960 
962 {
964 }
965 
966 
968 {
970 }
971 
972 
974 {
975  if (!NTV2_IS_VALID_AUDIO_CHANNEL_PAIR (inValue))
976  return false;
977 
978  if(NTV2DeviceGetHDMIVersion(GetDeviceID()) > 3)
979  {
981  ULWord channelSelect = static_cast<ULWord>(inValue) % 4;
985  return SetHDMIOutAudioChannels(NTV2_HDMIAudio2Channels);
986  }
987  else
988  {
989  const ULWord encoding ((ULWord (inAudioSystem) << 4) | inValue);
991  }
992 }
993 
994 
996 {
997  bool result = false;
998  if(NTV2DeviceGetHDMIVersion(GetDeviceID()) > 3)
999  {
1000  ULWord engineSelect (0), channelSelect(0), bankSelect(0);
1001  result = ReadRegister(kRegHDMIInputControl, engineSelect, kRegMaskHDMIOutSourceSelect, kRegShiftHDMIOutSourceSelect);
1002  if (result)
1003  {
1004  outAudioSystem = NTV2AudioSystem(engineSelect);
1007  outValue = NTV2AudioChannelPair((bankSelect == 0 ? 0 : 4) + channelSelect);
1008  }
1009  }
1010  else
1011  {
1012  ULWord encoding (0);
1014  if (result)
1015  {
1016  outValue = NTV2AudioChannelPair(encoding & 0x7);
1017  outAudioSystem = NTV2AudioSystem(encoding >> 4);
1018  }
1019  }
1020  return result;
1021 }
1022 
1023 
1025 {
1026  if (!NTV2_IS_VALID_AUDIO_CHANNEL_OCTET (inValue))
1027  return false;
1028 
1029  if(NTV2DeviceGetHDMIVersion(GetDeviceID()) > 3)
1030  {
1034  return SetHDMIOutAudioChannels(NTV2_HDMIAudio8Channels);
1035  }
1036  else
1037  {
1038  ULWord encoding (0);
1039  ULWord ch (ULWord (inAudioSystem) << 2);
1040  if (inValue == NTV2_AudioChannel1_8)
1041  encoding = (ch + NTV2_AudioChannel1_4) | ((ch + NTV2_AudioChannel5_8) << 4);
1042  else
1043  encoding = (ch + NTV2_AudioChannel9_12) | ((ch + NTV2_AudioChannel13_16) << 4);
1044 
1046  }
1047 }
1048 
1049 
1051 {
1052  bool result = false;
1053  if(NTV2DeviceGetHDMIVersion(GetDeviceID()) > 3)
1054  {
1055  ULWord engineSelect (0), channelSelect(0);
1057  if (result)
1058  {
1059  outValue = channelSelect == 1 ? NTV2_AudioChannel9_16 : NTV2_AudioChannel1_8;
1060  result = ReadRegister(kRegHDMIInputControl, engineSelect, kRegMaskHDMIOutSourceSelect, kRegShiftHDMIOutSourceSelect);
1061  outAudioSystem = static_cast <NTV2AudioSystem> (engineSelect);
1062  }
1063  }
1064  else
1065  {
1066  ULWord encoding (0);
1068  if (result)
1069  {
1070  if ((encoding & 0x3) == static_cast <ULWord> (NTV2_AudioChannel1_4))
1071  outValue = NTV2_AudioChannel1_8;
1072  else
1073  outValue = NTV2_AudioChannel9_16;
1074 
1075  outAudioSystem = static_cast <NTV2AudioSystem> ((encoding & 0xC) >> 2);
1076  }
1077  }
1078  return result;
1079 }
1080 
1081 
1083 {
1084  return WriteRegister (kRegHDMIInputControl, static_cast <ULWord> (inNewValue), kRegMaskHDMIOutAudioRate, kRegShiftHDMIOutAudioRate);
1085 }
1086 
1087 
1089 {
1091 }
1092 
1093 
1095 {
1096  return WriteRegister (kRegHDMIOutControl, static_cast <ULWord> (inNewValue), kRegMaskHDMIOutAudioFormat, kRegShiftHDMIOutAudioFormat);
1097 }
1098 
1099 
1101 {
1103 }
1104 
1105 
1106 bool CNTV2Card::SetAudioOutputMonitorSource (const NTV2AudioChannelPair inChannelPair, const NTV2AudioSystem inAudioSystem)
1107 {
1108  if (!NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16(inChannelPair))
1109  return false;
1110  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1111  return false;
1112  const ULWord encoding ((ULWord(inAudioSystem) << 4) | inChannelPair);
1113  return WriteRegister (kRegAudioOutputSourceMap, encoding, kRegMaskMonitorSource, kRegShiftMonitorSource);
1114 }
1115 
1116 
1118 {
1119  ULWord encoding (0);
1120  bool result = ReadRegister (kRegAudioOutputSourceMap, encoding, kRegMaskMonitorSource, kRegShiftMonitorSource);
1121  if (result)
1122  {
1123  outChannelPair = NTV2AudioChannelPair(encoding & 0xF);
1124  outAudioSystem = NTV2AudioSystem(encoding >> 4);
1125  }
1126  return result;
1127 }
1128 
1129 bool CNTV2Card::StartAudioOutput (const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI)
1130 {
1131  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1132  return false; // Bad AudioSystem
1133  const ULWord audioCtrlRegNum(gAudioSystemToAudioControlRegNum[inAudioSystem]);
1134  if (inWaitForVBI)
1135  {
1136  if (!IsSupported(kDeviceAudioCanWaitForVBI))
1137  return false; // Caller requested wait-til-VBI, but firmware doesn't support it
1138  // Set or clear the start-at-VBI bit...
1139  if (!WriteRegister(audioCtrlRegNum, inWaitForVBI ? 1UL : 0UL, kRegMaskOutputStartAtVBI, kRegShiftOutputStartAtVBI))
1140  return false;
1141  }
1142  if (!WriteRegister (audioCtrlRegNum, 0, kRegMaskResetAudioOutput, kRegShiftResetAudioOutput))
1143  return false;
1144 #if 1
1145  // Now that this audio system is reading from SDRAM, see if its buffer is colliding with other device SDRAM activity...
1146  ULWordSequence badRgns;
1147  SDRAMAuditor auditor;
1148  auditor.AssessDevice(*this, /*ignoreStoppedAudioSystemBuffers*/true); // Only care about running audio systems
1149  auditor.GetBadRegions(badRgns); // Receive the interfering memory regions
1150  for (size_t ndx(0); ndx < badRgns.size(); ndx++)
1151  { const ULWord rgnInfo(badRgns.at(ndx));
1152  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
1153  NTV2StringSet tags;
1154  auditor.GetTagsForFrameIndex (startBlk, tags);
1155  const string infoStr (aja::join(tags, ", "));
1156  ostringstream acLabel; acLabel << "Aud" << DEC(inAudioSystem+1); // Search for label e.g. "Aud2"
1157  if (infoStr.find(acLabel.str()) != string::npos)
1158  { ostringstream warning;
1159  if (numBlks > 1)
1160  warning << "8MB Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3);
1161  else
1162  warning << "8MB Frm " << DEC0N(startBlk,3);
1163  AUDWARN("Aud" << DEC(inAudioSystem+1) << " memory overlap/interference: " << warning.str() << ": " << infoStr);
1164  }
1165  } // for each "bad" region
1166 #endif
1167  return true;
1168 } // StartAudioOutput
1169 
1171 {
1172  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1174 }
1175 
1176 bool CNTV2Card::IsAudioOutputRunning (const NTV2AudioSystem inAudioSystem, bool & outIsRunning)
1177 {
1178  bool isStopped (true);
1179  bool result (inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1182  if (result)
1183  outIsRunning = !isStopped;
1184  return result;
1185 }
1186 
1187 
1188 bool CNTV2Card::SetAudio20BitMode (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1189 {
1190  return ::NTV2DeviceCanDoIP(_boardID)
1191  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1192  && WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMask20BitMode, kRegShift20BitMode);
1193 }
1194 
1195 
1196 bool CNTV2Card::GetAudio20BitMode (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1197 {
1198  return ::NTV2DeviceCanDoIP(_boardID)
1199  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1201 }
1202 
1203 
1204 bool CNTV2Card::SetAudioOutputPause (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1205 {
1206  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1207  && WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMaskPauseAudio, kRegShiftPauseAudio);
1208 }
1209 
1210 
1211 bool CNTV2Card::GetAudioOutputPause (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1212 {
1213  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1215 }
1216 
1217 
1218 bool CNTV2Card::StartAudioInput (const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI)
1219 {
1220  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1221  return false; // Bad AudioSystem
1222  const ULWord audioCtrlRegNum(gAudioSystemToAudioControlRegNum[inAudioSystem]);
1223  if (inWaitForVBI)
1224  {
1225  if (!IsSupported(kDeviceAudioCanWaitForVBI))
1226  return false; // Caller requested wait-til-VBI, but firmware doesn't support it
1227  // Set or clear the start-at-VBI bit...
1228  if (!WriteRegister(audioCtrlRegNum, inWaitForVBI ? 1UL : 0UL, kRegMaskInputStartAtVBI, kRegShiftInputStartAtVBI))
1229  return false;
1230  }
1231  if (!WriteRegister (audioCtrlRegNum, 0, kRegMaskResetAudioInput, kRegShiftResetAudioInput))
1232  return false;
1233 #if 1
1234  // Now that this audio system is writing into SDRAM, see if its buffer is colliding with other device SDRAM activity...
1235  ULWordSequence badRgns;
1236  SDRAMAuditor auditor;
1237  auditor.AssessDevice(*this, /*ignoreStoppedAudioSystemBuffers*/true); // Only care about running audio systems
1238  auditor.GetBadRegions(badRgns); // Receive the interfering memory regions
1239  for (size_t ndx(0); ndx < badRgns.size(); ndx++)
1240  { const ULWord rgnInfo(badRgns.at(ndx));
1241  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
1242  NTV2StringSet tags;
1243  auditor.GetTagsForFrameIndex (startBlk, tags);
1244  const string infoStr (aja::join(tags, ", "));
1245  ostringstream acLabel; acLabel << "Aud" << DEC(inAudioSystem+1); // Search for label e.g. "Aud2"
1246  if (infoStr.find(acLabel.str()) != string::npos)
1247  { ostringstream warning;
1248  if (numBlks > 1)
1249  warning << "8MB Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3);
1250  else
1251  warning << "8MB Frm " << DEC0N(startBlk,3);
1252  AUDWARN("Aud" << DEC(inAudioSystem+1) << " memory overlap/interference: " << warning.str() << ": " << infoStr);
1253  }
1254  } // for each "bad" region
1255 #endif
1256  return true;
1257 } // StartAudioInput
1258 
1259 
1260 bool CNTV2Card::StopAudioInput (const NTV2AudioSystem inAudioSystem)
1261 {
1262  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1264 }
1265 
1266 
1267 bool CNTV2Card::IsAudioInputRunning (const NTV2AudioSystem inAudioSystem, bool & outIsRunning)
1268 {
1269  bool isStopped (true);
1270  bool result (inAudioSystem < NTV2_NUM_AUDIOSYSTEMS &&
1273  if (result)
1274  outIsRunning = !isStopped;
1275  return result;
1276 }
1277 
1278 
1279 bool CNTV2Card::SetAudioCaptureEnable (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1280 {
1281  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1282  && WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMaskCaptureEnable, kRegShiftCaptureEnable);
1283 }
1284 
1285 
1286 bool CNTV2Card::GetAudioCaptureEnable (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1287 {
1288  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1290 }
1291 
1292 
1293 bool CNTV2Card::SetAudioPlayCaptureModeEnable (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1294 {
1295  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1296  && WriteRegister (kRegGlobalControl2, inEnable ? 1 : 0, gAudioPlayCaptureModeMasks[inAudioSystem], gAudioPlayCaptureModeShifts[inAudioSystem]);
1297 }
1298 
1299 
1300 bool CNTV2Card::GetAudioPlayCaptureModeEnable (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1301 {
1302  outEnable = false;
1303  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1305 }
1306 
1307 
1308 bool CNTV2Card::SetAudioInputDelay (const NTV2AudioSystem inAudioSystem, const ULWord inDelay)
1309 {
1311  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1312  && WriteRegister (gAudioDelayRegisterNumbers [inAudioSystem], inDelay, kRegMaskAudioInDelay, kRegShiftAudioInDelay);
1313 }
1314 
1315 
1316 bool CNTV2Card::GetAudioInputDelay (const NTV2AudioSystem inAudioSystem, ULWord & outDelay)
1317 {
1319  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1320  && ReadRegister (gAudioDelayRegisterNumbers[inAudioSystem], outDelay, kRegMaskAudioInDelay, kRegShiftAudioInDelay);
1321 }
1322 
1323 
1324 bool CNTV2Card::SetAudioOutputDelay (const NTV2AudioSystem inAudioSystem, const ULWord inDelay)
1325 {
1327  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1328  && WriteRegister (gAudioDelayRegisterNumbers[inAudioSystem], inDelay, kRegMaskAudioOutDelay, kRegShiftAudioOutDelay);
1329 }
1330 
1331 
1332 bool CNTV2Card::GetAudioOutputDelay (const NTV2AudioSystem inAudioSystem, ULWord & outDelay)
1333 {
1335  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1336  && ReadRegister (gAudioDelayRegisterNumbers[inAudioSystem], outDelay, kRegMaskAudioOutDelay, kRegShiftAudioOutDelay);
1337 }
1338 
1339 
1340 bool CNTV2Card::SetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const bool inNonPCM)
1341 {
1342  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1343  && WriteRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], inNonPCM ? 1 : 0, BIT(17), 17);
1344 }
1345 
1346 
1347 bool CNTV2Card::GetAudioPCMControl (const NTV2AudioSystem inAudioSystem, bool & outIsNonPCM)
1348 {
1349  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1350  && CNTV2DriverInterface::ReadRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], outIsNonPCM, BIT(17), 17);
1351 }
1352 
1353 
1354 bool CNTV2Card::SetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelSelect, bool inNonPCM)
1355 {
1357  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1358  && NTV2_IS_VALID_AUDIO_CHANNEL_PAIR(inChannelSelect)
1359  && WriteRegister(gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlReg,
1360  inNonPCM ? 1 : 0,
1361  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlMask,
1362  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlShift);
1363 }
1364 
1365 
1366 bool CNTV2Card::SetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPairs & inNonPCMChannelPairs)
1367 {
1368  if (!::NTV2DeviceCanDoPCMControl(_boardID) || inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1369  return false;
1370 
1371  bool result (true);
1372  for (NTV2AudioChannelPair chanPair (NTV2_AudioChannel1_2); NTV2_IS_VALID_AUDIO_CHANNEL_PAIR (chanPair); chanPair = NTV2AudioChannelPair (chanPair + 1))
1373  {
1374  if (NTV2_IS_EXTENDED_AUDIO_CHANNEL_PAIR (chanPair))
1375  break; // Extended audio channels not yet supported
1376 
1377  const bool isNonPCM (inNonPCMChannelPairs.find (chanPair) != inNonPCMChannelPairs.end ());
1378  result = WriteRegister (gAudioEngineChannelPairToFieldInformation[inAudioSystem][chanPair].pcmControlReg, isNonPCM ? 1 : 0,
1379  gAudioEngineChannelPairToFieldInformation[inAudioSystem][chanPair].pcmControlMask,
1380  gAudioEngineChannelPairToFieldInformation[inAudioSystem][chanPair].pcmControlShift);
1381  if (!result)
1382  break;
1383  }
1384  return result;
1385 }
1386 
1387 
1388 bool CNTV2Card::GetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelSelect, bool & outIsNonPCM)
1389 {
1391  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1392  && NTV2_IS_VALID_AUDIO_CHANNEL_PAIR(inChannelSelect)
1393  && CNTV2DriverInterface::ReadRegister (gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlReg,
1394  outIsNonPCM,
1395  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlMask,
1396  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlShift);
1397 }
1398 
1399 
1400 bool CNTV2Card::GetAudioPCMControl (const NTV2AudioSystem inAudioSystem, NTV2AudioChannelPairs & outNonPCMChannelPairs)
1401 {
1402  ULWord numAudioChannels (0);
1403  bool isNonPCM (false);
1404 
1405  outNonPCMChannelPairs.clear ();
1406  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1407  return false; // no such audio system on this device
1408  if (!GetNumberAudioChannels (numAudioChannels, inAudioSystem))
1409  return false; // fail
1410 
1411  const NTV2AudioChannelPair maxPair (NTV2AudioChannelPair(numAudioChannels/2));
1412  if (!GetAudioPCMControl (inAudioSystem, isNonPCM))
1413  return false; // fail
1414 
1415  if (isNonPCM) // this global mode overrides per-channel PCM control
1416  {
1417  for (UWord chPair (0); chPair <= maxPair; chPair++)
1418  outNonPCMChannelPairs.insert (NTV2AudioChannelPair (chPair));
1419  return true; // done
1420  }
1421 
1422  if (::NTV2DeviceCanDoPCMControl(_boardID))
1423  {
1424  ULWord regVal (0);
1425  if (!ReadRegister (inAudioSystem < NTV2_AUDIOSYSTEM_5 ? kRegPCMControl4321 : kRegPCMControl8765, regVal))
1426  return false;
1428  if (regVal & BIT(inAudioSystem * 8 + chanPair))
1429  outNonPCMChannelPairs.insert (chanPair);
1430  }
1431  return true;
1432 }
1433 
1434 
1435 // NTV2_AUDIOSYSTEM_1 NTV2_AUDIOSYSTEM_2 NTV2_AUDIOSYSTEM_3 NTV2_AUDIOSYSTEM_4
1437 // NTV2_AUDIOSYSTEM_5 NTV2_AUDIOSYSTEM_6 NTV2_AUDIOSYSTEM_7 NTV2_AUDIOSYSTEM_8
1439 
1440 // NTV2_AUDIOSYSTEM_1 NTV2_AUDIOSYSTEM_2 NTV2_AUDIOSYSTEM_3 NTV2_AUDIOSYSTEM_4
1441 static const unsigned sAudioDetectGroups [] = { 0, 1, 0, 1,
1442 // NTV2_AUDIOSYSTEM_5 NTV2_AUDIOSYSTEM_6 NTV2_AUDIOSYSTEM_7 NTV2_AUDIOSYSTEM_8
1443  0, 1, 2, 3 };
1444 
1445 bool CNTV2Card::IsAudioChannelPairPresent (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelPair, bool & outIsPresent)
1446 {
1447  NTV2AudioChannelPairs activeChannelPairs;
1448  outIsPresent = false;
1449  if (!GetDetectedAudioChannelPairs (inAudioSystem, activeChannelPairs))
1450  return false;
1451  if (activeChannelPairs.find (inChannelPair) != activeChannelPairs.end ())
1452  outIsPresent = true;
1453  return true;
1454 }
1455 
1456 
1457 bool CNTV2Card::GetDetectedAudioChannelPairs (const NTV2AudioSystem inAudioSystem, NTV2AudioChannelPairs & outDetectedChannelPairs)
1458 {
1459  outDetectedChannelPairs.clear ();
1460  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1461  return false;
1462 
1463  ULWord detectBits (0);
1464  if (!ReadRegister (sAudioDetectRegs[inAudioSystem], detectBits))
1465  return false;
1466 
1467  const unsigned bitGroup (sAudioDetectGroups[inAudioSystem]);
1469  if (detectBits & BIT(bitGroup * 8 + chanPair))
1470  outDetectedChannelPairs.insert (chanPair);
1471  return true;
1472 }
1473 
1474 
1476 {
1477  uint32_t valLo8(0), valHi8(0);
1478  outDetectedChannelPairs.clear ();
1479  if (!::NTV2DeviceCanDoAESAudioIn(_boardID))
1480  return false;
1481  if (!ReadRegister(kRegInputStatus, valLo8)) // Reg 22, bits 24..27
1482  return false;
1483  if (!ReadRegister(kRegAud1SourceSelect, valHi8)) // Reg 25, bits 28..31
1484  return false;
1485 
1486  const uint32_t detectBits (((valLo8 >> 24) & 0x0000000F) | ((valHi8 >> 24) & 0x000000F0));
1487  for (NTV2AudioChannelPair chPair (NTV2_AudioChannel1_2); chPair < NTV2_AudioChannel15_16; chPair = NTV2AudioChannelPair(chPair+1))
1488  if (!(detectBits & BIT(chPair))) // bit set means "not connected"
1489  outDetectedChannelPairs.insert(chPair);
1490  return true;
1491 }
1492 
1493 
1494 bool CNTV2Card::SetSuspendHostAudio (const bool inIsSuspended)
1495 {
1496  return WriteRegister (kVRegSuspendSystemAudio, ULWord(inIsSuspended));
1497 }
1498 
1499 
1500 bool CNTV2Card::GetSuspendHostAudio (bool & outIsSuspended)
1501 {
1503 }
1504 
1505 
1506 // GetAESOutputSource / SetAESOutputSource:
1507 //
1508 // Register 190 (kRegAudioOutputSourceMap) does the mapping by audio group (audio channel quads).
1509 // Each of the least-significant 4 nibbles correspond to AES output audio channel quads:
1510 //
1511 // RegMask NTV2Audio4ChannelSelect
1512 // ========== =======================
1513 // 0x0000000F NTV2_AudioChannel1_4
1514 // 0x000000F0 NTV2_AudioChannel5_8
1515 // 0x00000F00 NTV2_AudioChannel9_12
1516 // 0x0000F000 NTV2_AudioChannel13_16
1517 //
1518 // The value of the nibble determines the source:
1519 // Value NTV2AudioSystem NTV2Audio4ChannelSelect
1520 // ===== =============== =======================
1521 // 0x0: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel1_4
1522 // 0x1: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel5_8
1523 // 0x2: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel9_12
1524 // 0x3: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel13_16
1525 // 0x4: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel1_4
1526 // 0x5: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel5_8
1527 // 0x6: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel9_12
1528 // 0x7: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel13_16
1529 // 0x8: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel1_4
1530 // 0x9: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel5_8
1531 // 0xA: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel9_12
1532 // 0xB: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel13_16
1533 // 0xC: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel1_4
1534 // 0xD: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel5_8
1535 // 0xE: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel9_12
1536 // 0xF: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel13_16
1537 
1538 static const unsigned gAESChannelMappingShifts [4] = {0, 4, 8, 12};
1539 
1540 
1541 bool CNTV2Card::GetAESOutputSource (const NTV2Audio4ChannelSelect inAESAudioChannels, NTV2AudioSystem & outSrcAudioSystem, NTV2Audio4ChannelSelect & outSrcAudioChannels)
1542 {
1543  const UWord numAESAudioOutputChannels (::NTV2DeviceGetNumAESAudioOutputChannels(_boardID));
1544  const UWord maxNumAudioChannelsForQuad ((inAESAudioChannels + 1) * 4);
1545 
1546  outSrcAudioSystem = NTV2_AUDIOSYSTEM_INVALID;
1547  outSrcAudioChannels = NTV2_AUDIO_CHANNEL_QUAD_INVALID;
1548 
1549  if (numAESAudioOutputChannels < 4)
1550  return false; // Fail, device doesn't support AES output
1551  if (maxNumAudioChannelsForQuad > numAESAudioOutputChannels)
1552  return false; // Fail, illegal inAESAudioChannels value
1553 
1554  ULWord regValue (0);
1555  if (!ReadRegister (kRegAudioOutputSourceMap, regValue))
1556  return false; // Failed in ReadRegister
1557 
1558  regValue = (regValue >> gAESChannelMappingShifts[inAESAudioChannels]) & 0x0000000F;
1559  outSrcAudioSystem = NTV2AudioSystem(regValue / 4);
1560  NTV2_ASSERT (NTV2_IS_VALID_AUDIO_SYSTEM (outSrcAudioSystem));
1561 
1562  outSrcAudioChannels = NTV2Audio4ChannelSelect(regValue % 4);
1563  NTV2_ASSERT (NTV2_IS_NORMAL_AUDIO_CHANNEL_QUAD (outSrcAudioChannels));
1564  return true;
1565 }
1566 
1567 
1568 bool CNTV2Card::SetAESOutputSource (const NTV2Audio4ChannelSelect inAESAudioChannels, const NTV2AudioSystem inSrcAudioSystem, const NTV2Audio4ChannelSelect inSrcAudioChannels)
1569 {
1570  const ULWord nibble (ULWord(inSrcAudioSystem) * 4 + ULWord(inSrcAudioChannels));
1571  return WriteRegister (kRegAudioOutputSourceMap, // reg
1572  nibble, // value
1573  ULWord(0xF << gAESChannelMappingShifts[inAESAudioChannels]), // mask
1574  gAESChannelMappingShifts[inAESAudioChannels]); // shift
1575 }
1576 
1577 
1578 static NTV2AudioChannelPairs BitMasksToNTV2AudioChannelPairs (const ULWord inBitMask, const ULWord inExtendedBitMask)
1579 {
1580  NTV2AudioChannelPairs result;
1581  if (inBitMask)
1582  for (NTV2AudioChannelPair channelPair (NTV2_AudioChannel1_2); channelPair < NTV2_AudioChannel17_18; channelPair = NTV2AudioChannelPair (channelPair + 1))
1583  if (inBitMask & BIT (channelPair))
1584  result.insert (channelPair);
1585  if (inExtendedBitMask)
1586  for (NTV2AudioChannelPair channelPair (NTV2_AudioChannel17_18); channelPair < NTV2_MAX_NUM_AudioChannelPair; channelPair = NTV2AudioChannelPair (channelPair + 1))
1587  if (inExtendedBitMask & BIT (channelPair))
1588  result.insert (channelPair);
1589  return result;
1590 }
1591 
1592 
1593 static inline NTV2RegisterNumber GetNonPCMDetectRegisterNumber (const NTV2Channel inSDIInputChannel, const bool inIsExtended = false)
1594 {
1595  return NTV2RegisterNumber (kRegFirstNonPCMAudioDetectRegister + inSDIInputChannel * 2 + (inIsExtended ? 1 : 0));
1596 }
1597 
1598 
1599 bool CNTV2Card::InputAudioChannelPairHasPCM (const NTV2Channel inSDIInputChannel, const NTV2AudioChannelPair inAudioChannelPair, bool & outHasPCM)
1600 {
1601  if (!NTV2_IS_VALID_AUDIO_CHANNEL_PAIR (inAudioChannelPair))
1602  return false;
1603  NTV2AudioChannelPairs withPCMs;
1604  if (!GetInputAudioChannelPairsWithPCM (inSDIInputChannel, withPCMs))
1605  return false;
1606 
1607  outHasPCM = withPCMs.find (inAudioChannelPair) != withPCMs.end (); // Test set membership
1608  return true;
1609 }
1610 
1611 
1613 {
1614  outPCMPairs.clear ();
1615  if (!::NTV2DeviceCanDoPCMDetection (_boardID))
1616  return false;
1617  if (!NTV2_IS_VALID_CHANNEL (inSDIInputChannel))
1618  return false;
1619  if (inSDIInputChannel >= ::NTV2DeviceGetNumVideoInputs (_boardID))
1620  return false;
1621 
1622  // Read channel pair bitmask registers...
1623  const UWord numChannels (::NTV2DeviceGetMaxAudioChannels(_boardID));
1624  const bool isExtended (numChannels > 16);
1625  const NTV2RegisterNumber regNum (::GetNonPCMDetectRegisterNumber (inSDIInputChannel));
1626  ULWord mask (0);
1627  ULWord extMask (0);
1628  if (!ReadRegister (regNum, mask))
1629  return false;
1630  if (isExtended)
1631  if (!ReadRegister (regNum + 1, extMask))
1632  return false;
1633 
1634  // Convert bitmasks to set of with-PCM pairs...
1635  outPCMPairs = ::BitMasksToNTV2AudioChannelPairs (~mask, isExtended ? ~extMask : 0);
1636  return true;
1637 }
1638 
1639 
1641 {
1642  outNonPCMPairs.clear ();
1643  if (!::NTV2DeviceCanDoPCMDetection (_boardID))
1644  return false;
1645  if (!NTV2_IS_VALID_CHANNEL (inSDIInputChannel))
1646  return false;
1647  if (inSDIInputChannel >= ::NTV2DeviceGetNumVideoInputs (_boardID))
1648  return false;
1649 
1650  // Read channel pair bitmask registers...
1651  const UWord numChannels (::NTV2DeviceGetMaxAudioChannels(_boardID));
1652  const bool isExtended (numChannels > 16);
1653  const NTV2RegisterNumber regNum (::GetNonPCMDetectRegisterNumber (inSDIInputChannel));
1654  ULWord mask (0);
1655  ULWord extMask (0);
1656  if (!ReadRegister (regNum, mask))
1657  return false;
1658  if (isExtended)
1659  if (!ReadRegister (regNum + 1, extMask))
1660  return false;
1661 
1662  // Convert bitmasks to set of non-PCM pairs...
1663  outNonPCMPairs = ::BitMasksToNTV2AudioChannelPairs (mask, isExtended ? extMask : 0);
1664  return true;
1665 }
1666 
1667 
1670 
1671 bool CNTV2Card::GetAudioOutputEmbedderState (const NTV2Channel inSDIOutputSpigot, bool & outIsEnabled)
1672 {
1673  outIsEnabled = true; // presume normal
1674  if (!NTV2_IS_VALID_CHANNEL (inSDIOutputSpigot))
1675  return false;
1676  if (UWord(inSDIOutputSpigot) >= ::NTV2DeviceGetNumVideoOutputs(_boardID))
1677  return false;
1678 
1679  ULWord value (0);
1680  if (!ReadRegister (kAudCtrlRegsForSDIOutputs[inSDIOutputSpigot], value,
1683  return false;
1684  outIsEnabled = value ? false : true; // Bit sense is 1=disabled, 0=enabled/normal
1685  return true;
1686 }
1687 
1688 bool CNTV2Card::SetAudioOutputEmbedderState (const NTV2Channel inSDIOutputSpigot, const bool & inEnable)
1689 {
1690  if (!NTV2_IS_VALID_CHANNEL (inSDIOutputSpigot))
1691  return false;
1692  if (UWord(inSDIOutputSpigot) >= ::NTV2DeviceGetNumVideoOutputs(_boardID))
1693  return false;
1694 
1695  return WriteRegister (kAudCtrlRegsForSDIOutputs[inSDIOutputSpigot], inEnable ? 0 : 1,
1698 }
1699 
1700 
1701 bool CNTV2Card::GetAudioOutputEraseMode (const NTV2AudioSystem inAudioSystem, bool & outEraseModeEnabled)
1702 {
1703  outEraseModeEnabled = false;
1704  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1705  return false;
1706  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1707  return false;
1708  ULWord regValue(0);
1709  if (!ReadRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], regValue))
1710  return false;
1711  outEraseModeEnabled = (regValue & kRegMaskAudioAutoErase) ? true : false;
1712  return true;
1713 }
1714 
1715 
1716 bool CNTV2Card::SetAudioOutputEraseMode (const NTV2AudioSystem inAudioSystem, const bool & inEraseModeEnabled)
1717 {
1718  if (!NTV2_IS_VALID_AUDIO_SYSTEM (inAudioSystem))
1719  return false;
1720  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1721  return false;
1722  return WriteRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], inEraseModeEnabled ? 1 : 0, kRegMaskAudioAutoErase, kRegShiftAudioAutoErase);
1723 }
1724 
1725 bool CNTV2Card::SetAnalogAudioTransmitEnable (const NTV2Audio4ChannelSelect inChannelQuad, const bool inXmitEnable)
1726 {
1727  // Reg 108 (kRegGlobalControl3) has two bits for controlling XLR direction: BIT(0) for XLRs 1-4, BIT(1) for XLRs 5-8
1729  return false; // unsupported
1730  if (inChannelQuad > NTV2_AudioChannel5_8)
1731  return false; // NTV2_AudioChannel1_4 & NTV2_AudioChannel5_8 only
1732  return WriteRegister (kRegGlobalControl3, inXmitEnable ? 0 : 1, // 0 == xmit 1 == recv
1734  ULWord(inChannelQuad));
1735 }
1736 
1737 bool CNTV2Card::GetAnalogAudioTransmitEnable (const NTV2Audio4ChannelSelect inChannelQuad, bool & outXmitEnabled)
1738 {
1739  outXmitEnabled = false;
1740  // Reg 108 (kRegGlobalControl3) has two bits for controlling XLR direction: BIT(0) for XLRs 1-4, BIT(1) for XLRs 5-8
1742  return false; // unsupported
1743  if (inChannelQuad > NTV2_AudioChannel5_8)
1744  return false; // NTV2_AudioChannel1_4 & NTV2_AudioChannel5_8 only
1745  if (!CNTV2DriverInterface::ReadRegister (kRegGlobalControl3, outXmitEnabled, // false == xmit true == recv
1747  ULWord(inChannelQuad)))
1748  return false;
1749  outXmitEnabled = !outXmitEnabled; // Flip the sense, we want xmit == true, recv == false
1750  return true;
1751 }
1752 
1753 bool CNTV2Card::SetMultiLinkAudioMode (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1754 {
1755  if (!NTV2DeviceCanDoMultiLinkAudio(_boardID))
1756  return false;
1757 
1758  return WriteRegister(gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMaskMultiLinkAudio, kRegShiftMultiLinkAudio);
1759 }
1760 
1761 bool CNTV2Card::GetMultiLinkAudioMode (const NTV2AudioSystem inAudioSystem, bool & outEnabled)
1762 {
1763  outEnabled = false;
1764  if (!NTV2DeviceCanDoMultiLinkAudio(_boardID))
1765  return false;
1767 }
1768 
1769 #if !defined(NTV2_DEPRECATE_16_1)
1771  {
1772  if (inConfig > NTV2_AnalogAudioIO_8In)
1773  return false;
1774  return SetAnalogAudioTransmitEnable (NTV2_AudioChannel1_4, inConfig == NTV2_AnalogAudioIO_8Out || inConfig == NTV2_AnalogAudioIO_4Out_4In)
1775  && SetAnalogAudioTransmitEnable (NTV2_AudioChannel5_8, inConfig == NTV2_AnalogAudioIO_8Out || inConfig == NTV2_AnalogAudioIO_4In_4Out);
1776  }
1777 
1779  {
1780  bool xlr14Xmit(false), xlr58Xmit(false);
1781  if (!GetAnalogAudioTransmitEnable (NTV2_AudioChannel1_4, xlr14Xmit))
1782  return false;
1783  if (!GetAnalogAudioTransmitEnable (NTV2_AudioChannel5_8, xlr58Xmit))
1784  return false;
1785  if (xlr14Xmit && xlr58Xmit)
1786  outConfig = NTV2_AnalogAudioIO_8Out;
1787  else if (xlr14Xmit && !xlr58Xmit)
1788  outConfig = NTV2_AnalogAudioIO_4Out_4In;
1789  else if (!xlr14Xmit && xlr58Xmit)
1790  outConfig = NTV2_AnalogAudioIO_4In_4Out;
1791  else
1792  outConfig = NTV2_AnalogAudioIO_8In;
1793  return true;
1794  }
1795 #endif // !defined(NTV2_DEPRECATE_16_1)
1796 
1797 bool CNTV2Card::GetAudioOutputAESSyncModeBit (const NTV2AudioSystem inAudioSystem, bool & outAESSyncModeBitSet)
1798 {
1799  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1800  return false;
1801  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1802  return false;
1803  ULWord regValue(0);
1804  if (!ReadRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], regValue, BIT(18), 18))
1805  return false;
1806  outAESSyncModeBitSet = regValue ? true : false;
1807  return true;
1808 }
1809 
1810 bool CNTV2Card::SetAudioOutputAESSyncModeBit (const NTV2AudioSystem inAudioSystem, const bool & inAESSyncModeBitSet)
1811 {
1812  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1813  return false;
1814  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1815  return false;
1816  return WriteRegister(gAudioSystemToSrcSelectRegNum[inAudioSystem], inAESSyncModeBitSet?1:0, BIT(18), 18);
1817 }
1818 
1819 bool CNTV2Card::GetRawAudioTimer (ULWord & outValue, const NTV2AudioSystem inAudioSystem)
1820 {
1821  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1822  return false;
1823  return ReadRegister(kRegAud1Counter, outValue);
1824 }
1825 
1827 {
1828  if (!NTV2DeviceCanDoBreakoutBoard(_boardID))
1829  return false;
1830  return WriteRegister(kRegBOBAudioControl, inEnable ? 1 : 0, kRegMaskBOBAnalogInputSelect, kRegShiftBOBAnalogInputSelect);
1831 }
1832 
1833 #ifdef MSWindows
1834  #pragma warning(default: 4800)
1835 #endif
kRegShiftAud4PlayCapMode
@ kRegShiftAud4PlayCapMode
Definition: ntv2publicinterface.h:2239
kRegMaskPCMControlA2P9_10
@ kRegMaskPCMControlA2P9_10
Definition: ntv2publicinterface.h:2028
kK2RegShiftAudioBufferSize
@ kK2RegShiftAudioBufferSize
Definition: ntv2publicinterface.h:2374
kRegShiftAud3RateHigh
@ kRegShiftAud3RateHigh
Definition: ntv2publicinterface.h:2275
kRegShiftPCMControlA7P15_16
@ kRegShiftPCMControlA7P15_16
Definition: ntv2publicinterface.h:3136
kRegMaskPCMControlA5P1_2
@ kRegMaskPCMControlA5P1_2
Definition: ntv2publicinterface.h:2051
kRegSDIOut4Control
@ kRegSDIOut4Control
Definition: ntv2publicinterface.h:261
kRegShiftEmbeddedAudioInput
@ kRegShiftEmbeddedAudioInput
Definition: ntv2publicinterface.h:2379
CNTV2Card::IsAudioOutputRunning
virtual bool IsAudioOutputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the playout side of the given NTV2AudioSystem is currently running.
Definition: ntv2audio.cpp:1176
kRegMaskPCMControlA5P13_14
@ kRegMaskPCMControlA5P13_14
Definition: ntv2publicinterface.h:2057
CNTV2Card::StopAudioInput
virtual bool StopAudioInput(const NTV2AudioSystem inAudioSystem)
Stops the capture side of the given NTV2AudioSystem, and resets the capture position (i....
Definition: ntv2audio.cpp:1260
kRegMaskPCMControlA3P11_12
@ kRegMaskPCMControlA3P11_12
Definition: ntv2publicinterface.h:2038
kRegShiftPCMControlA7P11_12
@ kRegShiftPCMControlA7P11_12
Definition: ntv2publicinterface.h:3134
NTV2AnalogAudioIO
NTV2AnalogAudioIO
Definition: ntv2enums.h:2173
kRegShiftPCMControlA8P9_10
@ kRegShiftPCMControlA8P9_10
Definition: ntv2publicinterface.h:3142
kRegShift20BitMode
@ kRegShift20BitMode
Definition: ntv2publicinterface.h:2349
kRegShiftCaptureEnable
@ kRegShiftCaptureEnable
Definition: ntv2publicinterface.h:2346
kRegMaskPCMControlA6P15_16
@ kRegMaskPCMControlA6P15_16
Definition: ntv2publicinterface.h:2067
kFS1RegMaskAudioLevel
@ kFS1RegMaskAudioLevel
Definition: ntv2publicinterface.h:1286
CNTV2Card::SetAudioOutputDelay
virtual bool SetAudioOutputDelay(const NTV2AudioSystem inAudioSystem, const ULWord inDelay)
Sets the audio output delay for the given Audio System on the device.
Definition: ntv2audio.cpp:1324
kRegMaskAudioMixerChannelSelect
@ kRegMaskAudioMixerChannelSelect
Definition: ntv2publicinterface.h:2113
CNTV2Card::GetInputAudioChannelPairsWithPCM
virtual bool GetInputAudioChannelPairsWithPCM(const NTV2Channel inSDIInputConnector, NTV2AudioChannelPairs &outChannelPairs)
For the given SDI input (specified as a channel number), returns the set of audio channel pairs that ...
Definition: ntv2audio.cpp:1612
kRegMaskPCMControlA6P11_12
@ kRegMaskPCMControlA6P11_12
Definition: ntv2publicinterface.h:2065
kRegMaskHDMIOutAudioFormat
@ kRegMaskHDMIOutAudioFormat
Definition: ntv2publicinterface.h:1497
kRegShiftPCMControlA4P13_14
@ kRegShiftPCMControlA4P13_14
Definition: ntv2publicinterface.h:3108
kRegAud5Delay
@ kRegAud5Delay
Definition: ntv2publicinterface.h:639
kRegMaskPCMControlA1P7_8
@ kRegMaskPCMControlA1P7_8
Definition: ntv2publicinterface.h:2018
NTV2DeviceGetNumHDMIVideoInputs
UWord NTV2DeviceGetNumHDMIVideoInputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:10766
NTV2_AUDIO_192K
@ NTV2_AUDIO_192K
Definition: ntv2enums.h:1877
kRegAud4Delay
@ kRegAud4Delay
Definition: ntv2publicinterface.h:403
kAudCtrlRegsForSDIOutputs
static const ULWord kAudCtrlRegsForSDIOutputs[]
Definition: ntv2audio.cpp:1668
kRegShiftOutputStartAtVBI
@ kRegShiftOutputStartAtVBI
Definition: ntv2publicinterface.h:2358
kRegAud1OutputLastAddr
@ kRegAud1OutputLastAddr
Definition: ntv2publicinterface.h:100
kRegShiftHDMIOutAudioCh
@ kRegShiftHDMIOutAudioCh
Definition: ntv2publicinterface.h:2582
kRegMaskLoopBack
@ kRegMaskLoopBack
Definition: ntv2publicinterface.h:1264
kRegAud7Delay
@ kRegAud7Delay
Definition: ntv2publicinterface.h:641
kRegMaskAud6PlayCapMode
@ kRegMaskAud6PlayCapMode
Definition: ntv2publicinterface.h:1157
PCM_CONTROL_INFO
Definition: ntv2audio.cpp:57
kRegMaskPCMControlA2P5_6
@ kRegMaskPCMControlA2P5_6
Definition: ntv2publicinterface.h:2026
gChannelToAudioOutLastAddrRegNum
static const ULWord gChannelToAudioOutLastAddrRegNum[]
Definition: ntv2audio.cpp:37
kRegMaskAudioMixerMainInputSelect
@ kRegMaskAudioMixerMainInputSelect
Definition: ntv2publicinterface.h:2110
kRegShiftAud2PlayCapMode
@ kRegShiftAud2PlayCapMode
Definition: ntv2publicinterface.h:2237
kRegAudioMixerAux1GainCh2
@ kRegAudioMixerAux1GainCh2
Definition: ntv2publicinterface.h:771
kRegMaskPCMControlA5P5_6
@ kRegMaskPCMControlA5P5_6
Definition: ntv2publicinterface.h:2053
CNTV2Card::SetAudioOutputMonitorSource
virtual bool SetAudioOutputMonitorSource(const NTV2AudioChannelPair inChannelPair, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the audio monitor output source to a specified audio system and channel pair....
Definition: ntv2audio.cpp:1106
kRegShiftAudioMixerOutputChannelsMute
@ kRegShiftAudioMixerOutputChannelsMute
Definition: ntv2publicinterface.h:3174
CNTV2Card::StartAudioInput
virtual bool StartAudioInput(const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI=false)
Starts the capture side of the given NTV2AudioSystem, writing incoming audio samples into the Audio S...
Definition: ntv2audio.cpp:1218
NTV2_AudioChannel13_16
@ NTV2_AudioChannel13_16
This selects audio channels 13 thru 16.
Definition: ntv2enums.h:3196
NTV2_IS_VALID_AUDIO_CHANNEL_OCTET
#define NTV2_IS_VALID_AUDIO_CHANNEL_OCTET(__p__)
Definition: ntv2enums.h:3264
kRegMaskAudioInDelay
@ kRegMaskAudioInDelay
Definition: ntv2publicinterface.h:1406
kRegShiftPCMControlA6P9_10
@ kRegShiftPCMControlA6P9_10
Definition: ntv2publicinterface.h:3124
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4
Definition: ntv2enums.h:1913
NTV2_HDMIAudio2Channels
@ NTV2_HDMIAudio2Channels
2 audio channels
Definition: ntv2enums.h:3583
kRegMaskCaptureEnable
@ kRegMaskCaptureEnable
Definition: ntv2publicinterface.h:1260
kRegAudioMixerAux1InputLevels
@ kRegAudioMixerAux1InputLevels
Definition: ntv2publicinterface.h:776
CNTV2Card::GetAudioSystemInputSource
virtual bool GetAudioSystemInputSource(const NTV2AudioSystem inAudioSystem, NTV2AudioSource &outAudioSource, NTV2EmbeddedAudioInput &outEmbeddedSource)
Answers with the device's current NTV2AudioSource (and also possibly its NTV2EmbeddedAudioInput) for ...
Definition: ntv2audio.cpp:523
CNTV2Card::SetEmbeddedAudioClock
virtual bool SetEmbeddedAudioClock(const NTV2EmbeddedAudioClock inValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the NTV2EmbeddedAudioClock setting for the given NTV2AudioSystem.
Definition: ntv2audio.cpp:420
ntv2devicefeatures.h
Declares device capability functions.
CNTV2Card::SetAudioMixerInputChannelsMute
virtual bool SetAudioMixerInputChannelsMute(const NTV2AudioMixerInput inMixerInput, const NTV2AudioChannelsMuted16 inMutes)
Mutes (or enables) the given output audio channel of the Audio Mixer.
Definition: ntv2audio.cpp:863
NTV2StringSet
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1137
kRegShiftPCMControlA4P1_2
@ kRegShiftPCMControlA4P1_2
Definition: ntv2publicinterface.h:3102
kRegAud2Delay
@ kRegAud2Delay
Definition: ntv2publicinterface.h:163
kRegMaskRotaryEncoderGain
@ kRegMaskRotaryEncoderGain
Definition: ntv2publicinterface.h:2161
kRegShiftPCMControlA7P5_6
@ kRegShiftPCMControlA7P5_6
Definition: ntv2publicinterface.h:3131
gAudioPlayCaptureModeShifts
static const ULWord gAudioPlayCaptureModeShifts[]
Definition: ntv2audio.cpp:43
CNTV2Card::SetAudioMixerInputChannelSelect
virtual bool SetAudioMixerInputChannelSelect(const NTV2AudioMixerInput inMixerInput, const NTV2AudioChannelPair inChannelPair)
Specifies the Audio Channel Pair that will drive the given input of the Audio Mixer.
Definition: ntv2audio.cpp:704
kRegMaskAud8PlayCapMode
@ kRegMaskAud8PlayCapMode
Definition: ntv2publicinterface.h:1159
NTV2AudioFormat
NTV2AudioFormat
Definition: ntv2enums.h:1892
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific Frame Store. They're also commonly used to i...
Definition: ntv2enums.h:1305
kRegShiftAudioMixerChannelSelect
@ kRegShiftAudioMixerChannelSelect
Definition: ntv2publicinterface.h:3173
kRegAudioMixerAux1GainCh1
@ kRegAudioMixerAux1GainCh1
Definition: ntv2publicinterface.h:767
kRegMaskPCMControlA1P5_6
@ kRegMaskPCMControlA1P5_6
Definition: ntv2publicinterface.h:2017
NTV2AudioMixerInput
NTV2AudioMixerInput
Identifies the Audio Mixer's audio inputs.
Definition: ntv2enums.h:3174
PCM_CONTROL_INFO::pcmControlShift
ULWord pcmControlShift
Definition: ntv2audio.cpp:60
ntv2audiodefines.h
Declares common audio macros and structs used in the SDK.
kRegShiftAud6PlayCapMode
@ kRegShiftAud6PlayCapMode
Definition: ntv2publicinterface.h:2241
kRegShiftPCMControlA5P9_10
@ kRegShiftPCMControlA5P9_10
Definition: ntv2publicinterface.h:3115
aja::join
std::string join(const std::vector< std::string > &parts, const std::string &delim)
Definition: common.cpp:468
sAudioMixerInputSelectMasks
static const ULWord sAudioMixerInputSelectMasks[]
Definition: ntv2audio.cpp:660
kRegAud6InputLastAddr
@ kRegAud6InputLastAddr
Definition: ntv2publicinterface.h:580
kRegShiftAudioMixerAux2InputEnable
@ kRegShiftAudioMixerAux2InputEnable
Definition: ntv2publicinterface.h:3193
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:601
kRegMaskPCMControlA4P3_4
@ kRegMaskPCMControlA4P3_4
Definition: ntv2publicinterface.h:2043
CNTV2Card::StopAudioOutput
virtual bool StopAudioOutput(const NTV2AudioSystem inAudioSystem)
Stops the playout side of the given NTV2AudioSystem, parking the "Read Head" at the start of the play...
Definition: ntv2audio.cpp:1170
kRegAud8OutputLastAddr
@ kRegAud8OutputLastAddr
Definition: ntv2publicinterface.h:589
NTV2_MAX_NUM_AudioChannelPair
@ NTV2_MAX_NUM_AudioChannelPair
Definition: ntv2enums.h:3117
CNTV2Card::GetAudioBufferSize
virtual bool GetAudioBufferSize(NTV2AudioBufferSize &outSize, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Retrieves the size of the input or output audio buffer being used for a given Audio System on the AJA...
Definition: ntv2audio.cpp:271
kRegMaskAud7RateHigh
@ kRegMaskAud7RateHigh
Definition: ntv2publicinterface.h:1197
kRegShiftPCMControlA2P1_2
@ kRegShiftPCMControlA2P1_2
Definition: ntv2publicinterface.h:3084
CNTV2Card::SetSuspendHostAudio
virtual bool SetSuspendHostAudio(const bool inSuspend)
Suspends or resumes host OS audio (e.g. CoreAudio on MacOS) for the AJA device.
Definition: ntv2audio.cpp:1494
kRegAudioMixerMutes
@ kRegAudioMixerMutes
Definition: ntv2publicinterface.h:770
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
Definition: ntv2enums.h:1910
kRegAud8Control
@ kRegAud8Control
Definition: ntv2publicinterface.h:587
sAudioMixerInputGainCh1Regs
static const ULWord sAudioMixerInputGainCh1Regs[]
Definition: ntv2audio.cpp:716
kRegMaskHDMIOutAudioSource
@ kRegMaskHDMIOutAudioSource
Definition: ntv2publicinterface.h:1859
NTV2_AUDIO_48K
@ NTV2_AUDIO_48K
Definition: ntv2enums.h:1875
kRegShiftBOBAnalogInputSelect
@ kRegShiftBOBAnalogInputSelect
Definition: ntv2publicinterface.h:3264
NTV2_AUDIO_CHANNEL_PAIR_INVALID
@ NTV2_AUDIO_CHANNEL_PAIR_INVALID
Definition: ntv2enums.h:3118
kRegShiftPCMControlA5P3_4
@ kRegShiftPCMControlA5P3_4
Definition: ntv2publicinterface.h:3112
kRegMaskPCMControlA4P13_14
@ kRegMaskPCMControlA4P13_14
Definition: ntv2publicinterface.h:2048
CNTV2Card::GetAudioMixerInputAudioSystem
virtual bool GetAudioMixerInputAudioSystem(const NTV2AudioMixerInput inMixerInput, NTV2AudioSystem &outAudioSystem)
Answers with the Audio System that's currently driving the given input of the Audio Mixer.
Definition: ntv2audio.cpp:664
kRegMaskPCMControlA2P13_14
@ kRegMaskPCMControlA2P13_14
Definition: ntv2publicinterface.h:2030
kRegAudioMixerOutRGain
@ kRegAudioMixerOutRGain
Definition: ntv2publicinterface.h:775
NTV2_AUDIO_WRAPADDRESS_BIG
#define NTV2_AUDIO_WRAPADDRESS_BIG
Definition: ntv2audiodefines.h:15
kRegMaskPCMControlA6P3_4
@ kRegMaskPCMControlA6P3_4
Definition: ntv2publicinterface.h:2061
kRegAudDetect2
@ kRegAudDetect2
Definition: ntv2publicinterface.h:376
kRegShiftPCMControlA8P13_14
@ kRegShiftPCMControlA8P13_14
Definition: ntv2publicinterface.h:3144
kRegMaskAud3RateHigh
@ kRegMaskAud3RateHigh
Definition: ntv2publicinterface.h:1193
NTV2_AUDIO_MIC
@ NTV2_AUDIO_MIC
Obtain audio samples from the device microphone input, if available.
Definition: ntv2enums.h:1952
kRegMaskPCMControlA8P13_14
@ kRegMaskPCMControlA8P13_14
Definition: ntv2publicinterface.h:2084
kRegShiftHDMIOut8ChGroupSelect
@ kRegShiftHDMIOut8ChGroupSelect
Definition: ntv2publicinterface.h:2568
NTV2DeviceCanDoMultiLinkAudio
bool NTV2DeviceCanDoMultiLinkAudio(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4155
CNTV2Card::GetAudioWrapAddress
virtual bool GetAudioWrapAddress(ULWord &outWrapAddress, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
For the given Audio System, answers with the wrap address, the threshold at which input/record or out...
Definition: ntv2audio.cpp:436
kRegMaskAnalogIOControl_58
@ kRegMaskAnalogIOControl_58
Definition: ntv2publicinterface.h:1182
kRegAud1Counter
@ kRegAud1Counter
Definition: ntv2publicinterface.h:102
kRegMaskAudioMixerAux2x2CHInput
@ kRegMaskAudioMixerAux2x2CHInput
Definition: ntv2publicinterface.h:2112
gAudioEngineChannelPairToFieldInformation
static const PCM_CONTROL_INFO gAudioEngineChannelPairToFieldInformation[][8]
Definition: ntv2audio.cpp:64
NTV2_AudioMixerChannel1
@ NTV2_AudioMixerChannel1
Definition: ntv2enums.h:3147
NTV2_AudioChannel17_18
@ NTV2_AudioChannel17_18
This selects audio channels 17 and 18.
Definition: ntv2enums.h:3061
CNTV2Card::GetEncodedAudioMode
virtual bool GetEncodedAudioMode(NTV2EncodedAudioMode &outValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Definition: ntv2audio.cpp:341
NTV2HDMIAudioChannels
NTV2HDMIAudioChannels
Indicates or specifies the HDMI audio channel count.
Definition: ntv2enums.h:3581
SDRAMAuditor::GetTagsForFrameIndex
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
Definition: ntv2card.cpp:685
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3811
kRegMaskAudioMixerAux1InputEnable
@ kRegMaskAudioMixerAux1InputEnable
Definition: ntv2publicinterface.h:2132
kRegShiftAud1PlayCapMode
@ kRegShiftAud1PlayCapMode
Definition: ntv2publicinterface.h:2236
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_8
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_8
Definition: ntv2enums.h:1917
CNTV2Card::EnableBOBAnalogAudioIn
virtual bool EnableBOBAnalogAudioIn(bool inEnable)
Enables breakout board analog audio XLR inputs.
Definition: ntv2audio.cpp:1826
kRegAudioMixerOutLGain
@ kRegAudioMixerOutLGain
Definition: ntv2publicinterface.h:774
kRegMaskAud7PlayCapMode
@ kRegMaskAud7PlayCapMode
Definition: ntv2publicinterface.h:1158
kRegShiftHDMIOutAudioFormat
@ kRegShiftHDMIOutAudioFormat
Definition: ntv2publicinterface.h:2576
kRegShiftPCMControlA2P15_16
@ kRegShiftPCMControlA2P15_16
Definition: ntv2publicinterface.h:3091
gAudioRateHighMask
static const ULWord gAudioRateHighMask[]
Definition: ntv2audio.cpp:51
kRegShiftPCMControlA3P9_10
@ kRegShiftPCMControlA3P9_10
Definition: ntv2publicinterface.h:3097
CNTV2Card::GetHDMIOutAudioRate
virtual bool GetHDMIOutAudioRate(NTV2AudioRate &outValue)
Answers with the HDMI output's current audio rate.
Definition: ntv2audio.cpp:1088
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5581
kRegMaskHDMIOutAudioRate
@ kRegMaskHDMIOutAudioRate
Definition: ntv2publicinterface.h:1535
kRegMaskBOBAnalogLevelControl
@ kRegMaskBOBAnalogLevelControl
Definition: ntv2publicinterface.h:2204
kRegAud3SourceSelect
@ kRegAud3SourceSelect
Definition: ntv2publicinterface.h:374
kRegMaskPCMControlA3P3_4
@ kRegMaskPCMControlA3P3_4
Definition: ntv2publicinterface.h:2034
kRegShiftPCMControlA2P5_6
@ kRegShiftPCMControlA2P5_6
Definition: ntv2publicinterface.h:3086
kRegAudioOutputSourceMap
@ kRegAudioOutputSourceMap
Definition: ntv2publicinterface.h:284
kRegMaskPCMControlA3P15_16
@ kRegMaskPCMControlA3P15_16
Definition: ntv2publicinterface.h:2040
CNTV2Card::GetAudioMixerOutputLevels
virtual bool GetAudioMixerOutputLevels(const NTV2AudioChannelPairs &inChannelPairs, std::vector< uint32_t > &outLevels)
Answers with the Audio Mixer's current audio output levels.
Definition: ntv2audio.cpp:762
kRegShiftPCMControlA3P15_16
@ kRegShiftPCMControlA3P15_16
Definition: ntv2publicinterface.h:3100
kRegShiftPCMControlA1P15_16
@ kRegShiftPCMControlA1P15_16
Definition: ntv2publicinterface.h:3082
kRegShiftAudio16Channel
@ kRegShiftAudio16Channel
Definition: ntv2publicinterface.h:2364
kRegMaskPCMControlA8P5_6
@ kRegMaskPCMControlA8P5_6
Definition: ntv2publicinterface.h:2080
PCM_CONTROL_INFO::pcmControlMask
ULWord pcmControlMask
Definition: ntv2audio.cpp:59
kRegShiftHDMIOutSourceSelect
@ kRegShiftHDMIOutSourceSelect
Definition: ntv2publicinterface.h:2612
kRegMaskPCMControlA5P11_12
@ kRegMaskPCMControlA5P11_12
Definition: ntv2publicinterface.h:2056
kRegAudioMixerAux2GainCh1
@ kRegAudioMixerAux2GainCh1
Definition: ntv2publicinterface.h:768
kRegShiftAud8PlayCapMode
@ kRegShiftAud8PlayCapMode
Definition: ntv2publicinterface.h:2243
kRegAud7InputLastAddr
@ kRegAud7InputLastAddr
Definition: ntv2publicinterface.h:585
kRegShiftPCMControlA6P5_6
@ kRegShiftPCMControlA6P5_6
Definition: ntv2publicinterface.h:3122
sAudioMixerInputSelectShifts
static const ULWord sAudioMixerInputSelectShifts[]
Definition: ntv2audio.cpp:661
CNTV2Card::GetAudioOutputAESSyncModeBit
virtual bool GetAudioOutputAESSyncModeBit(const NTV2AudioSystem inAudioSystem, bool &outAESSyncModeBitSet)
Answers with the current state of the AES Sync Mode bit for the given Audio System's output.
Definition: ntv2audio.cpp:1797
kRegAudioMixerMainOutputLevelsPair0
@ kRegAudioMixerMainOutputLevelsPair0
Definition: ntv2publicinterface.h:787
kDeviceCanDoAudioMixer
@ kDeviceCanDoAudioMixer
True if device has a firmware audio mixer.
Definition: ntv2devicefeatures.h:119
kRegShiftAud6RateHigh
@ kRegShiftAud6RateHigh
Definition: ntv2publicinterface.h:2278
kRegMaskAud2RateHigh
@ kRegMaskAud2RateHigh
Definition: ntv2publicinterface.h:1192
kRegMaskPCMControlA8P3_4
@ kRegMaskPCMControlA8P3_4
Definition: ntv2publicinterface.h:2079
kRegAud1Delay
@ kRegAud1Delay
Definition: ntv2publicinterface.h:93
CNTV2Card::SetAudioLoopBack
virtual bool SetAudioLoopBack(const NTV2AudioLoopBack inMode, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Enables or disables NTV2AudioLoopBack mode for the given NTV2AudioSystem.
Definition: ntv2audio.cpp:303
kRegAudioMixerMainOutputLevelsPair6
@ kRegAudioMixerMainOutputLevelsPair6
Definition: ntv2publicinterface.h:793
kRegAud7OutputLastAddr
@ kRegAud7OutputLastAddr
Definition: ntv2publicinterface.h:584
NTV2DeviceHasBiDirectionalAnalogAudio
bool NTV2DeviceHasBiDirectionalAnalogAudio(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:6364
kK2RegShiftAudioLevel
@ kK2RegShiftAudioLevel
Definition: ntv2publicinterface.h:2371
kRegAud8InputLastAddr
@ kRegAud8InputLastAddr
Definition: ntv2publicinterface.h:590
CNTV2Card::GetAudioInputDelay
virtual bool GetAudioInputDelay(const NTV2AudioSystem inAudioSystem, ULWord &outDelay)
Answers with the audio input delay for the given Audio System on the device.
Definition: ntv2audio.cpp:1316
kRegAudioMixerMainInputLevelsPair1
@ kRegAudioMixerMainInputLevelsPair1
Definition: ntv2publicinterface.h:779
kRegMaskPCMControlA6P5_6
@ kRegMaskPCMControlA6P5_6
Definition: ntv2publicinterface.h:2062
kRegShiftEmbeddedAudioClock
@ kRegShiftEmbeddedAudioClock
Definition: ntv2publicinterface.h:2383
SDRAMAuditor
Audits an NTV2 device's SDRAM utilization, and can report contiguous regions of SDRAM,...
Definition: ntv2card.h:6515
kRegAudioMixerMainInputLevelsPair5
@ kRegAudioMixerMainInputLevelsPair5
Definition: ntv2publicinterface.h:783
kRegShiftPCMControlA1P3_4
@ kRegShiftPCMControlA1P3_4
Definition: ntv2publicinterface.h:3076
CNTV2Card::SetAnalogAudioIOConfiguration
virtual bool SetAnalogAudioIOConfiguration(const NTV2AnalogAudioIO inConfig)
Definition: ntv2audio.cpp:1770
kRegMaskAudioAutoErase
@ kRegMaskAudioAutoErase
Definition: ntv2publicinterface.h:1299
NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2
#define NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2(__p__)
Definition: ntv2enums.h:3168
CNTV2Card::GetHDMIOutAudioChannels
virtual bool GetHDMIOutAudioChannels(NTV2HDMIAudioChannels &outValue)
Definition: ntv2audio.cpp:967
kRegShiftPCMControlA8P3_4
@ kRegShiftPCMControlA8P3_4
Definition: ntv2publicinterface.h:3139
NTV2_HDMIAudio8Channels
@ NTV2_HDMIAudio8Channels
8 audio channels
Definition: ntv2enums.h:3584
CNTV2Card::SetAudioMixerOutputGain
virtual bool SetAudioMixerOutputGain(const ULWord inGainValue)
Sets the gain for the output of the Audio Mixer.
Definition: ntv2audio.cpp:754
kRegShiftAud5PlayCapMode
@ kRegShiftAud5PlayCapMode
Definition: ntv2publicinterface.h:2240
NTV2_EMBEDDED_AUDIO_INPUT_INVALID
@ NTV2_EMBEDDED_AUDIO_INPUT_INVALID
Definition: ntv2enums.h:1919
CNTV2Card::SetAudioPlayCaptureModeEnable
virtual bool SetAudioPlayCaptureModeEnable(const NTV2AudioSystem inAudioSystem, const bool inEnable)
Enables or disables a special mode for the given Audio System whereby its embedder and deembedder bot...
Definition: ntv2audio.cpp:1293
kDeviceGetNumBufferedAudioSystems
@ kDeviceGetNumBufferedAudioSystems
The total number of audio systems on the device that can read/write audio buffer memory....
Definition: ntv2devicefeatures.h:205
CNTV2Card::SetAudioSystemInputSource
virtual bool SetAudioSystemInputSource(const NTV2AudioSystem inAudioSystem, const NTV2AudioSource inAudioSource, const NTV2EmbeddedAudioInput inEmbeddedInput)
Sets the audio source for the given NTV2AudioSystem on the device.
Definition: ntv2audio.cpp:488
kRegShiftInputStartAtVBI
@ kRegShiftInputStartAtVBI
Definition: ntv2publicinterface.h:2354
kRegAud5Control
@ kRegAud5Control
Definition: ntv2publicinterface.h:572
CNTV2Card::IsAudioChannelPairPresent
virtual bool IsAudioChannelPairPresent(const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelPair, bool &outIsPresent)
Answers whether or not the given NTV2AudioChannelPair in the given NTV2AudioSystem on the device is p...
Definition: ntv2audio.cpp:1445
kRegMaskPCMControlA4P1_2
@ kRegMaskPCMControlA4P1_2
Definition: ntv2publicinterface.h:2042
CNTV2Card::GetAudioCaptureEnable
virtual bool GetAudioCaptureEnable(const NTV2AudioSystem inAudioSystem, bool &outEnable)
Answers whether or not the Audio System is configured to write captured audio samples into device aud...
Definition: ntv2audio.cpp:1286
kRegAud3InputLastAddr
@ kRegAud3InputLastAddr
Definition: ntv2publicinterface.h:378
GetNonPCMDetectRegisterNumber
static NTV2RegisterNumber GetNonPCMDetectRegisterNumber(const NTV2Channel inSDIInputChannel, const bool inIsExtended=(0))
Definition: ntv2audio.cpp:1593
kRegAudioMixerAux2GainCh2
@ kRegAudioMixerAux2GainCh2
Definition: ntv2publicinterface.h:772
kRegAud5InputLastAddr
@ kRegAud5InputLastAddr
Definition: ntv2publicinterface.h:575
CNTV2Card::GetAudioMixerLevelsSampleCount
virtual bool GetAudioMixerLevelsSampleCount(ULWord &outSampleCount)
Answers with the Audio Mixer's current sample count used for measuring audio levels.
Definition: ntv2audio.cpp:938
kRegAudioControl2
@ kRegAudioControl2
Definition: ntv2publicinterface.h:200
CNTV2Card::GetDetectedAudioChannelPairs
virtual bool GetDetectedAudioChannelPairs(const NTV2AudioSystem inAudioSystem, NTV2AudioChannelPairs &outDetectedChannelPairs)
Answers which audio channel pairs are present in the given Audio System's input stream.
Definition: ntv2audio.cpp:1457
CNTV2Card::GetSDIOutputDS2AudioSystem
virtual bool GetSDIOutputDS2AudioSystem(const NTV2Channel inSDIOutputConnector, NTV2AudioSystem &outAudioSystem)
Answers with the device's Audio System that is currently providing audio for the given SDI output's a...
Definition: ntv2audio.cpp:610
kRegAud8Delay
@ kRegAud8Delay
Definition: ntv2publicinterface.h:642
kRegMaskBOBAnalogInputSelect
@ kRegMaskBOBAnalogInputSelect
Definition: ntv2publicinterface.h:2205
NTV2EmbeddedAudioClock
NTV2EmbeddedAudioClock
This enum value determines/states the device audio clock reference source. It was important to set th...
Definition: ntv2enums.h:1931
CNTV2DriverInterface::ReadRegister
virtual bool ReadRegister(const ULWord inRegNum, ULWord &outValue, const ULWord inMask=0xFFFFFFFF, const ULWord inShift=0)
Reads all or part of the 32-bit contents of a specific register (real or virtual) on the AJA device....
Definition: ntv2driverinterface.cpp:393
NTV2_IS_EXTENDED_AUDIO_CHANNEL_PAIR
#define NTV2_IS_EXTENDED_AUDIO_CHANNEL_PAIR(__p__)
Definition: ntv2enums.h:3126
NTV2DeviceGetHDMIVersion
ULWord NTV2DeviceGetHDMIVersion(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:8618
kRegHDMIOutControl
@ kRegHDMIOutControl
Definition: ntv2publicinterface.h:211
CNTV2Card::GetHDMIOutAudioSource8Channel
virtual bool GetHDMIOutAudioSource8Channel(NTV2Audio8ChannelSelect &outValue, NTV2AudioSystem &outAudioSystem)
Answers with the HDMI output's current 8-channel audio source.
Definition: ntv2audio.cpp:1050
kRegShiftPCMControlA5P7_8
@ kRegShiftPCMControlA5P7_8
Definition: ntv2publicinterface.h:3114
CNTV2Card::SetAudioOutputEraseMode
virtual bool SetAudioOutputEraseMode(const NTV2AudioSystem inAudioSystem, const bool &inEraseModeEnabled)
Enables or disables output erase mode for the given Audio System, which, when enabled,...
Definition: ntv2audio.cpp:1716
NTV2_AudioChannel9_10
@ NTV2_AudioChannel9_10
This selects audio channels 9 and 10 (Group 3 channels 1 and 2)
Definition: ntv2enums.h:3057
CNTV2Card::IsAudioInputRunning
virtual bool IsAudioInputRunning(const NTV2AudioSystem inAudioSystem, bool &outIsRunning)
Answers whether or not the capture side of the given NTV2AudioSystem is currently running.
Definition: ntv2audio.cpp:1267
kRegShiftPCMControlA4P11_12
@ kRegShiftPCMControlA4P11_12
Definition: ntv2publicinterface.h:3107
kRegMaskAudioMixerInputLeftLevel
@ kRegMaskAudioMixerInputLeftLevel
Definition: ntv2publicinterface.h:2156
kRegShiftAud2RateHigh
@ kRegShiftAud2RateHigh
Definition: ntv2publicinterface.h:2274
kRegShiftPCMControlA8P5_6
@ kRegShiftPCMControlA8P5_6
Definition: ntv2publicinterface.h:3140
kRegMaskPCMControlA7P9_10
@ kRegMaskPCMControlA7P9_10
Definition: ntv2publicinterface.h:2073
kRegMaskPCMControlA3P5_6
@ kRegMaskPCMControlA3P5_6
Definition: ntv2publicinterface.h:2035
kRegSDIOut3Control
@ kRegSDIOut3Control
Definition: ntv2publicinterface.h:260
kRegShiftResetAudioOutput
@ kRegShiftResetAudioOutput
Definition: ntv2publicinterface.h:2353
kRegShiftPCMControlA2P3_4
@ kRegShiftPCMControlA2P3_4
Definition: ntv2publicinterface.h:3085
kRegAud6SourceSelect
@ kRegAud6SourceSelect
Definition: ntv2publicinterface.h:578
kRegShiftPCMControlA2P11_12
@ kRegShiftPCMControlA2P11_12
Definition: ntv2publicinterface.h:3089
CNTV2Card::SetHDMIOutAudioChannels
virtual bool SetHDMIOutAudioChannels(const NTV2HDMIAudioChannels inNewValue)
Definition: ntv2audio.cpp:961
kRegMaskPCMControlA2P15_16
@ kRegMaskPCMControlA2P15_16
Definition: ntv2publicinterface.h:2031
kRegAud4InputLastAddr
@ kRegAud4InputLastAddr
Definition: ntv2publicinterface.h:380
NTV2_EMBEDDED_AUDIO_CLOCK_REFERENCE
@ NTV2_EMBEDDED_AUDIO_CLOCK_REFERENCE
Audio clock derived from the device reference.
Definition: ntv2enums.h:1933
kRegShiftPCMControlA2P9_10
@ kRegShiftPCMControlA2P9_10
Definition: ntv2publicinterface.h:3088
NTV2_AnalogAudioIO_4Out_4In
@ NTV2_AnalogAudioIO_4Out_4In
Definition: ntv2enums.h:2177
CNTV2Card::SetSDIOutputAudioSystem
virtual bool SetSDIOutputAudioSystem(const NTV2Channel inSDIOutputConnector, const NTV2AudioSystem inAudioSystem)
Sets the device's NTV2AudioSystem that will provide audio for the given SDI output's audio embedder....
Definition: ntv2audio.cpp:573
CNTV2Card::GetNumberAudioChannels
virtual bool GetNumberAudioChannels(ULWord &outNumChannels, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Returns the current number of audio channels being captured or played by a given Audio System on the ...
Definition: ntv2audio.cpp:183
ULWord
uint32_t ULWord
Definition: ajatypes.h:246
kRegMaskPCMControlA4P5_6
@ kRegMaskPCMControlA4P5_6
Definition: ntv2publicinterface.h:2044
kRegShiftAudioMixerInputRightLevel
@ kRegShiftAudioMixerInputRightLevel
Definition: ntv2publicinterface.h:3217
kRegShiftPCMControlA3P13_14
@ kRegShiftPCMControlA3P13_14
Definition: ntv2publicinterface.h:3099
kRegMaskPCMControlA1P9_10
@ kRegMaskPCMControlA1P9_10
Definition: ntv2publicinterface.h:2019
kRegShiftPCMControlA6P15_16
@ kRegShiftPCMControlA6P15_16
Definition: ntv2publicinterface.h:3127
kRegShiftPCMControlA5P1_2
@ kRegShiftPCMControlA5P1_2
Definition: ntv2publicinterface.h:3111
CNTV2Card::GetAudioOutputEraseMode
virtual bool GetAudioOutputEraseMode(const NTV2AudioSystem inAudioSystem, bool &outEraseModeEnabled)
Answers with the current state of the audio output erase mode for the given Audio System....
Definition: ntv2audio.cpp:1701
kRegMaskPCMControlA3P7_8
@ kRegMaskPCMControlA3P7_8
Definition: ntv2publicinterface.h:2036
kRegMaskInputStartAtVBI
@ kRegMaskInputStartAtVBI
Definition: ntv2publicinterface.h:1268
kFS1RegShiftAudioLevel
@ kFS1RegShiftAudioLevel
Definition: ntv2publicinterface.h:2373
kRegShiftEncodedAudioMode
@ kRegShiftEncodedAudioMode
Definition: ntv2publicinterface.h:2363
CNTV2Card::GetRawAudioTimer
virtual bool GetRawAudioTimer(ULWord &outValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Answers with the current value of the 48kHz audio clock counter.
Definition: ntv2audio.cpp:1819
CNTV2Card::GetAudioReadOffset
virtual bool GetAudioReadOffset(ULWord &outReadOffset, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
For the given Audio System, answers with the byte offset from the start of the audio buffer to the fi...
Definition: ntv2audio.cpp:452
CNTV2Card::GetAudioMixerOutputGain
virtual bool GetAudioMixerOutputGain(ULWord &outGainValue)
Answers with the current gain setting for the Audio Mixer's output.
Definition: ntv2audio.cpp:746
kRegShiftPCMControlA3P11_12
@ kRegShiftPCMControlA3P11_12
Definition: ntv2publicinterface.h:3098
kRegMaskPCMControlA1P3_4
@ kRegMaskPCMControlA1P3_4
Definition: ntv2publicinterface.h:2016
kRegMaskPCMControlA1P11_12
@ kRegMaskPCMControlA1P11_12
Definition: ntv2publicinterface.h:2020
NTV2_IS_VALID_AUDIO_MIXER_INPUT
#define NTV2_IS_VALID_AUDIO_MIXER_INPUT(__p__)
Definition: ntv2enums.h:3183
kRegShiftPCMControlA7P9_10
@ kRegShiftPCMControlA7P9_10
Definition: ntv2publicinterface.h:3133
NTV2AudioChannelPairs
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
Definition: ntv2card.h:29
kRegShiftPCMControlA3P3_4
@ kRegShiftPCMControlA3P3_4
Definition: ntv2publicinterface.h:3094
kRegShiftPCMControlA6P11_12
@ kRegShiftPCMControlA6P11_12
Definition: ntv2publicinterface.h:3125
kRegAudioMixerMainOutputLevelsPair5
@ kRegAudioMixerMainOutputLevelsPair5
Definition: ntv2publicinterface.h:792
kRegMaskAudioMixerLevelSampleCount
@ kRegMaskAudioMixerLevelSampleCount
Definition: ntv2publicinterface.h:2158
kRegFirstNonPCMAudioDetectRegister
@ kRegFirstNonPCMAudioDetectRegister
Definition: ntv2publicinterface.h:800
kRegShiftAudioSource
@ kRegShiftAudioSource
Definition: ntv2publicinterface.h:2378
CNTV2Card::GetAESOutputSource
virtual bool GetAESOutputSource(const NTV2Audio4ChannelSelect inAESAudioChannels, NTV2AudioSystem &outSrcAudioSystem, NTV2Audio4ChannelSelect &outSrcAudioChannels)
Answers with the current audio source for a given quad of AES audio output channels....
Definition: ntv2audio.cpp:1541
kRegShiftPCMControlA8P11_12
@ kRegShiftPCMControlA8P11_12
Definition: ntv2publicinterface.h:3143
CNTV2Card::GetInputAudioChannelPairsWithoutPCM
virtual bool GetInputAudioChannelPairsWithoutPCM(const NTV2Channel inSDIInputConnector, NTV2AudioChannelPairs &outChannelPairs)
For the given SDI input (specified as a channel number), returns the set of audio channel pairs that ...
Definition: ntv2audio.cpp:1640
kRegAud1InputLastAddr
@ kRegAud1InputLastAddr
Definition: ntv2publicinterface.h:101
kRegAud3Control
@ kRegAud3Control
Definition: ntv2publicinterface.h:372
kRegMaskPCMControlA7P15_16
@ kRegMaskPCMControlA7P15_16
Definition: ntv2publicinterface.h:2076
NTV2AudioSystemSet
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
Definition: ntv2publicinterface.h:3869
kRegShiftAudioMixerLevelSampleCount
@ kRegShiftAudioMixerLevelSampleCount
Definition: ntv2publicinterface.h:3218
kRegShiftPCMControlA1P11_12
@ kRegShiftPCMControlA1P11_12
Definition: ntv2publicinterface.h:3080
kRegMaskPCMControlA5P15_16
@ kRegMaskPCMControlA5P15_16
Definition: ntv2publicinterface.h:2058
ntv2card.h
Declares the CNTV2Card class.
kRegShiftEmbeddedOutputSupressCh1
@ kRegShiftEmbeddedOutputSupressCh1
Definition: ntv2publicinterface.h:2357
kRegMaskHDMIOutAudio2ChannelSelect
@ kRegMaskHDMIOutAudio2ChannelSelect
Definition: ntv2publicinterface.h:1542
NTV2_AudioMixerInputAux1
@ NTV2_AudioMixerInputAux1
This selects the Audio Mixer's 1st Auxiliary input.
Definition: ntv2enums.h:3177
kRegShiftPCMControlA1P5_6
@ kRegShiftPCMControlA1P5_6
Definition: ntv2publicinterface.h:3077
kRegMaskPauseAudio
@ kRegMaskPauseAudio
Definition: ntv2publicinterface.h:1269
kRegShiftHDMIOutAudio2ChannelSelect
@ kRegShiftHDMIOutAudio2ChannelSelect
Definition: ntv2publicinterface.h:2618
CNTV2Card::GetAudioAnalogLevel
virtual bool GetAudioAnalogLevel(NTV2AudioLevel &outValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Definition: ntv2audio.cpp:293
kDeviceAudioCanWaitForVBI
@ kDeviceAudioCanWaitForVBI
True if device audio systems can wait for VBI before starting. (New in SDK 17.0)
Definition: ntv2devicefeatures.h:142
gChannelToSDIOutControlRegNum
static const ULWord gChannelToSDIOutControlRegNum[]
Definition: ntv2audio.cpp:28
kRegMaskAud1PlayCapMode
@ kRegMaskAud1PlayCapMode
Definition: ntv2publicinterface.h:1152
NTV2RegisterReadsConstIter
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
Definition: ntv2publicinterface.h:3984
kRegShiftPCMControlA2P7_8
@ kRegShiftPCMControlA2P7_8
Definition: ntv2publicinterface.h:3087
kRegGlobalControl2
@ kRegGlobalControl2
Definition: ntv2publicinterface.h:361
CNTV2Card::GetAudioOutputDelay
virtual bool GetAudioOutputDelay(const NTV2AudioSystem inAudioSystem, ULWord &outDelay)
Answers with the audio output delay for the given Audio System on the device.
Definition: ntv2audio.cpp:1332
CNTV2Card::ReadAudioLastIn
virtual bool ReadAudioLastIn(ULWord &outValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
For the given Audio System, answers with the byte offset to the last byte of the latest chunk of 4-by...
Definition: ntv2audio.cpp:468
kRegAudioDetect5678
@ kRegAudioDetect5678
Definition: ntv2publicinterface.h:592
CNTV2Card::GetSDIOutputAudioSystem
virtual bool GetSDIOutputAudioSystem(const NTV2Channel inSDIOutputConnector, NTV2AudioSystem &outAudioSystem)
Answers with the device's NTV2AudioSystem that is currently providing audio for the given SDI output'...
Definition: ntv2audio.cpp:553
kRegShiftPCMControlA6P7_8
@ kRegShiftPCMControlA6P7_8
Definition: ntv2publicinterface.h:3123
NTV2DeviceGetNumVideoInputs
UWord NTV2DeviceGetNumVideoInputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:11923
kRegMaskPCMControlA1P1_2
@ kRegMaskPCMControlA1P1_2
Definition: ntv2publicinterface.h:2015
NTV2_AUDIO_READBUFFEROFFSET
#define NTV2_AUDIO_READBUFFEROFFSET
Definition: ntv2audiodefines.h:17
CNTV2Card::ReadAudioLastOut
virtual bool ReadAudioLastOut(ULWord &outValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
For the given Audio System, answers with the byte offset of the tail end of the last chunk of audio s...
Definition: ntv2audio.cpp:475
kRegAudioMixerInputSelects
@ kRegAudioMixerInputSelects
Definition: ntv2publicinterface.h:765
NTV2AudioChannelPair
NTV2AudioChannelPair
Identifies a pair of audio channels.
Definition: ntv2enums.h:3051
CNTV2Card::GetAudioOutputEmbedderState
virtual bool GetAudioOutputEmbedderState(const NTV2Channel inSDIOutputConnector, bool &outIsEnabled)
Answers with the current state of the audio output embedder for the given SDI output connector (speci...
Definition: ntv2audio.cpp:1671
kRegGlobalControl3
@ kRegGlobalControl3
Definition: ntv2publicinterface.h:187
kRegShiftAud8RateHigh
@ kRegShiftAud8RateHigh
Definition: ntv2publicinterface.h:2280
NTV2AudioLevel
NTV2AudioLevel
Definition: ntv2enums.h:2253
kRegShiftPCMControlA6P13_14
@ kRegShiftPCMControlA6P13_14
Definition: ntv2publicinterface.h:3126
UWord
uint16_t UWord
Definition: ajatypes.h:244
NTV2RegisterReads
NTV2RegWrites NTV2RegisterReads
Definition: ntv2publicinterface.h:3983
PCM_CONTROL_INFO::pcmControlReg
ULWord pcmControlReg
Definition: ntv2audio.cpp:58
kRegAudioMixerMainInputLevelsPair7
@ kRegAudioMixerMainInputLevelsPair7
Definition: ntv2publicinterface.h:785
CNTV2Card::GetEmbeddedAudioClock
virtual bool GetEmbeddedAudioClock(NTV2EmbeddedAudioClock &outValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
For the given NTV2AudioSystem, answers with the current NTV2EmbeddedAudioClock setting.
Definition: ntv2audio.cpp:428
kRegSDIOut5Control
@ kRegSDIOut5Control
Definition: ntv2publicinterface.h:444
kRegAud6OutputLastAddr
@ kRegAud6OutputLastAddr
Definition: ntv2publicinterface.h:579
kRegAudioMixerOutGain
@ kRegAudioMixerOutGain
Definition: ntv2publicinterface.h:773
kRegMaskPCMControlA3P9_10
@ kRegMaskPCMControlA3P9_10
Definition: ntv2publicinterface.h:2037
kRegShiftPCMControlA3P7_8
@ kRegShiftPCMControlA3P7_8
Definition: ntv2publicinterface.h:3096
kRegAud3OutputLastAddr
@ kRegAud3OutputLastAddr
Definition: ntv2publicinterface.h:377
kRegShiftPCMControlA5P13_14
@ kRegShiftPCMControlA5P13_14
Definition: ntv2publicinterface.h:3117
kRegHDMIInputControl
@ kRegHDMIInputControl
Definition: ntv2publicinterface.h:213
NTV2_EMBEDDED_AUDIO_CLOCK_VIDEO_INPUT
@ NTV2_EMBEDDED_AUDIO_CLOCK_VIDEO_INPUT
Audio clock derived from the video input.
Definition: ntv2enums.h:1934
ntv2utils.h
Declares numerous NTV2 utility functions.
kRegShiftPCMControlA7P3_4
@ kRegShiftPCMControlA7P3_4
Definition: ntv2publicinterface.h:3130
CNTV2Card::GetAnalogAudioTransmitEnable
virtual bool GetAnalogAudioTransmitEnable(const NTV2Audio4ChannelSelect inChannelQuad, bool &outEnabled)
Answers whether or not the specified bidirectional XLR audio connectors are collectively acting as in...
Definition: ntv2audio.cpp:1737
NTV2_AnalogAudioIO_4In_4Out
@ NTV2_AnalogAudioIO_4In_4Out
Definition: ntv2enums.h:2176
kRegMaskAudio16Channel
@ kRegMaskAudio16Channel
Definition: ntv2publicinterface.h:1278
CNTV2Card::ReadAudioSource
virtual bool ReadAudioSource(ULWord &outValue, const NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2audio.cpp:483
kRegShiftLoopBack
@ kRegShiftLoopBack
Definition: ntv2publicinterface.h:2350
kRegShiftMultiLinkAudio
@ kRegShiftMultiLinkAudio
Definition: ntv2publicinterface.h:2365
NTV2_AUDIO_BUFFER_SIZE_1MB
@ NTV2_AUDIO_BUFFER_SIZE_1MB
Definition: ntv2enums.h:1861
kRegMaskPCMControlA2P1_2
@ kRegMaskPCMControlA2P1_2
Definition: ntv2publicinterface.h:2024
CNTV2Card::GetAudio20BitMode
virtual bool GetAudio20BitMode(const NTV2AudioSystem inAudioSystem, bool &outEnable)
Answers whether or not the device's NTV2AudioSystem is currently operating in 20-bit mode....
Definition: ntv2audio.cpp:1196
NTV2DeviceCanDoAudioDelay
bool NTV2DeviceCanDoAudioDelay(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:1547
CNTV2Card::InputAudioChannelPairHasPCM
virtual bool InputAudioChannelPairHasPCM(const NTV2Channel inSDIInputConnector, const NTV2AudioChannelPair inAudioChannelPair, bool &outIsPCM)
For the given SDI input (specified as a channel number), answers if the specified audio channel pair ...
Definition: ntv2audio.cpp:1599
kRegMaskPCMControlA1P15_16
@ kRegMaskPCMControlA1P15_16
Definition: ntv2publicinterface.h:2022
kRegShiftEmbeddedOutputSupressCh2
@ kRegShiftEmbeddedOutputSupressCh2
Definition: ntv2publicinterface.h:2359
kRegShiftPCMControlA4P15_16
@ kRegShiftPCMControlA4P15_16
Definition: ntv2publicinterface.h:3109
kRegShiftPCMControlA7P13_14
@ kRegShiftPCMControlA7P13_14
Definition: ntv2publicinterface.h:3135
NTV2_AUDIO_LOOPBACK_INVALID
@ NTV2_AUDIO_LOOPBACK_INVALID
Definition: ntv2enums.h:1973
CNTV2Card::GetAudioOutputMonitorSource
virtual bool GetAudioOutputMonitorSource(NTV2AudioChannelPair &outChannelPair, NTV2AudioSystem &outAudioSystem)
Answers with the current audio monitor source. The audio output monitor is typically a pair of RCA ja...
Definition: ntv2audio.cpp:1117
CNTV2Card::SetAudioOutputEmbedderState
virtual bool SetAudioOutputEmbedderState(const NTV2Channel inSDIOutputConnector, const bool &inEnable)
Enables or disables the audio output embedder for the given SDI output connector (specified as a chan...
Definition: ntv2audio.cpp:1688
CNTV2Card::SetEncodedAudioMode
virtual bool SetEncodedAudioMode(const NTV2EncodedAudioMode value, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Definition: ntv2audio.cpp:333
kRegShiftPCMControlA4P9_10
@ kRegShiftPCMControlA4P9_10
Definition: ntv2publicinterface.h:3106
kRegAud4Control
@ kRegAud4Control
Definition: ntv2publicinterface.h:373
NTV2_AUDIO_BUFFER_SIZE_4MB
@ NTV2_AUDIO_BUFFER_SIZE_4MB
Definition: ntv2enums.h:1862
NTV2AudioLoopBack
NTV2AudioLoopBack
This enum value determines/states if an audio output embedder will embed silence (zeroes) or de-embed...
Definition: ntv2enums.h:1969
kRegMaskAudioMixerMainInputEnable
@ kRegMaskAudioMixerMainInputEnable
Definition: ntv2publicinterface.h:2131
kRegAud8SourceSelect
@ kRegAud8SourceSelect
Definition: ntv2publicinterface.h:588
PCM_CONTROL_INFO::PCM_CONTROL_INFO
PCM_CONTROL_INFO(ULWord regNum, ULWord mask, ULWord shift)
Definition: ntv2audio.cpp:61
CNTV2Card::GetEmbeddedAudioInput
virtual bool GetEmbeddedAudioInput(NTV2EmbeddedAudioInput &outEmbeddedSource, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Answers with the device's current embedded (SDI) audio source for the given NTV2AudioSystem.
Definition: ntv2audio.cpp:380
NTV2_IS_AUDIO_MIXER_INPUT_MAIN
#define NTV2_IS_AUDIO_MIXER_INPUT_MAIN(__p__)
Definition: ntv2enums.h:3184
kRegAudioMixerMainInputLevelsPair0
@ kRegAudioMixerMainInputLevelsPair0
Definition: ntv2publicinterface.h:778
NTV2ChannelSet
std::set< NTV2Channel > NTV2ChannelSet
A set of distinct NTV2Channel values.
Definition: ntv2publicinterface.h:3823
kRegMaskAud4RateHigh
@ kRegMaskAud4RateHigh
Definition: ntv2publicinterface.h:1194
kRegSDIOut7Control
@ kRegSDIOut7Control
Definition: ntv2publicinterface.h:618
kRegAudioMixerMainOutputLevelsPair3
@ kRegAudioMixerMainOutputLevelsPair3
Definition: ntv2publicinterface.h:790
kRegShiftPCMControlA4P5_6
@ kRegShiftPCMControlA4P5_6
Definition: ntv2publicinterface.h:3104
kRegShiftAudioMixerMainInputSelect
@ kRegShiftAudioMixerMainInputSelect
Definition: ntv2publicinterface.h:3170
kRegAud7Control
@ kRegAud7Control
Definition: ntv2publicinterface.h:582
CNTV2Card::GetAudioMixerOutputChannelsMute
virtual bool GetAudioMixerOutputChannelsMute(NTV2AudioChannelsMuted16 &outMutes)
Answers with a std::bitset that indicates which output audio channels of the Audio Mixer are currentl...
Definition: ntv2audio.cpp:830
kRegShiftRotaryEncoderGain
@ kRegShiftRotaryEncoderGain
Definition: ntv2publicinterface.h:3221
kRegAud4OutputLastAddr
@ kRegAud4OutputLastAddr
Definition: ntv2publicinterface.h:379
kRegAud5OutputLastAddr
@ kRegAud5OutputLastAddr
Definition: ntv2publicinterface.h:574
kRegMaskPCMControlA4P11_12
@ kRegMaskPCMControlA4P11_12
Definition: ntv2publicinterface.h:2047
kRegShiftAud7PlayCapMode
@ kRegShiftAud7PlayCapMode
Definition: ntv2publicinterface.h:2242
kRegMaskAud1RateHigh
@ kRegMaskAud1RateHigh
Definition: ntv2publicinterface.h:1191
kRegAud5SourceSelect
@ kRegAud5SourceSelect
Definition: ntv2publicinterface.h:573
gAudioRateHighShift
static const ULWord gAudioRateHighShift[]
Definition: ntv2audio.cpp:54
CNTV2Card::SetAudio20BitMode
virtual bool SetAudio20BitMode(const NTV2AudioSystem inAudioSystem, const bool inEnable)
Enables or disables 20-bit mode for the NTV2AudioSystem.
Definition: ntv2audio.cpp:1188
kRegShiftAudioMixerMainInputEnable
@ kRegShiftAudioMixerMainInputEnable
Definition: ntv2publicinterface.h:3191
CNTV2Card::SetAudioOutputAESSyncModeBit
virtual bool SetAudioOutputAESSyncModeBit(const NTV2AudioSystem inAudioSystem, const bool &inAESSyncModeBitSet)
Sets or clears the AES Sync Mode bit for the given Audio System's output.
Definition: ntv2audio.cpp:1810
kRegMaskPCMControlA7P11_12
@ kRegMaskPCMControlA7P11_12
Definition: ntv2publicinterface.h:2074
kRegSDIOut2Control
@ kRegSDIOut2Control
Definition: ntv2publicinterface.h:217
sAudioMixerInputMuteShifts
static const ULWord sAudioMixerInputMuteShifts[]
Definition: ntv2audio.cpp:828
kRegMaskPCMControlA4P15_16
@ kRegMaskPCMControlA4P15_16
Definition: ntv2publicinterface.h:2049
kRegShiftAud7RateHigh
@ kRegShiftAud7RateHigh
Definition: ntv2publicinterface.h:2279
kRegAud1SourceSelect
@ kRegAud1SourceSelect
Definition: ntv2publicinterface.h:99
NTV2RegInfo
struct NTV2RegInfo NTV2RegInfo
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
kRegMaskPCMControlA4P7_8
@ kRegMaskPCMControlA4P7_8
Definition: ntv2publicinterface.h:2045
kRegShiftAud3PlayCapMode
@ kRegShiftAud3PlayCapMode
Definition: ntv2publicinterface.h:2238
CNTV2Card::SetHDMIOutAudioRate
virtual bool SetHDMIOutAudioRate(const NTV2AudioRate inNewValue)
Sets the HDMI output's audio rate.
Definition: ntv2audio.cpp:1082
NTV2_IS_VALID_AUDIO_LOOPBACK
#define NTV2_IS_VALID_AUDIO_LOOPBACK(_x_)
Definition: ntv2enums.h:1976
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_6
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_6
Definition: ntv2enums.h:1915
kRegShiftNumChannels
@ kRegShiftNumChannels
Definition: ntv2publicinterface.h:2360
kRegShiftPCMControlA5P5_6
@ kRegShiftPCMControlA5P5_6
Definition: ntv2publicinterface.h:3113
kRegAud4SourceSelect
@ kRegAud4SourceSelect
Definition: ntv2publicinterface.h:375
kRegMaskAud2PlayCapMode
@ kRegMaskAud2PlayCapMode
Definition: ntv2publicinterface.h:1153
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1319
CNTV2Card::GetAnalogAudioIOConfiguration
virtual bool GetAnalogAudioIOConfiguration(NTV2AnalogAudioIO &outConfig)
Definition: ntv2audio.cpp:1778
CNTV2Card::GetMultiLinkAudioMode
virtual bool GetMultiLinkAudioMode(const NTV2AudioSystem inAudioSystem, bool &outEnabled)
Answers with the current multi-link audio mode for the given audio system.
Definition: ntv2audio.cpp:1761
kRegAudioMixerMainOutputLevelsPair4
@ kRegAudioMixerMainOutputLevelsPair4
Definition: ntv2publicinterface.h:791
NTV2_IS_VALID_AUDIO_SOURCE
#define NTV2_IS_VALID_AUDIO_SOURCE(_x_)
Definition: ntv2enums.h:1961
sAudioDetectGroups
static const unsigned sAudioDetectGroups[]
Definition: ntv2audio.cpp:1441
NTV2DeviceGetNumAudioSystems
UWord NTV2DeviceGetNumAudioSystems(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:9864
NTV2_AUDIO_WRAPADDRESS
#define NTV2_AUDIO_WRAPADDRESS
Definition: ntv2audiodefines.h:13
CNTV2Card::GetAudioPlayCaptureModeEnable
virtual bool GetAudioPlayCaptureModeEnable(const NTV2AudioSystem inAudioSystem, bool &outEnable)
Answers whether or not the device's Audio System is currently operating in a special mode in which it...
Definition: ntv2audio.cpp:1300
NTV2_AudioChannel5_8
@ NTV2_AudioChannel5_8
This selects audio channels 5 thru 8.
Definition: ntv2enums.h:3194
kRegMaskResetAudioOutput
@ kRegMaskResetAudioOutput
Definition: ntv2publicinterface.h:1267
kRegShiftAud1RateHigh
@ kRegShiftAud1RateHigh
Definition: ntv2publicinterface.h:2273
kRegMaskEmbeddedAudioClock
@ kRegMaskEmbeddedAudioClock
Definition: ntv2publicinterface.h:1302
kRegMaskAud5RateHigh
@ kRegMaskAud5RateHigh
Definition: ntv2publicinterface.h:1195
kRegSDIOut6Control
@ kRegSDIOut6Control
Definition: ntv2publicinterface.h:617
kRegMaskPCMControlA7P7_8
@ kRegMaskPCMControlA7P7_8
Definition: ntv2publicinterface.h:2072
kRegAudioMixerMainInputLevelsPair6
@ kRegAudioMixerMainInputLevelsPair6
Definition: ntv2publicinterface.h:784
kRegAudioMixerMainInputLevelsPair2
@ kRegAudioMixerMainInputLevelsPair2
Definition: ntv2publicinterface.h:780
kRegAudioMixerChannelSelect
@ kRegAudioMixerChannelSelect
Definition: ntv2publicinterface.h:769
kVRegSuspendSystemAudio
@ kVRegSuspendSystemAudio
Definition: ntv2virtualregisters.h:310
kRegShiftPCMControlA6P3_4
@ kRegShiftPCMControlA6P3_4
Definition: ntv2publicinterface.h:3121
CNTV2Card::SetAudioMixerInputAudioSystem
virtual bool SetAudioMixerInputAudioSystem(const NTV2AudioMixerInput inMixerInput, const NTV2AudioSystem inAudioSystem)
Sets the Audio System that will drive the given input of the Audio Mixer.
Definition: ntv2audio.cpp:676
kRegMaskAud3PlayCapMode
@ kRegMaskAud3PlayCapMode
Definition: ntv2publicinterface.h:1154
NTV2DeviceCanDoPCMDetection
bool NTV2DeviceCanDoPCMDetection(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4335
kRegRotaryEncoder
@ kRegRotaryEncoder
Definition: ntv2publicinterface.h:1013
kRegMaskPCMControlA1P13_14
@ kRegMaskPCMControlA1P13_14
Definition: ntv2publicinterface.h:2021
kRegMaskHDMIOutSourceSelect
@ kRegMaskHDMIOutSourceSelect
Definition: ntv2publicinterface.h:1536
NTV2_AUDIO_AES
@ NTV2_AUDIO_AES
Obtain audio samples from the device AES inputs, if available.
Definition: ntv2enums.h:1949
kRegMaskAudioOutDelay
@ kRegMaskAudioOutDelay
Definition: ntv2publicinterface.h:1407
gAudioDelayRegisterNumbers
static const ULWord gAudioDelayRegisterNumbers[]
Definition: ntv2audio.cpp:46
kRegShiftPCMControlA4P3_4
@ kRegShiftPCMControlA4P3_4
Definition: ntv2publicinterface.h:3103
kRegShiftAudioRate
@ kRegShiftAudioRate
Definition: ntv2publicinterface.h:2362
NTV2_AUDIO_HDMI
@ NTV2_AUDIO_HDMI
Obtain audio samples from the device HDMI input, if available.
Definition: ntv2enums.h:1951
kRegAud1Control
@ kRegAud1Control
Definition: ntv2publicinterface.h:98
NTV2AudioRate
NTV2AudioRate
Definition: ntv2enums.h:1873
kRegMaskNumChannels
@ kRegMaskNumChannels
Definition: ntv2publicinterface.h:1274
kRegMaskPCMControlA3P1_2
@ kRegMaskPCMControlA3P1_2
Definition: ntv2publicinterface.h:2033
CNTV2Card::GetHDMIOutAudioSource2Channel
virtual bool GetHDMIOutAudioSource2Channel(NTV2AudioChannelPair &outValue, NTV2AudioSystem &outAudioSystem)
Answers with the HDMI output's current 2-channel audio source.
Definition: ntv2audio.cpp:995
kRegMaskPCMControlA7P5_6
@ kRegMaskPCMControlA7P5_6
Definition: ntv2publicinterface.h:2071
kRegShiftBOBAnalogLevelControl
@ kRegShiftBOBAnalogLevelControl
Definition: ntv2publicinterface.h:3263
CNTV2Card::SetHDMIOutAudioSource2Channel
virtual bool SetHDMIOutAudioSource2Channel(const NTV2AudioChannelPair inNewValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the HDMI output's 2-channel audio source.
Definition: ntv2audio.cpp:973
kRegShiftAud5RateHigh
@ kRegShiftAud5RateHigh
Definition: ntv2publicinterface.h:2277
CNTV2Card::GetAudioOutputPause
virtual bool GetAudioOutputPause(const NTV2AudioSystem inAudioSystem, bool &outIsPaused)
Answers if the device's Audio System is currently paused or not.
Definition: ntv2audio.cpp:1211
NTV2RegisterNumber
NTV2RegisterNumber
Definition: ntv2publicinterface.h:71
NTV2_AudioChannel9_16
@ NTV2_AudioChannel9_16
This selects audio channels 9 thru 16.
Definition: ntv2enums.h:3243
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5579
kRegMaskOutputStartAtVBI
@ kRegMaskOutputStartAtVBI
Definition: ntv2publicinterface.h:1272
CNTV2Card::WriteAudioSource
virtual bool WriteAudioSource(const ULWord inValue, const NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2audio.cpp:484
CNTV2Card::SetEmbeddedAudioInput
virtual bool SetEmbeddedAudioInput(const NTV2EmbeddedAudioInput inEmbeddedSource, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the embedded (SDI) audio source for the given NTV2AudioSystem on the device.
Definition: ntv2audio.cpp:349
kRegSDIOut1Control
@ kRegSDIOut1Control
Definition: ntv2publicinterface.h:215
NTV2AudioMixerChannel
NTV2AudioMixerChannel
Definition: ntv2enums.h:3145
kRegMaskPCMControlA5P3_4
@ kRegMaskPCMControlA5P3_4
Definition: ntv2publicinterface.h:2052
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_7
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_7
Definition: ntv2enums.h:1916
kRegMaskAudioRate
@ kRegMaskAudioRate
Definition: ntv2publicinterface.h:1276
false
#define false
Definition: ntv2devicefeatures.h:25
CNTV2Card::GetAudioLoopBack
virtual bool GetAudioLoopBack(NTV2AudioLoopBack &outMode, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Answers if NTV2AudioLoopBack mode is currently on or off for the given NTV2AudioSystem.
Definition: ntv2audio.cpp:324
NTV2DeviceCanDoIP
bool NTV2DeviceCanDoIP(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:3526
common.h
Private include file for all ajabase sources.
NTV2AudioSystemSetConstIter
NTV2AudioSystemSet::const_iterator NTV2AudioSystemSetConstIter
A handy const iterator into an NTV2AudioSystemSet. New in SDK 16.2.
Definition: ntv2publicinterface.h:3870
kRegPCMControl4321
@ kRegPCMControl4321
Definition: ntv2publicinterface.h:644
kRegShiftAudioAutoErase
@ kRegShiftAudioAutoErase
Definition: ntv2publicinterface.h:2380
NTV2_AnalogAudioIO_8In
@ NTV2_AnalogAudioIO_8In
Definition: ntv2enums.h:2178
kRegAudioMixerAux2InputLevels
@ kRegAudioMixerAux2InputLevels
Definition: ntv2publicinterface.h:777
CNTV2Card::GetDetectedAESChannelPairs
virtual bool GetDetectedAESChannelPairs(NTV2AudioChannelPairs &outDetectedChannelPairs)
Answers which AES/EBU audio channel pairs are present on the device.
Definition: ntv2audio.cpp:1475
NTV2_AUDIO_LOOPBACK_ON
@ NTV2_AUDIO_LOOPBACK_ON
Embeds SDI input source audio into the data stream.
Definition: ntv2enums.h:1972
NTV2DeviceCanDoAESAudioIn
bool NTV2DeviceCanDoAESAudioIn(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:1007
kRegShiftResetAudioInput
@ kRegShiftResetAudioInput
Definition: ntv2publicinterface.h:2352
kRegShiftPCMControlA1P7_8
@ kRegShiftPCMControlA1P7_8
Definition: ntv2publicinterface.h:3078
NTV2AudioChannelsMuted16
std::bitset< 16 > NTV2AudioChannelsMuted16
Per-audio-channel mute state for up to 16 audio channels.
Definition: ntv2card.h:53
CNTV2Card::SetAudioPCMControl
virtual bool SetAudioPCMControl(const NTV2AudioSystem inAudioSystem, const bool inIsNonPCM)
Determines whether or not all outgoing audio channel pairs are to be flagged as non-PCM for the given...
Definition: ntv2audio.cpp:1340
CNTV2Card::GetAudioMixerInputChannelSelect
virtual bool GetAudioMixerInputChannelSelect(const NTV2AudioMixerInput inMixerInput, NTV2AudioChannelPair &outChannelPair)
Answers with the Audio Channel Pair that's currently driving the given input of the Audio Mixer.
Definition: ntv2audio.cpp:689
kRegMaskEmbeddedAudioInput
@ kRegMaskEmbeddedAudioInput
Definition: ntv2publicinterface.h:1298
kRegShiftPCMControlA5P11_12
@ kRegShiftPCMControlA5P11_12
Definition: ntv2publicinterface.h:3116
kRegMaskPCMControlA2P3_4
@ kRegMaskPCMControlA2P3_4
Definition: ntv2publicinterface.h:2025
NTV2_AUDIO_CHANNEL_QUAD_INVALID
@ NTV2_AUDIO_CHANNEL_QUAD_INVALID
Definition: ntv2enums.h:3226
NTV2_AUDIO_96K
@ NTV2_AUDIO_96K
Definition: ntv2enums.h:1876
CNTV2Card::SetHeadphoneOutputGain
virtual bool SetHeadphoneOutputGain(const ULWord inGainValue)
Sets the gain for the headphone out.
Definition: ntv2audio.cpp:820
kRegMaskEncodedAudioMode
@ kRegMaskEncodedAudioMode
Definition: ntv2publicinterface.h:1277
kRegInputStatus
@ kRegInputStatus
Definition: ntv2publicinterface.h:96
CNTV2Card::SetAnalogAudioTransmitEnable
virtual bool SetAnalogAudioTransmitEnable(const NTV2Audio4ChannelSelect inChannelQuad, const bool inEnable)
Sets the specified bidirectional XLR audio connectors to collectively act as inputs or outputs.
Definition: ntv2audio.cpp:1725
kRegShiftPCMControlA1P1_2
@ kRegShiftPCMControlA1P1_2
Definition: ntv2publicinterface.h:3075
NTV2DeviceCanDoBreakoutBoard
bool NTV2DeviceCanDoBreakoutBoard(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:1727
kRegMaskPCMControlA2P7_8
@ kRegMaskPCMControlA2P7_8
Definition: ntv2publicinterface.h:2027
NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16
#define NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16(__p__)
Definition: ntv2enums.h:3124
gAESChannelMappingShifts
static const unsigned gAESChannelMappingShifts[4]
Definition: ntv2audio.cpp:1538
NTV2_AUDIO_EMBEDDED
@ NTV2_AUDIO_EMBEDDED
Obtain audio samples from the audio that's embedded in the video HANC.
Definition: ntv2enums.h:1948
kRegMaskPCMControlA6P13_14
@ kRegMaskPCMControlA6P13_14
Definition: ntv2publicinterface.h:2066
ULWordSequence
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:45
kRegAud2InputLastAddr
@ kRegAud2InputLastAddr
Definition: ntv2publicinterface.h:337
kRegShiftPCMControlA1P9_10
@ kRegShiftPCMControlA1P9_10
Definition: ntv2publicinterface.h:3079
CNTV2Card::SetAESOutputSource
virtual bool SetAESOutputSource(const NTV2Audio4ChannelSelect inAESAudioChannels, const NTV2AudioSystem inSrcAudioSystem, const NTV2Audio4ChannelSelect inSrcAudioChannels)
Changes the audio source for the given quad of AES audio output channels. By default,...
Definition: ntv2audio.cpp:1568
kRegMaskEmbeddedOutputSupressCh1
@ kRegMaskEmbeddedOutputSupressCh1
Definition: ntv2publicinterface.h:1271
kRegShiftPCMControlA6P1_2
@ kRegShiftPCMControlA6P1_2
Definition: ntv2publicinterface.h:3120
sAudioMixerInputGainCh2Regs
static const ULWord sAudioMixerInputGainCh2Regs[]
Definition: ntv2audio.cpp:717
AUDWARN
#define AUDWARN(__x__)
Definition: ntv2audio.cpp:22
CNTV2Card::SetAudioOutputPause
virtual bool SetAudioOutputPause(const NTV2AudioSystem inAudioSystem, const bool inPausePlayout)
Pauses or resumes output of audio samples and advancement of the audio buffer pointer ("play head") o...
Definition: ntv2audio.cpp:1204
NTV2_IS_NORMAL_AUDIO_CHANNEL_QUAD
#define NTV2_IS_NORMAL_AUDIO_CHANNEL_QUAD(__p__)
Definition: ntv2enums.h:3232
kRegShiftPCMControlA4P7_8
@ kRegShiftPCMControlA4P7_8
Definition: ntv2publicinterface.h:3105
kRegMaskAnalogIOControl_14
@ kRegMaskAnalogIOControl_14
Definition: ntv2publicinterface.h:1181
kRegShiftAudioInDelay
@ kRegShiftAudioInDelay
Definition: ntv2publicinterface.h:2487
kRegAudioMixerMainOutputLevelsPair1
@ kRegAudioMixerMainOutputLevelsPair1
Definition: ntv2publicinterface.h:788
CNTV2Card::SetAudioMixerOutputChannelsMute
virtual bool SetAudioMixerOutputChannelsMute(const NTV2AudioChannelsMuted16 inMutes)
Mutes or enables the individual output audio channels of the Audio Mixer.
Definition: ntv2audio.cpp:842
kRegMaskPCMControlA6P9_10
@ kRegMaskPCMControlA6P9_10
Definition: ntv2publicinterface.h:2064
NTV2DeviceCanDoStackedAudio
bool NTV2DeviceCanDoStackedAudio(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:5196
kRegShiftAudioMixerInputLeftLevel
@ kRegShiftAudioMixerInputLeftLevel
Definition: ntv2publicinterface.h:3216
CNTV2Card::SetSDIOutputDS2AudioSystem
virtual bool SetSDIOutputDS2AudioSystem(const NTV2Channel inSDIOutputConnector, const NTV2AudioSystem inAudioSystem)
Sets the Audio System that will supply audio for the given SDI output's audio embedder for Data Strea...
Definition: ntv2audio.cpp:630
kRegMaskPCMControlA6P1_2
@ kRegMaskPCMControlA6P1_2
Definition: ntv2publicinterface.h:2060
kRegMaskPCMControlA8P15_16
@ kRegMaskPCMControlA8P15_16
Definition: ntv2publicinterface.h:2085
gAudioSystemToSrcSelectRegNum
static const ULWord gAudioSystemToSrcSelectRegNum[]
Definition: ntv2audio.cpp:31
kRegAud6Control
@ kRegAud6Control
Definition: ntv2publicinterface.h:577
CNTV2Card::SetMultiLinkAudioMode
virtual bool SetMultiLinkAudioMode(const NTV2AudioSystem inAudioSystem, const bool inEnable)
Sets the multi-link audio mode for the given audio system.
Definition: ntv2audio.cpp:1753
kRegMaskResetAudioInput
@ kRegMaskResetAudioInput
Definition: ntv2publicinterface.h:1266
kRegShiftAudioMixerAux1x2CHInput
@ kRegShiftAudioMixerAux1x2CHInput
Definition: ntv2publicinterface.h:3171
kRegMaskPCMControlA8P11_12
@ kRegMaskPCMControlA8P11_12
Definition: ntv2publicinterface.h:2083
kRegAudioMixerMainOutputLevelsPair7
@ kRegAudioMixerMainOutputLevelsPair7
Definition: ntv2publicinterface.h:794
kRegMaskPCMControlA8P1_2
@ kRegMaskPCMControlA8P1_2
Definition: ntv2publicinterface.h:2078
NTV2_AudioChannel1_8
@ NTV2_AudioChannel1_8
This selects audio channels 1 thru 8.
Definition: ntv2enums.h:3242
true
#define true
Definition: ntv2devicefeatures.h:26
kRegMaskPCMControlA4P9_10
@ kRegMaskPCMControlA4P9_10
Definition: ntv2publicinterface.h:2046
sAudioMixerInputMuteMasks
static const ULWord sAudioMixerInputMuteMasks[]
Definition: ntv2audio.cpp:827
NTV2_AnalogAudioIO_8Out
@ NTV2_AnalogAudioIO_8Out
Definition: ntv2enums.h:2175
CNTV2Card::StartAudioOutput
virtual bool StartAudioOutput(const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI=false)
Starts the playout side of the given NTV2AudioSystem, reading outgoing audio samples from the Audio S...
Definition: ntv2audio.cpp:1129
kRegMaskHDMIOut8ChGroupSelect
@ kRegMaskHDMIOut8ChGroupSelect
Definition: ntv2publicinterface.h:1490
kRegMaskAudioMixerOutputChannelsMute
@ kRegMaskAudioMixerOutputChannelsMute
Definition: ntv2publicinterface.h:2114
kRegMaskPCMControlA8P7_8
@ kRegMaskPCMControlA8P7_8
Definition: ntv2publicinterface.h:2081
kRegBOBAudioControl
@ kRegBOBAudioControl
Definition: ntv2publicinterface.h:1033
NTV2_AUDIO_BUFFER_INVALID
@ NTV2_AUDIO_BUFFER_INVALID
Definition: ntv2enums.h:1865
CNTV2Card::GetAudioRate
virtual bool GetAudioRate(NTV2AudioRate &outRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Returns the current NTV2AudioRate for the given Audio System.
Definition: ntv2audio.cpp:229
CNTV2Card::SetAudioMixerInputGain
virtual bool SetAudioMixerInputGain(const NTV2AudioMixerInput inMixerInput, const NTV2AudioMixerChannel inChannel, const ULWord inGainValue)
Sets the gain for the given input of the Audio Mixer.
Definition: ntv2audio.cpp:733
NTV2Audio4ChannelSelect
NTV2Audio4ChannelSelect
Identifies a contiguous, adjacent group of four audio channels.
Definition: ntv2enums.h:3191
kRegMaskEmbeddedOutputSupressCh2
@ kRegMaskEmbeddedOutputSupressCh2
Definition: ntv2publicinterface.h:1273
NTV2DeviceHasRotaryEncoder
bool NTV2DeviceHasRotaryEncoder(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:7277
kRegShiftEmbeddedAudioInput2
@ kRegShiftEmbeddedAudioInput2
Definition: ntv2publicinterface.h:2384
kRegMaskMonitorSource
@ kRegMaskMonitorSource
Definition: ntv2publicinterface.h:1858
kRegMaskAud4PlayCapMode
@ kRegMaskAud4PlayCapMode
Definition: ntv2publicinterface.h:1155
NTV2EncodedAudioMode
NTV2EncodedAudioMode
Definition: ntv2enums.h:1885
kRegMaskPCMControlA8P9_10
@ kRegMaskPCMControlA8P9_10
Definition: ntv2publicinterface.h:2082
NTV2_AUDIOSYSTEM_5
@ NTV2_AUDIOSYSTEM_5
This identifies the 5th Audio System.
Definition: ntv2enums.h:3815
CNTV2Card::GetHeadphoneOutputGain
virtual bool GetHeadphoneOutputGain(ULWord &outGainValue)
Answers with the current gain setting for the headphone out.
Definition: ntv2audio.cpp:812
sAudioDetectRegs
static const ULWord sAudioDetectRegs[]
Definition: ntv2audio.cpp:1436
kRegMaskPCMControlA2P11_12
@ kRegMaskPCMControlA2P11_12
Definition: ntv2publicinterface.h:2029
CNTV2Card::SetHDMIOutAudioSource8Channel
virtual bool SetHDMIOutAudioSource8Channel(const NTV2Audio8ChannelSelect inNewValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Changes the HDMI output's 8-channel audio source.
Definition: ntv2audio.cpp:1024
kDeviceGetTotalNumAudioSystems
@ kDeviceGetTotalNumAudioSystems
The total number of audio systems on the device, including host audio and mixer audio systems,...
Definition: ntv2devicefeatures.h:204
kRegAud2OutputLastAddr
@ kRegAud2OutputLastAddr
Definition: ntv2publicinterface.h:336
NTV2DeviceGetNumVideoOutputs
UWord NTV2DeviceGetNumVideoOutputs(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:12012
kRegMaskAud8RateHigh
@ kRegMaskAud8RateHigh
Definition: ntv2publicinterface.h:1198
kRegAud2SourceSelect
@ kRegAud2SourceSelect
Definition: ntv2publicinterface.h:335
kRegMaskAudioSource
@ kRegMaskAudioSource
Definition: ntv2publicinterface.h:1297
NTV2_AUDIO_ANALOG
@ NTV2_AUDIO_ANALOG
Obtain audio samples from the device analog input(s), if available.
Definition: ntv2enums.h:1950
kRegShiftPCMControlA2P13_14
@ kRegShiftPCMControlA2P13_14
Definition: ntv2publicinterface.h:3090
kRegShiftPCMControlA7P1_2
@ kRegShiftPCMControlA7P1_2
Definition: ntv2publicinterface.h:3129
gAudioSystemToAudioControlRegNum
static const ULWord gAudioSystemToAudioControlRegNum[]
Definition: ntv2audio.cpp:48
kRegShiftPCMControlA8P1_2
@ kRegShiftPCMControlA8P1_2
Definition: ntv2publicinterface.h:3138
NTV2_AudioChannel15_16
@ NTV2_AudioChannel15_16
This selects audio channels 15 and 16 (Group 4 channels 3 and 4)
Definition: ntv2enums.h:3060
kRegShiftPauseAudio
@ kRegShiftPauseAudio
Definition: ntv2publicinterface.h:2355
CNTV2Card::SetNumberAudioChannels
virtual bool SetNumberAudioChannels(const ULWord inNumChannels, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the number of audio channels to be concurrently captured or played for a given Audio System on t...
Definition: ntv2audio.cpp:149
kRegAudioMixerMainInputLevelsPair3
@ kRegAudioMixerMainInputLevelsPair3
Definition: ntv2publicinterface.h:781
CNTV2Card::SetAudioBufferSize
virtual bool SetAudioBufferSize(const NTV2AudioBufferSize inValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Changes the size of the audio buffer that is used for a given Audio System in the AJA device.
Definition: ntv2audio.cpp:252
NTV2DeviceGetNumAESAudioOutputChannels
UWord NTV2DeviceGetNumAESAudioOutputChannels(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:9419
CNTV2Card::GetSuspendHostAudio
virtual bool GetSuspendHostAudio(bool &outIsSuspended)
Answers as to whether or not the host OS audio services for the AJA device (e.g. CoreAudio on MacOS) ...
Definition: ntv2audio.cpp:1500
kRegShiftAudioOutDelay
@ kRegShiftAudioOutDelay
Definition: ntv2publicinterface.h:2488
kRegMaskAud6RateHigh
@ kRegMaskAud6RateHigh
Definition: ntv2publicinterface.h:1196
kRegMaskEmbeddedAudioInput2
@ kRegMaskEmbeddedAudioInput2
Definition: ntv2publicinterface.h:1303
kRegShiftPCMControlA7P7_8
@ kRegShiftPCMControlA7P7_8
Definition: ntv2publicinterface.h:3132
NTV2EmbeddedAudioInput
NTV2EmbeddedAudioInput
This enum value determines/states which SDI video input will be used to supply audio samples to an au...
Definition: ntv2enums.h:1908
SDRAMAuditor::GetBadRegions
bool GetBadRegions(ULWordSequence &outBlks) const
Answers with the list of colliding and illegal memory regions.
Definition: ntv2card.h:6580
kRegShiftAud4RateHigh
@ kRegShiftAud4RateHigh
Definition: ntv2publicinterface.h:2276
NTV2_IS_VALID_AUDIO_CHANNEL_PAIR
#define NTV2_IS_VALID_AUDIO_CHANNEL_PAIR(__p__)
Definition: ntv2enums.h:3123
kRegMaskPCMControlA5P9_10
@ kRegMaskPCMControlA5P9_10
Definition: ntv2publicinterface.h:2055
CNTV2Card::SetAudioInputDelay
virtual bool SetAudioInputDelay(const NTV2AudioSystem inAudioSystem, const ULWord inDelay)
Sets the audio input delay for the given Audio System on the device.
Definition: ntv2audio.cpp:1308
kRegAudioMixerMainOutputLevelsPair2
@ kRegAudioMixerMainOutputLevelsPair2
Definition: ntv2publicinterface.h:789
BIT
#define BIT(_x_)
Definition: ajatypes.h:654
kRegShiftPCMControlA3P5_6
@ kRegShiftPCMControlA3P5_6
Definition: ntv2publicinterface.h:3095
NTV2_AudioChannel1_4
@ NTV2_AudioChannel1_4
This selects audio channels 1 thru 4.
Definition: ntv2enums.h:3193
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3809
kRegMask20BitMode
@ kRegMask20BitMode
Definition: ntv2publicinterface.h:1263
NTV2_IS_VALID_AUDIO_SYSTEM
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
Definition: ntv2enums.h:3828
kRegShiftPCMControlA3P1_2
@ kRegShiftPCMControlA3P1_2
Definition: ntv2publicinterface.h:3093
NTV2_AudioChannel1_2
@ NTV2_AudioChannel1_2
This selects audio channels 1 and 2 (Group 1 channels 1 and 2)
Definition: ntv2enums.h:3053
BitMasksToNTV2AudioChannelPairs
static NTV2AudioChannelPairs BitMasksToNTV2AudioChannelPairs(const ULWord inBitMask, const ULWord inExtendedBitMask)
Definition: ntv2audio.cpp:1578
kRegAudioMixerMainGain
@ kRegAudioMixerMainGain
Definition: ntv2publicinterface.h:766
kRegMaskPCMControlA6P7_8
@ kRegMaskPCMControlA6P7_8
Definition: ntv2publicinterface.h:2063
NTV2_AudioChannel9_12
@ NTV2_AudioChannel9_12
This selects audio channels 9 thru 12.
Definition: ntv2enums.h:3195
CNTV2Card::GetHDMIOutAudioFormat
virtual bool GetHDMIOutAudioFormat(NTV2AudioFormat &outValue)
Answers with the HDMI output's current audio format.
Definition: ntv2audio.cpp:1100
kK2RegMaskAudioBufferSize
@ kK2RegMaskAudioBufferSize
Definition: ntv2publicinterface.h:1288
NTV2Audio8ChannelSelect
NTV2Audio8ChannelSelect
Identifies a contiguous, adjacent group of eight audio channels.
Definition: ntv2enums.h:3240
CNTV2Card::SetAudioCaptureEnable
virtual bool SetAudioCaptureEnable(const NTV2AudioSystem inAudioSystem, const bool inEnable)
Enables or disables the writing of incoming audio into the given Audio System's capture buffer.
Definition: ntv2audio.cpp:1279
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_2
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_2
Definition: ntv2enums.h:1911
CNTV2Card::GetAudioPCMControl
virtual bool GetAudioPCMControl(const NTV2AudioSystem inAudioSystem, bool &outIsNonPCM)
Answers whether or not all outgoing audio channel pairs are currently being flagged as non-PCM for th...
Definition: ntv2audio.cpp:1347
NTV2AudioSource
NTV2AudioSource
This enum value determines/states where an audio system will obtain its audio samples.
Definition: ntv2enums.h:1946
gChannelToAudioInLastAddrRegNum
static const ULWord gChannelToAudioInLastAddrRegNum[]
Definition: ntv2audio.cpp:34
CNTV2Card::SetAudioAnalogLevel
virtual bool SetAudioAnalogLevel(const NTV2AudioLevel value, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Definition: ntv2audio.cpp:283
kRegShiftPCMControlA1P13_14
@ kRegShiftPCMControlA1P13_14
Definition: ntv2publicinterface.h:3081
kRegShiftAudioMixerAux2x2CHInput
@ kRegShiftAudioMixerAux2x2CHInput
Definition: ntv2publicinterface.h:3172
CNTV2Card::SetHDMIOutAudioFormat
virtual bool SetHDMIOutAudioFormat(const NTV2AudioFormat inNewValue)
Sets the HDMI output's audio format.
Definition: ntv2audio.cpp:1094
kRegMaskAudioMixerInputRightLevel
@ kRegMaskAudioMixerInputRightLevel
Definition: ntv2publicinterface.h:2157
NTV2_AUDIO_READBUFFEROFFSET_BIG
#define NTV2_AUDIO_READBUFFEROFFSET_BIG
Definition: ntv2audiodefines.h:19
kRegMaskPCMControlA3P13_14
@ kRegMaskPCMControlA3P13_14
Definition: ntv2publicinterface.h:2039
kRegShiftPCMControlA8P7_8
@ kRegShiftPCMControlA8P7_8
Definition: ntv2publicinterface.h:3141
kRegMaskHDMIOutAudioCh
@ kRegMaskHDMIOutAudioCh
Definition: ntv2publicinterface.h:1505
kRegShiftMonitorSource
@ kRegShiftMonitorSource
Definition: ntv2publicinterface.h:2921
kRegShiftHDMIOutAudioSource
@ kRegShiftHDMIOutAudioSource
Definition: ntv2publicinterface.h:2922
kRegShiftAudioMixerAux1InputEnable
@ kRegShiftAudioMixerAux1InputEnable
Definition: ntv2publicinterface.h:3192
SDRAMAuditor::AssessDevice
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=false)
Assesses the given device.
Definition: ntv2card.cpp:551
CNTV2Card::GetAudioMixerInputLevels
virtual bool GetAudioMixerInputLevels(const NTV2AudioMixerInput inMixerInput, const NTV2AudioChannelPairs &inChannelPairs, std::vector< uint32_t > &outLevels)
Answers with the Audio Mixer's current audio input levels.
Definition: ntv2audio.cpp:874
NTV2DeviceCanDoPCMControl
bool NTV2DeviceCanDoPCMControl(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4245
kRegAud2Control
@ kRegAud2Control
Definition: ntv2publicinterface.h:334
kRegMaskPCMControlA5P7_8
@ kRegMaskPCMControlA5P7_8
Definition: ntv2publicinterface.h:2054
NTV2AudioBufferSize
NTV2AudioBufferSize
Represents the size of the audio buffer used by a device audio system for storing captured samples or...
Definition: ntv2enums.h:1859
kRegAud3Delay
@ kRegAud3Delay
Definition: ntv2publicinterface.h:402
kRegAud6Delay
@ kRegAud6Delay
Definition: ntv2publicinterface.h:640
NTV2_AUDIO_SOURCE_INVALID
@ NTV2_AUDIO_SOURCE_INVALID
Definition: ntv2enums.h:1954
NTV2DeviceGetMaxAudioChannels
UWord NTV2DeviceGetMaxAudioChannels(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:8796
NTV2RegInfo
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
Definition: ntv2publicinterface.h:3900
CNTV2Card::SetAudioMixerLevelsSampleCount
virtual bool SetAudioMixerLevelsSampleCount(const ULWord inSampleCount)
Sets the Audio Mixer's sample count it uses for measuring audio levels.
Definition: ntv2audio.cpp:947
kRegAudioMixerMainInputLevelsPair4
@ kRegAudioMixerMainInputLevelsPair4
Definition: ntv2publicinterface.h:782
kRegSDIOut8Control
@ kRegSDIOut8Control
Definition: ntv2publicinterface.h:619
CNTV2Card::GetAudioMixerInputChannelsMute
virtual bool GetAudioMixerInputChannelsMute(const NTV2AudioMixerInput inMixerInput, NTV2AudioChannelsMuted16 &outMutes)
Answers with a std::bitset that indicates which input audio channels of the given Audio Mixer input a...
Definition: ntv2audio.cpp:849
NTV2AudioChannelPairsConstIter
NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelPair values.
Definition: ntv2card.h:30
debug.h
Declares the AJADebug class.
kRegMaskAudioMixerAux2InputEnable
@ kRegMaskAudioMixerAux2InputEnable
Definition: ntv2publicinterface.h:2133
kRegMaskPCMControlA7P1_2
@ kRegMaskPCMControlA7P1_2
Definition: ntv2publicinterface.h:2069
kRegMaskPCMControlA7P13_14
@ kRegMaskPCMControlA7P13_14
Definition: ntv2publicinterface.h:2075
kRegMaskAud5PlayCapMode
@ kRegMaskAud5PlayCapMode
Definition: ntv2publicinterface.h:1156
kRegPCMControl8765
@ kRegPCMControl8765
Definition: ntv2publicinterface.h:645
kRegMaskPCMControlA7P3_4
@ kRegMaskPCMControlA7P3_4
Definition: ntv2publicinterface.h:2070
NTV2_NUM_AUDIOSYSTEMS
@ NTV2_NUM_AUDIOSYSTEMS
Definition: ntv2enums.h:3820
gAudioPlayCaptureModeMasks
static const ULWord gAudioPlayCaptureModeMasks[]
Definition: ntv2audio.cpp:40
kRegShiftPCMControlA5P15_16
@ kRegShiftPCMControlA5P15_16
Definition: ntv2publicinterface.h:3118
kRegAud1Detect
@ kRegAud1Detect
Definition: ntv2publicinterface.h:97
kRegShiftHDMIOutAudioRate
@ kRegShiftHDMIOutAudioRate
Definition: ntv2publicinterface.h:2611
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_5
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_5
Definition: ntv2enums.h:1914
kRegMaskMultiLinkAudio
@ kRegMaskMultiLinkAudio
Definition: ntv2publicinterface.h:1279
CNTV2Card::GetAudioMixerInputGain
virtual bool GetAudioMixerInputGain(const NTV2AudioMixerInput inMixerInput, const NTV2AudioMixerChannel inChannel, ULWord &outGainValue)
Answers with the current gain setting for the Audio Mixer's given input.
Definition: ntv2audio.cpp:719
kRegMaskAudioMixerAux1x2CHInput
@ kRegMaskAudioMixerAux1x2CHInput
Definition: ntv2publicinterface.h:2111
kRegAud7SourceSelect
@ kRegAud7SourceSelect
Definition: ntv2publicinterface.h:583
kRegShiftPCMControlA8P15_16
@ kRegShiftPCMControlA8P15_16
Definition: ntv2publicinterface.h:3145
CNTV2Card::SetAudioRate
virtual bool SetAudioRate(const NTV2AudioRate inRate, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Sets the NTV2AudioRate for the given Audio System.
Definition: ntv2audio.cpp:208
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_3
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_3
Definition: ntv2enums.h:1912
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3821