AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
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 
44 
47 
50 
53 
58  inline PCM_CONTROL_INFO(ULWord regNum, ULWord mask, ULWord shift) : pcmControlReg(regNum), pcmControlMask(mask), pcmControlShift(shift){}
59 };
60 
62 {
63  {
72  },
73  {
82  },
83  {
92  },
93  {
102  },
103  {
112  },
113  {
122  },
123  {
132  },
133  {
142  }
143 };
144 
145 
146 bool CNTV2Card::SetNumberAudioChannels (const ULWord inNumChannels, const NTV2AudioSystem inAudioSystem)
147 {
148  const ULWord regAudControl (NTV2_IS_VALID_AUDIO_SYSTEM (inAudioSystem) ? gAudioSystemToAudioControlRegNum [inAudioSystem] : 0);
149 
150  if (regAudControl == 0)
151  return false;
152  else if (inNumChannels == 6 || inNumChannels == 8)
153  {
154  // Make sure 16 channel audio is off
155  WriteRegister (regAudControl, 0, kRegMaskAudio16Channel, kRegShiftAudio16Channel);
156 
157  // Now turn on 6 or 8 channel audio
158  return WriteRegister (regAudControl, inNumChannels == 8, kRegMaskNumChannels, kRegShiftNumChannels);
159  }
160  else if (inNumChannels == 16)
161  {
162  // Turn 16 channel audio on, doesn't matter how 8 or 6 channel is set
163  return WriteRegister (regAudControl, 1, kRegMaskAudio16Channel, kRegShiftAudio16Channel);
164  }
165  else
166  return false;
167 }
168 
169 
170 bool CNTV2Card::SetNumberAudioChannels (const ULWord inNumChannels, const NTV2AudioSystemSet & inAudioSystems)
171 {
172  size_t numFailures(0);
173  for (NTV2AudioSystemSetConstIter it(inAudioSystems.begin()); it != inAudioSystems.end(); ++it)
174  if (!SetNumberAudioChannels (inNumChannels, *it))
175  numFailures++;
176  return numFailures == 0;
177 }
178 
179 
180 bool CNTV2Card::GetNumberAudioChannels (ULWord & outNumChannels, const NTV2AudioSystem inAudioSystem)
181 {
182  const ULWord regAudControl (NTV2_IS_VALID_AUDIO_SYSTEM (inAudioSystem) ? gAudioSystemToAudioControlRegNum [inAudioSystem] : 0);
183  ULWord value (0);
184  bool status (false);
185 
186  if (regAudControl == 0)
187  return false;
188 
189  status = ReadRegister (regAudControl, value, kRegMaskAudio16Channel, kRegShiftAudio16Channel);
190  if (value == 1)
191  outNumChannels = 16;
192  else
193  {
194  status = ReadRegister (regAudControl, value, kRegMaskNumChannels, kRegShiftNumChannels);
195  if (value == 1)
196  outNumChannels = 8;
197  else
198  outNumChannels = 6;
199  }
200 
201  return status;
202 }
203 
204 
205 bool CNTV2Card::SetAudioRate (const NTV2AudioRate inRate, const NTV2AudioSystem inAudioSystem)
206 {
207  ULWord rateLow (0);
208  ULWord rateHigh (0);
209  bool status;
210 
211  if ((inRate == NTV2_AUDIO_192K) && (inAudioSystem == NTV2_AUDIOSYSTEM_1))
212  return false;
213 
214  if (inRate == NTV2_AUDIO_96K)
215  rateLow = 1;
216  else if (inRate == NTV2_AUDIO_192K)
217  rateHigh = 1;
218 
219  status = WriteRegister (gAudioSystemToAudioControlRegNum [inAudioSystem], rateLow, kRegMaskAudioRate, kRegShiftAudioRate);
220  status &= WriteRegister (kRegAudioControl2, rateHigh, gAudioRateHighMask [inAudioSystem], gAudioRateHighShift [inAudioSystem]);
221 
222  return status;
223 }
224 
225 
226 bool CNTV2Card::GetAudioRate (NTV2AudioRate & outRate, const NTV2AudioSystem inAudioSystem)
227 {
228  ULWord rateLow (0);
229  ULWord rateHigh (0);
230  bool status;
231 
232  status = ReadRegister (gAudioSystemToAudioControlRegNum [inAudioSystem], rateLow, kRegMaskAudioRate, kRegShiftAudioRate);
233  status &= ReadRegister (kRegAudioControl2, rateHigh, gAudioRateHighMask [inAudioSystem], gAudioRateHighShift [inAudioSystem]);
234  if (status)
235  {
236  if ((rateLow == 0) && (rateHigh == 0))
237  outRate = NTV2_AUDIO_48K;
238  else if ((rateLow == 1) && (rateHigh == 0))
239  outRate = NTV2_AUDIO_96K;
240  else if ((rateLow == 0) && (rateHigh == 1))
241  outRate = NTV2_AUDIO_192K;
242  else
243  status = false;
244  }
245  return status;
246 }
247 
248 
249 bool CNTV2Card::SetAudioBufferSize (const NTV2AudioBufferSize inValue, const NTV2AudioSystem inAudioSystem)
250 {
251  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
252  return false;
253  if (inValue != NTV2_AUDIO_BUFFER_SIZE_4MB && IsSupported(kDeviceCanDoStackedAudio))
254  return false; // Stacked audio devices are fixed at 4MB
255  return WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inValue, kK2RegMaskAudioBufferSize, kK2RegShiftAudioBufferSize);
256 }
257 
258 bool CNTV2Card::SetAudioBufferSize (const NTV2AudioBufferSize inMode, const NTV2AudioSystemSet & inAudioSystems)
259 {
260  size_t numFailures(0);
261  for (NTV2AudioSystemSetConstIter it(inAudioSystems.begin()); it != inAudioSystems.end(); ++it)
262  if (!SetAudioBufferSize (inMode, *it))
263  numFailures++;
264  return numFailures == 0;
265 }
266 
267 
269 {
270  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
271  return false;
272  outSize = NTV2_AUDIO_BUFFER_SIZE_4MB; // NTV2 has standardized on 4MB audio buffers
273  if (IsSupported(kDeviceCanDoStackedAudio))
274  return true; // Done!
275 
277 }
278 
279 
280 bool CNTV2Card::SetAudioAnalogLevel (const NTV2AudioLevel inLevel, const NTV2AudioSystem inAudioSystem)
281 {
282  (void)inAudioSystem;
283  if (IsBreakoutBoardConnected())
285  else
286  return WriteRegister (kRegAud1Control, inLevel, kFS1RegMaskAudioLevel, kFS1RegShiftAudioLevel);
287 }
288 
289 
290 bool CNTV2Card::GetAudioAnalogLevel (NTV2AudioLevel & outLevel, const NTV2AudioSystem inAudioSystem)
291 {
292  (void)inAudioSystem;
293  if (IsBreakoutBoardConnected())
295  else
297 }
298 
299 
300 bool CNTV2Card::SetAudioLoopBack (const NTV2AudioLoopBack inValue, const NTV2AudioSystem inAudioSystem)
301 {
302  if (!NTV2_IS_VALID_AUDIO_LOOPBACK(inValue))
303  return false;
304  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
305  return false;
306  if (inValue == NTV2_AUDIO_LOOPBACK_ON)
307  SetEmbeddedAudioClock (NTV2_EMBEDDED_AUDIO_CLOCK_REFERENCE, inAudioSystem); // Use board reference as audio clock
308  return WriteRegister (gAudioSystemToAudioControlRegNum [inAudioSystem], inValue, kRegMaskLoopBack, kRegShiftLoopBack);
309 }
310 
311 bool CNTV2Card::SetAudioLoopBack (const NTV2AudioLoopBack inMode, const NTV2AudioSystemSet & inAudioSystems)
312 {
313  size_t numFailures(0);
314  for (NTV2AudioSystemSetConstIter it(inAudioSystems.begin()); it != inAudioSystems.end(); ++it)
315  if (!SetAudioLoopBack (inMode, *it))
316  numFailures++;
317  return numFailures == 0;
318 }
319 
320 
321 bool CNTV2Card::GetAudioLoopBack (NTV2AudioLoopBack & outValue, const NTV2AudioSystem inAudioSystem)
322 {
323  outValue = NTV2_AUDIO_LOOPBACK_INVALID;
324  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
325  return false;
327 }
328 
329 
331 {
332  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
333  return false;
334  return WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inMode, kRegMaskEncodedAudioMode, kRegShiftEncodedAudioMode);
335 }
336 
337 
339 {
340  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
341  return false;
343 }
344 
345 
346 bool CNTV2Card::SetEmbeddedAudioInput (const NTV2EmbeddedAudioInput inAudioInput, const NTV2AudioSystem inAudioSystem)
347 {
348  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
349  return false;
350  const ULWord regAudSource (gAudioSystemToSrcSelectRegNum [inAudioSystem]);
351  const ULWord numInputs (GetNumSupported(kDeviceGetNumVideoInputs));
352  const ULWord numHDMI (GetNumSupported(kDeviceGetNumHDMIVideoInputs));
353  bool status (false);
354  ULWord value1 (0);
355  ULWord value2 (0);
356 
357  switch (inAudioInput)
358  { // Sparse bits
359  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1: value1 = 0x0; value2 = 0x0; break;
360  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_2: value1 = 0x1; value2 = 0x0; break;
361  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_3: value1 = 0x0; value2 = 0x1; break;
362  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4: value1 = 0x1; value2 = 0x1; break;
363  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_5: value1 = 0x0; value2 = 0x0; break;
364  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_6: value1 = 0x1; value2 = 0x0; break;
365  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_7: value1 = 0x0; value2 = 0x1; break;
366  case NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_8: value1 = 0x1; value2 = 0x1; break;
367  default: return false;
368  }
369 
370  status = WriteRegister (regAudSource, value1, kRegMaskEmbeddedAudioInput, kRegShiftEmbeddedAudioInput);
371  if (numInputs > 2 || inAudioInput > NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4 || numHDMI > 1)
372  status = WriteRegister (regAudSource, value2, kRegMaskEmbeddedAudioInput2, kRegShiftEmbeddedAudioInput2);
373  return status;
374 }
375 
376 
378 {
379  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
380  return false;
381  const ULWord srcSelectReg (gAudioSystemToSrcSelectRegNum [inAudioSystem]);
382  const ULWord numInputs (GetNumSupported(kDeviceGetNumVideoInputs));
383  ULWord value (0);
384  bool status (false);
385 
386  if (numInputs <= 2)
387  status = ReadRegister (srcSelectReg, value, kRegMaskEmbeddedAudioInput, kRegShiftEmbeddedAudioInput);
388  else
389  {
390  ULWord sparse1(0), sparse2(0); // Sparse bits
391  status = ReadRegister (srcSelectReg, sparse1, kRegMaskEmbeddedAudioInput, kRegShiftEmbeddedAudioInput)
392  && ReadRegister (srcSelectReg, sparse2, kRegMaskEmbeddedAudioInput2, kRegShiftEmbeddedAudioInput2);
393  if (!sparse1 && !sparse2)
395  else if (sparse1 && !sparse2)
397  else if (!sparse1 && sparse2)
399  else if (sparse1 && sparse2)
401 
402  if (inAudioSystem >= NTV2_AUDIOSYSTEM_5)
403  switch (value)
404  {
409  }
410  }
411  if (status)
412  outAudioInput = NTV2EmbeddedAudioInput(value);
413  return status;
414 }
415 
416 
418 {
419  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
420  return false;
421  return WriteRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], inValue, kRegMaskEmbeddedAudioClock, kRegShiftEmbeddedAudioClock);
422 }
423 
424 
426 {
427  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
428  return false;
430 }
431 
432 
433 bool CNTV2Card::GetAudioWrapAddress (ULWord & outWrapAddress, const NTV2AudioSystem inAudioSystem)
434 {
436  if (!GetAudioBufferSize (bufferSize, inAudioSystem))
437  return false;
438 
439  switch (bufferSize)
440  {
441  case NTV2_AUDIO_BUFFER_SIZE_1MB: outWrapAddress = NTV2_AUDIO_WRAPADDRESS; break; // (0x000FF000 * 1)
442  case NTV2_AUDIO_BUFFER_SIZE_4MB: outWrapAddress = NTV2_AUDIO_WRAPADDRESS_BIG; break; // (0x000FF000 * 4)
443  default: outWrapAddress = NTV2_AUDIO_WRAPADDRESS; break;
444  }
445  return true;
446 }
447 
448 
449 bool CNTV2Card::GetAudioReadOffset (ULWord & outReadOffset, const NTV2AudioSystem inAudioSystem)
450 {
452  if (!GetAudioBufferSize (bufferSize, inAudioSystem))
453  return false;
454 
455  switch (bufferSize)
456  {
457  case NTV2_AUDIO_BUFFER_SIZE_1MB: outReadOffset = NTV2_AUDIO_READBUFFEROFFSET; break; // (0x00100000 * 1) 1MB
458  case NTV2_AUDIO_BUFFER_SIZE_4MB: outReadOffset = NTV2_AUDIO_READBUFFEROFFSET_BIG; break; // (0x00100000 * 4) 4MB
459  default: outReadOffset = NTV2_AUDIO_READBUFFEROFFSET; break; // (0x00100000 * 1) 1MB
460  }
461  return true;
462 }
463 
464 
465 bool CNTV2Card::ReadAudioLastIn (ULWord & outValue, const NTV2AudioSystem inAudioSystem)
466 {
467  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
468  return false;
469  return ReadRegister (gChannelToAudioInLastAddrRegNum[inAudioSystem], outValue);
470 }
471 
472 bool CNTV2Card::ReadAudioLastOut (ULWord & outValue, const NTV2AudioSystem inAudioSystem)
473 {
474  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
475  return false;
476  return ReadRegister (gChannelToAudioOutLastAddrRegNum[inAudioSystem], outValue);
477 }
478 
479 #if !defined(NTV2_DEPRECATE_16_0)
480  bool CNTV2Card::ReadAudioSource (ULWord & outValue, const NTV2Channel inChannel) {return ReadRegister(gAudioSystemToSrcSelectRegNum[inChannel], outValue);}
481  bool CNTV2Card::WriteAudioSource (const ULWord inValue, const NTV2Channel inChannel) {return WriteRegister(gAudioSystemToSrcSelectRegNum[inChannel], inValue);}
482 #endif // !defined(NTV2_DEPRECATE_16_0)
483 
484 
485 bool CNTV2Card::SetAudioSystemInputSource (const NTV2AudioSystem inAudioSystem, const NTV2AudioSource inAudioSource, const NTV2EmbeddedAudioInput inEmbeddedSource)
486 {
487  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
488  return false;
489  bool result(false);
490  static const ULWord sAudioSourceToRegValues [] = { 0x1, // NTV2_AUDIO_EMBEDDED
491  0x0, // NTV2_AUDIO_AES
492  0x9, // NTV2_AUDIO_ANALOG
493  0xA, // NTV2_AUDIO_HDMI
494  0xB}; // NTV2_AUDIO_MIC
495 
496  if (ULWord(inAudioSystem) < GetNumSupported(kDeviceGetTotalNumAudioSystems))
497  if (NTV2_IS_VALID_AUDIO_SOURCE(inAudioSource))
498  result = WriteRegister (gAudioSystemToSrcSelectRegNum [inAudioSystem],
499  sAudioSourceToRegValues [inAudioSource],
501  if (result)
502  {
503  if ((inAudioSource == NTV2_AUDIO_EMBEDDED) || (inAudioSource == NTV2_AUDIO_HDMI))
504  if (SetEmbeddedAudioInput (inEmbeddedSource, inAudioSystem)) // Use the specified input for grabbing embedded audio
505  result = SetEmbeddedAudioClock (NTV2_EMBEDDED_AUDIO_CLOCK_VIDEO_INPUT, inAudioSystem); // Use video input clock (not reference)
506 
507  if (NTV2DeviceCanDoBreakoutBoard(_boardID))
508  {
509  if(IsBreakoutBoardConnected() && inAudioSource == NTV2_AUDIO_ANALOG)
510  result = EnableBOBAnalogAudioIn(true);
511  else
512  result = EnableBOBAnalogAudioIn(false);
513  }
514  }
515  return result;
516 
517 } // SetAudioSystemInputSource
518 
519 
520 bool CNTV2Card::GetAudioSystemInputSource (const NTV2AudioSystem inAudioSystem, NTV2AudioSource & outAudioSource, NTV2EmbeddedAudioInput & outEmbeddedSource)
521 {
522  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
523  return false;
524  ULWord regValue (0);
525 
526  outAudioSource = NTV2_AUDIO_SOURCE_INVALID;
527  outEmbeddedSource = NTV2_EMBEDDED_AUDIO_INPUT_INVALID;
528 
529  if (ULWord(inAudioSystem) >= GetNumSupported(kDeviceGetTotalNumAudioSystems))
530  return false; // Invalid audio system
531  if (!ReadRegister (gAudioSystemToSrcSelectRegNum [inAudioSystem], regValue, kRegMaskAudioSource, kRegShiftAudioSource))
532  return false;
533  switch (regValue & 0x0000000F)
534  {
535  case 0x1: outAudioSource = NTV2_AUDIO_EMBEDDED; break;
536  case 0x0: outAudioSource = NTV2_AUDIO_AES; break;
537  case 0x9: outAudioSource = NTV2_AUDIO_ANALOG; break;
538  case 0xA: outAudioSource = NTV2_AUDIO_HDMI; break;
539  case 0xB: outAudioSource = NTV2_AUDIO_MIC; break;
540  default: return false;
541  }
542 
543  if (outAudioSource == NTV2_AUDIO_EMBEDDED)
544  GetEmbeddedAudioInput(outEmbeddedSource, inAudioSystem);
545  return true;
546 
547 }
548 
549 
552 
553 
555 {
556  outAudioSystem = NTV2_AUDIOSYSTEM_INVALID;
557  if (!IsSupported(kDeviceCanDoAudioMixer))
558  return false; // No Audio Mixer -- shouldn't be calling this function
559  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
560  return false; // Bad Mixer Input specified
562  sAudioMixerInputSelectMasks[inMixerInput],
563  sAudioMixerInputSelectShifts[inMixerInput]);
564 }
565 
567 {
568  if (!IsSupported(kDeviceCanDoAudioMixer))
569  return false; // No Audio Mixer -- shouldn't be calling this function
570  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
571  return false; // Bad Mixer Input specified
572  if (ULWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumAudioSystems) + 1)
573  return false; // No such audio system on this device
574  return WriteRegister (kRegAudioMixerInputSelects, ULWord(inAudioSystem),
575  sAudioMixerInputSelectMasks[inMixerInput],
576  sAudioMixerInputSelectShifts[inMixerInput]);
577 }
578 
580 {
581  outChannelPair = NTV2_AUDIO_CHANNEL_PAIR_INVALID;
582  if (!IsSupported(kDeviceCanDoAudioMixer))
583  return false; // No Audio Mixer -- shouldn't be calling this function
584  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
585  return false; // Bad Mixer Input specified
586  if (NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
590  outChannelPair = NTV2_AudioChannel1_2; // Aux1/Aux2 always use 1&2
591  return true;
592 }
593 
595 {
596  if (!IsSupported(kDeviceCanDoAudioMixer))
597  return false; // No Audio Mixer -- shouldn't be calling this function
598  if (!NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
599  return false; // Can only change Main channel selection
600  if (!NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16(inChannelPair))
601  return false; // Only audio channels 1 thru 16 allowed
602  return WriteRegister (kRegAudioMixerChannelSelect, ULWord(inChannelPair),
604 }
605 
608 
609 bool CNTV2Card::GetAudioMixerInputGain (const NTV2AudioMixerInput inMixerInput, const NTV2AudioMixerChannel inChannel, ULWord & outGainValue)
610 {
611  outGainValue = 0;
612  if (!IsSupported(kDeviceCanDoAudioMixer))
613  return false; // No Audio Mixer -- shouldn't be calling this function
614  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
615  return false; // Bad Mixer Input specified
616  if (!NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2(inChannel))
617  return false; // Bad audio channel specified -- must be Ch1 or Ch2
618  return ReadRegister (inChannel == NTV2_AudioMixerChannel1
619  ? sAudioMixerInputGainCh1Regs[inMixerInput]
620  : sAudioMixerInputGainCh2Regs[inMixerInput], outGainValue);
621 }
622 
623 bool CNTV2Card::SetAudioMixerInputGain (const NTV2AudioMixerInput inMixerInput, const NTV2AudioMixerChannel inChannel, const ULWord inGainValue)
624 {
625  if (!IsSupported(kDeviceCanDoAudioMixer))
626  return false; // No Audio Mixer -- shouldn't be calling this function
627  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
628  return false; // Bad Mixer Input specified
629  if (!NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2(inChannel))
630  return false; // Bad audio channel specified -- must be Ch1 or Ch2
631  return WriteRegister(inChannel == NTV2_AudioMixerChannel1
632  ? sAudioMixerInputGainCh1Regs[inMixerInput]
633  : sAudioMixerInputGainCh2Regs[inMixerInput], inGainValue);
634 }
635 
637 {
638  outGainValue = 0;
639  if (!IsSupported(kDeviceCanDoAudioMixer))
640  return false; // No Audio Mixer -- shouldn't be calling this function
641  return ReadRegister (kRegAudioMixerOutGain, outGainValue);
642 }
643 
645 {
646  if (!IsSupported(kDeviceCanDoAudioMixer))
647  return false; // No Audio Mixer -- shouldn't be calling this function
648  WriteRegister(kRegAudioMixerOutLGain, inGainValue);
649  return WriteRegister(kRegAudioMixerOutRGain, inGainValue);
650 }
651 
653  vector<uint32_t> & outLevels)
654 {
659  outLevels.clear();
660  if (!IsSupported(kDeviceCanDoAudioMixer))
661  return false;
662 
663  // If caller specified empty channelPairs set, do "all" possible pairs...
664  NTV2AudioChannelPairs chanPairs;
665  if (inChannelPairs.empty())
666  {
668  chanPairs.insert(chPr); // Main supports Ch 1-16
669  }
670  else
671  chanPairs = inChannelPairs; // Non-empty set: do what the caller requested
672 
673  // Build a bulk register read...
674  NTV2RegisterReads regs;
675  std::set<ULWord> regsToRead;
676  for (NTV2AudioChannelPairsConstIter it(chanPairs.begin()); it != chanPairs.end(); ++it)
677  {
678  const NTV2AudioChannelPair chanPair(*it);
680  return false;
681  uint32_t regNum(gAudMxrMainOutLvlRegs[chanPair]);
682  regsToRead.insert(regNum);
683  } // for each audio channel pair
684  for (std::set<ULWord>::const_iterator it(regsToRead.begin()); it != regsToRead.end(); ++it)
685  regs.push_back(NTV2RegInfo(*it));
686 
687  // Read the level registers...
688  const bool result(ReadRegisters(regs));
689  if (result)
690  for (NTV2RegisterReadsConstIter it(regs.begin()); it != regs.end(); ++it)
691  {
692  ULWord rawLevels(it->IsValid() ? it->registerValue : 0);
693  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputLeftLevel) >> kRegShiftAudioMixerInputLeftLevel));
694  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputRightLevel) >> kRegShiftAudioMixerInputRightLevel));
695  }
696  else
697  while (outLevels.size() < chanPairs.size() * 2)
698  outLevels.push_back(0);
699  return result;
700 }
701 
703 {
704  outGainValue = 0;
705  if (!NTV2DeviceHasRotaryEncoder(GetDeviceID()))
706  return false; // No Audio Mixer -- shouldn't be calling this function
707  return ReadRegister (kRegRotaryEncoder, outGainValue, kRegMaskRotaryEncoderGain, kRegShiftRotaryEncoderGain);
708 }
709 
711 {
712  if (!NTV2DeviceHasRotaryEncoder(GetDeviceID()))
713  return false; // No Audio Mixer -- shouldn't be calling this function
714  return WriteRegister(kRegRotaryEncoder, inGainValue, kRegMaskRotaryEncoderGain, kRegShiftRotaryEncoderGain);
715 }
716 
719 
721 {
722  outMutes.reset();
723  if (!IsSupported(kDeviceCanDoAudioMixer))
724  return false; // No Audio Mixer -- shouldn't be calling this function
725  unsigned long ulongvalue(0);
727  return false;
728  outMutes = NTV2AudioChannelsMuted16(ulongvalue); // Hardware uses 1=mute 0=enabled
729  return true;
730 }
731 
733 {
734  if (!IsSupported(kDeviceCanDoAudioMixer))
735  return false; // No Audio Mixer -- shouldn't be calling this function
737 }
738 
740 {
741  outMutes.reset();
742  if (!IsSupported(kDeviceCanDoAudioMixer))
743  return false; // No Audio Mixer -- shouldn't be calling this function
744  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
745  return false; // Bad Mixer Input specified
746  ULWord muteBits(0);
747  if (!ReadRegister(kRegAudioMixerMutes, muteBits, sAudioMixerInputMuteMasks[inMixerInput], sAudioMixerInputMuteShifts[inMixerInput]))
748  return false;
749  outMutes = NTV2AudioChannelsMuted16(muteBits);
750  return true;
751 }
752 
754 {
755  if (!IsSupported(kDeviceCanDoAudioMixer))
756  return false; // No Audio Mixer -- shouldn't be calling this function
757  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
758  return false; // Bad Mixer Input specified
759  const ULWord muteBits(ULWord(inMutes.to_ulong()));
760  return WriteRegister (kRegAudioMixerMutes, muteBits, sAudioMixerInputMuteMasks[inMixerInput], sAudioMixerInputMuteShifts[inMixerInput]);
761 }
762 
763 
765  const NTV2AudioChannelPairs & inChannelPairs,
766  vector<uint32_t> & outLevels)
767 {
772  outLevels.clear();
773  if (!IsSupported(kDeviceCanDoAudioMixer))
774  return false;
775  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
776  return false;
777 
778  // If caller specified empty channelPairs set, do "all" possible pairs...
779  NTV2AudioChannelPairs chanPairs;
780  if (inChannelPairs.empty())
781  {
782  if (!NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
783  chanPairs.insert(NTV2_AudioChannel1_2); // Aux1/Aux2 only support Ch1&2
784  else
786  chanPairs.insert(chPr); // Main supports Ch 1-16
787  }
788  else
789  chanPairs = inChannelPairs; // Non-empty set: do what the caller requested
790 
791  // Build a bulk register read...
792  NTV2RegisterReads regs;
793  std::set<ULWord> regsToRead;
794  for (NTV2AudioChannelPairsConstIter it(chanPairs.begin()); it != chanPairs.end(); ++it)
795  {
796  const NTV2AudioChannelPair chanPair(*it);
798  return false;
799  uint32_t regNum(gAudMxrMainInLvlRegs[chanPair]);
800  if (!NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
801  {
802  if (chanPair != NTV2_AudioChannel1_2)
803  return false; // Aux1 & Aux2 can only report Chan 1&2 levels
804  regNum = (inMixerInput == NTV2_AudioMixerInputAux1)
807  }
808  regsToRead.insert(regNum);
809  } // for each audio channel pair
810  for (std::set<ULWord>::const_iterator it(regsToRead.begin()); it != regsToRead.end(); ++it)
811  regs.push_back(NTV2RegInfo(*it));
812 
813  // Read the level registers...
814  const bool result(ReadRegisters(regs));
815  if (result)
816  for (NTV2RegisterReadsConstIter it(regs.begin()); it != regs.end(); ++it)
817  {
818  ULWord rawLevels(it->IsValid() ? it->registerValue : 0);
819  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputLeftLevel) >> kRegShiftAudioMixerInputLeftLevel));
820  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputRightLevel) >> kRegShiftAudioMixerInputRightLevel));
821  }
822  else
823  while (outLevels.size() < chanPairs.size() * 2)
824  outLevels.push_back(0);
825  return result;
826 }
827 
829 {
830  outSampleCount = 0;
832  return false;
833  outSampleCount = 1 << outSampleCount;
834  return true;
835 }
836 
838 {
839  if (!inSampleCount)
840  return false; // Must be > 0
841  if (inSampleCount > 0x00008000)
842  return false; // Must be <= 0x8000
843  ULWord result(0), sampleCount(inSampleCount);
844  while (sampleCount >>= 1)
845  ++result;
847 }
848 
849 
850 
852 {
854 }
855 
856 
858 {
860 }
861 
862 
864 {
865  if (!NTV2_IS_VALID_AUDIO_CHANNEL_PAIR (inValue))
866  return false;
867 
868  if(NTV2DeviceGetHDMIVersion(GetDeviceID()) > 3)
869  {
871  ULWord channelSelect = static_cast<ULWord>(inValue) % 4;
875  return SetHDMIOutAudioChannels(NTV2_HDMIAudio2Channels);
876  }
877  else
878  {
879  const ULWord encoding ((ULWord (inAudioSystem) << 4) | inValue);
881  }
882 }
883 
884 
886 {
887  bool result = false;
888  if(NTV2DeviceGetHDMIVersion(GetDeviceID()) > 3)
889  {
890  ULWord engineSelect (0), channelSelect(0), bankSelect(0);
892  if (result)
893  {
894  outAudioSystem = NTV2AudioSystem(engineSelect);
897  outValue = NTV2AudioChannelPair((bankSelect == 0 ? 0 : 4) + channelSelect);
898  }
899  }
900  else
901  {
902  ULWord encoding (0);
904  if (result)
905  {
906  outValue = NTV2AudioChannelPair(encoding & 0x7);
907  outAudioSystem = NTV2AudioSystem(encoding >> 4);
908  }
909  }
910  return result;
911 }
912 
913 
915 {
916  if (!NTV2_IS_VALID_AUDIO_CHANNEL_OCTET (inValue))
917  return false;
918 
919  if(NTV2DeviceGetHDMIVersion(GetDeviceID()) > 3)
920  {
924  return SetHDMIOutAudioChannels(NTV2_HDMIAudio8Channels);
925  }
926  else
927  {
928  ULWord encoding (0);
929  ULWord ch (ULWord (inAudioSystem) << 2);
930  if (inValue == NTV2_AudioChannel1_8)
931  encoding = (ch + NTV2_AudioChannel1_4) | ((ch + NTV2_AudioChannel5_8) << 4);
932  else
933  encoding = (ch + NTV2_AudioChannel9_12) | ((ch + NTV2_AudioChannel13_16) << 4);
934 
936  }
937 }
938 
939 
941 {
942  bool result = false;
943  if(NTV2DeviceGetHDMIVersion(GetDeviceID()) > 3)
944  {
945  ULWord engineSelect (0), channelSelect(0);
947  if (result)
948  {
949  outValue = channelSelect == 1 ? NTV2_AudioChannel9_16 : NTV2_AudioChannel1_8;
951  outAudioSystem = static_cast <NTV2AudioSystem> (engineSelect);
952  }
953  }
954  else
955  {
956  ULWord encoding (0);
958  if (result)
959  {
960  if ((encoding & 0x3) == static_cast <ULWord> (NTV2_AudioChannel1_4))
961  outValue = NTV2_AudioChannel1_8;
962  else
963  outValue = NTV2_AudioChannel9_16;
964 
965  outAudioSystem = static_cast <NTV2AudioSystem> ((encoding & 0xC) >> 2);
966  }
967  }
968  return result;
969 }
970 
971 
973 {
974  return WriteRegister (kRegHDMIInputControl, static_cast <ULWord> (inNewValue), kRegMaskHDMIOutAudioRate, kRegShiftHDMIOutAudioRate);
975 }
976 
977 
979 {
981 }
982 
983 
985 {
986  return WriteRegister (kRegHDMIOutControl, static_cast <ULWord> (inNewValue), kRegMaskHDMIOutAudioFormat, kRegShiftHDMIOutAudioFormat);
987 }
988 
989 
991 {
993 }
994 
995 
996 bool CNTV2Card::SetAudioOutputMonitorSource (const NTV2AudioChannelPair inChannelPair, const NTV2AudioSystem inAudioSystem)
997 {
998  if (!NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16(inChannelPair))
999  return false;
1000  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1001  return false;
1002  const ULWord encoding ((ULWord(inAudioSystem) << 4) | inChannelPair);
1003  return WriteRegister (kRegAudioOutputSourceMap, encoding, kRegMaskMonitorSource, kRegShiftMonitorSource);
1004 }
1005 
1006 
1008 {
1009  ULWord encoding (0);
1010  bool result = ReadRegister (kRegAudioOutputSourceMap, encoding, kRegMaskMonitorSource, kRegShiftMonitorSource);
1011  if (result)
1012  {
1013  outChannelPair = NTV2AudioChannelPair(encoding & 0xF);
1014  outAudioSystem = NTV2AudioSystem(encoding >> 4);
1015  }
1016  return result;
1017 }
1018 
1019 bool CNTV2Card::StartAudioOutput (const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI)
1020 {
1021  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1022  return false; // Bad AudioSystem
1023  const ULWord audioCtrlRegNum(gAudioSystemToAudioControlRegNum[inAudioSystem]);
1024  if (inWaitForVBI)
1025  {
1026  if (!IsSupported(kDeviceAudioCanWaitForVBI))
1027  return false; // Caller requested wait-til-VBI, but firmware doesn't support it
1028  // Set or clear the start-at-VBI bit...
1029  if (!WriteRegister(audioCtrlRegNum, inWaitForVBI ? 1UL : 0UL, kRegMaskOutputStartAtVBI, kRegShiftOutputStartAtVBI))
1030  return false;
1031  }
1032  if (!WriteRegister (audioCtrlRegNum, 0, kRegMaskResetAudioOutput, kRegShiftResetAudioOutput))
1033  return false;
1034 #if 1
1035  // Now that this audio system is reading from SDRAM, see if its buffer is colliding with other device SDRAM activity...
1036  ULWordSequence badRgns;
1037  SDRAMAuditor auditor;
1038  auditor.AssessDevice(*this, /*ignoreStoppedAudioSystemBuffers*/true); // Only care about running audio systems
1039  auditor.GetBadRegions(badRgns); // Receive the interfering memory regions
1040  for (size_t ndx(0); ndx < badRgns.size(); ndx++)
1041  { const ULWord rgnInfo(badRgns.at(ndx));
1042  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
1043  NTV2StringSet tags;
1044  auditor.GetTagsForFrameIndex (startBlk, tags);
1045  const string infoStr (aja::join(tags, ", "));
1046  ostringstream acLabel; acLabel << "Aud" << DEC(inAudioSystem+1); // Search for label e.g. "Aud2"
1047  if (infoStr.find(acLabel.str()) != string::npos)
1048  { ostringstream warning;
1049  if (numBlks > 1)
1050  warning << "8MB Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3);
1051  else
1052  warning << "8MB Frm " << DEC0N(startBlk,3);
1053  AUDWARN("Aud" << DEC(inAudioSystem+1) << " memory overlap/interference: " << warning.str() << ": " << infoStr);
1054  }
1055  } // for each "bad" region
1056 #endif
1057  return true;
1058 } // StartAudioOutput
1059 
1061 {
1062  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1064 }
1065 
1066 bool CNTV2Card::IsAudioOutputRunning (const NTV2AudioSystem inAudioSystem, bool & outIsRunning)
1067 {
1068  bool isStopped (true);
1069  bool result (inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1072  if (result)
1073  outIsRunning = !isStopped;
1074  return result;
1075 }
1076 
1077 
1078 bool CNTV2Card::SetAudio20BitMode (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1079 {
1080  return IsSupported(kDeviceCanDoIP)
1081  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1082  && WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMask20BitMode, kRegShift20BitMode);
1083 }
1084 
1085 
1086 bool CNTV2Card::GetAudio20BitMode (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1087 {
1088  return IsSupported(kDeviceCanDoIP)
1089  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1091 }
1092 
1093 
1094 bool CNTV2Card::SetAudioOutputPause (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1095 {
1096  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1097  && WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMaskPauseAudio, kRegShiftPauseAudio);
1098 }
1099 
1100 
1101 bool CNTV2Card::GetAudioOutputPause (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1102 {
1103  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1105 }
1106 
1107 
1108 bool CNTV2Card::StartAudioInput (const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI)
1109 {
1110  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1111  return false; // Bad AudioSystem
1112  const ULWord audioCtrlRegNum(gAudioSystemToAudioControlRegNum[inAudioSystem]);
1113  if (inWaitForVBI)
1114  {
1115  if (!IsSupported(kDeviceAudioCanWaitForVBI))
1116  return false; // Caller requested wait-til-VBI, but firmware doesn't support it
1117  // Set or clear the start-at-VBI bit...
1118  if (!WriteRegister(audioCtrlRegNum, inWaitForVBI ? 1UL : 0UL, kRegMaskInputStartAtVBI, kRegShiftInputStartAtVBI))
1119  return false;
1120  }
1121  if (!WriteRegister (audioCtrlRegNum, 0, kRegMaskResetAudioInput, kRegShiftResetAudioInput))
1122  return false;
1123 #if 1
1124  // Now that this audio system is writing into SDRAM, see if its buffer is colliding with other device SDRAM activity...
1125  ULWordSequence badRgns;
1126  SDRAMAuditor auditor;
1127  auditor.AssessDevice(*this, /*ignoreStoppedAudioSystemBuffers*/true); // Only care about running audio systems
1128  auditor.GetBadRegions(badRgns); // Receive the interfering memory regions
1129  for (size_t ndx(0); ndx < badRgns.size(); ndx++)
1130  { const ULWord rgnInfo(badRgns.at(ndx));
1131  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
1132  NTV2StringSet tags;
1133  auditor.GetTagsForFrameIndex (startBlk, tags);
1134  const string infoStr (aja::join(tags, ", "));
1135  ostringstream acLabel; acLabel << "Aud" << DEC(inAudioSystem+1); // Search for label e.g. "Aud2"
1136  if (infoStr.find(acLabel.str()) != string::npos)
1137  { ostringstream warning;
1138  if (numBlks > 1)
1139  warning << "8MB Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3);
1140  else
1141  warning << "8MB Frm " << DEC0N(startBlk,3);
1142  AUDWARN("Aud" << DEC(inAudioSystem+1) << " memory overlap/interference: " << warning.str() << ": " << infoStr);
1143  }
1144  } // for each "bad" region
1145 #endif
1146  return true;
1147 } // StartAudioInput
1148 
1149 
1150 bool CNTV2Card::StopAudioInput (const NTV2AudioSystem inAudioSystem)
1151 {
1152  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1154 }
1155 
1156 
1157 bool CNTV2Card::IsAudioInputRunning (const NTV2AudioSystem inAudioSystem, bool & outIsRunning)
1158 {
1159  bool isStopped (true);
1160  bool result (inAudioSystem < NTV2_NUM_AUDIOSYSTEMS &&
1163  if (result)
1164  outIsRunning = !isStopped;
1165  return result;
1166 }
1167 
1168 
1169 bool CNTV2Card::SetAudioCaptureEnable (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1170 {
1171  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1172  && WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMaskCaptureEnable, kRegShiftCaptureEnable);
1173 }
1174 
1175 
1176 bool CNTV2Card::GetAudioCaptureEnable (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1177 {
1178  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1180 }
1181 
1182 
1183 bool CNTV2Card::SetAudioPlayCaptureModeEnable (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1184 {
1185  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1186  && WriteRegister (kRegGlobalControl2, inEnable ? 1 : 0, gAudioPlayCaptureModeMasks[inAudioSystem], gAudioPlayCaptureModeShifts[inAudioSystem]);
1187 }
1188 
1189 
1190 bool CNTV2Card::GetAudioPlayCaptureModeEnable (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1191 {
1192  outEnable = false;
1193  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1195 }
1196 
1197 
1198 bool CNTV2Card::SetAudioInputDelay (const NTV2AudioSystem inAudioSystem, const ULWord inDelay)
1199 {
1200  return IsSupported(kDeviceCanDoAudioDelay)
1201  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1202  && WriteRegister (gAudioDelayRegisterNumbers [inAudioSystem], inDelay, kRegMaskAudioInDelay, kRegShiftAudioInDelay);
1203 }
1204 
1205 
1206 bool CNTV2Card::GetAudioInputDelay (const NTV2AudioSystem inAudioSystem, ULWord & outDelay)
1207 {
1208  return IsSupported(kDeviceCanDoAudioDelay)
1209  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1210  && ReadRegister (gAudioDelayRegisterNumbers[inAudioSystem], outDelay, kRegMaskAudioInDelay, kRegShiftAudioInDelay);
1211 }
1212 
1213 
1214 bool CNTV2Card::SetAudioOutputDelay (const NTV2AudioSystem inAudioSystem, const ULWord inDelay)
1215 {
1216  return IsSupported(kDeviceCanDoAudioDelay)
1217  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1218  && WriteRegister (gAudioDelayRegisterNumbers[inAudioSystem], inDelay, kRegMaskAudioOutDelay, kRegShiftAudioOutDelay);
1219 }
1220 
1221 
1222 bool CNTV2Card::GetAudioOutputDelay (const NTV2AudioSystem inAudioSystem, ULWord & outDelay)
1223 {
1224  return IsSupported(kDeviceCanDoAudioDelay)
1225  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1226  && ReadRegister (gAudioDelayRegisterNumbers[inAudioSystem], outDelay, kRegMaskAudioOutDelay, kRegShiftAudioOutDelay);
1227 }
1228 
1229 
1230 bool CNTV2Card::SetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const bool inNonPCM)
1231 {
1232  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1233  && WriteRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], inNonPCM ? 1 : 0, BIT(17), 17);
1234 }
1235 
1236 
1237 bool CNTV2Card::GetAudioPCMControl (const NTV2AudioSystem inAudioSystem, bool & outIsNonPCM)
1238 {
1239  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1240  && CNTV2DriverInterface::ReadRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], outIsNonPCM, BIT(17), 17);
1241 }
1242 
1243 
1244 bool CNTV2Card::SetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelSelect, bool inNonPCM)
1245 {
1246  return IsSupported(kDeviceCanDoPCMControl)
1247  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1248  && NTV2_IS_VALID_AUDIO_CHANNEL_PAIR(inChannelSelect)
1249  && WriteRegister(gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlReg,
1250  inNonPCM ? 1 : 0,
1251  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlMask,
1252  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlShift);
1253 }
1254 
1255 
1256 bool CNTV2Card::SetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPairs & inNonPCMChannelPairs)
1257 {
1258  if (!IsSupported(kDeviceCanDoPCMControl) || inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1259  return false;
1260 
1261  bool result (true);
1262  for (NTV2AudioChannelPair chanPair (NTV2_AudioChannel1_2); NTV2_IS_VALID_AUDIO_CHANNEL_PAIR (chanPair); chanPair = NTV2AudioChannelPair (chanPair + 1))
1263  {
1264  if (NTV2_IS_EXTENDED_AUDIO_CHANNEL_PAIR (chanPair))
1265  break; // Extended audio channels not yet supported
1266 
1267  const bool isNonPCM (inNonPCMChannelPairs.find (chanPair) != inNonPCMChannelPairs.end ());
1268  result = WriteRegister (gAudioEngineChannelPairToFieldInformation[inAudioSystem][chanPair].pcmControlReg, isNonPCM ? 1 : 0,
1269  gAudioEngineChannelPairToFieldInformation[inAudioSystem][chanPair].pcmControlMask,
1270  gAudioEngineChannelPairToFieldInformation[inAudioSystem][chanPair].pcmControlShift);
1271  if (!result)
1272  break;
1273  }
1274  return result;
1275 }
1276 
1277 
1278 bool CNTV2Card::GetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelSelect, bool & outIsNonPCM)
1279 {
1280  return IsSupported(kDeviceCanDoPCMControl)
1281  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1282  && NTV2_IS_VALID_AUDIO_CHANNEL_PAIR(inChannelSelect)
1283  && CNTV2DriverInterface::ReadRegister (gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlReg,
1284  outIsNonPCM,
1285  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlMask,
1286  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlShift);
1287 }
1288 
1289 
1290 bool CNTV2Card::GetAudioPCMControl (const NTV2AudioSystem inAudioSystem, NTV2AudioChannelPairs & outNonPCMChannelPairs)
1291 {
1292  ULWord numAudioChannels (0);
1293  bool isNonPCM (false);
1294 
1295  outNonPCMChannelPairs.clear ();
1296  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1297  return false; // no such audio system on this device
1298  if (!GetNumberAudioChannels (numAudioChannels, inAudioSystem))
1299  return false; // fail
1300 
1301  const NTV2AudioChannelPair maxPair (NTV2AudioChannelPair(numAudioChannels/2));
1302  if (!GetAudioPCMControl (inAudioSystem, isNonPCM))
1303  return false; // fail
1304 
1305  if (isNonPCM) // this global mode overrides per-channel PCM control
1306  {
1307  for (UWord chPair (0); chPair <= maxPair; chPair++)
1308  outNonPCMChannelPairs.insert (NTV2AudioChannelPair (chPair));
1309  return true; // done
1310  }
1311 
1312  if (IsSupported(kDeviceCanDoPCMControl))
1313  {
1314  ULWord regVal (0);
1315  if (!ReadRegister (inAudioSystem < NTV2_AUDIOSYSTEM_5 ? kRegPCMControl4321 : kRegPCMControl8765, regVal))
1316  return false;
1318  if (regVal & BIT(inAudioSystem * 8 + chanPair))
1319  outNonPCMChannelPairs.insert (chanPair);
1320  }
1321  return true;
1322 }
1323 
1324 
1325 // NTV2_AUDIOSYSTEM_1 NTV2_AUDIOSYSTEM_2 NTV2_AUDIOSYSTEM_3 NTV2_AUDIOSYSTEM_4
1327 // NTV2_AUDIOSYSTEM_5 NTV2_AUDIOSYSTEM_6 NTV2_AUDIOSYSTEM_7 NTV2_AUDIOSYSTEM_8
1329 
1330 // NTV2_AUDIOSYSTEM_1 NTV2_AUDIOSYSTEM_2 NTV2_AUDIOSYSTEM_3 NTV2_AUDIOSYSTEM_4
1331 static const unsigned sAudioDetectGroups [] = { 0, 1, 0, 1,
1332 // NTV2_AUDIOSYSTEM_5 NTV2_AUDIOSYSTEM_6 NTV2_AUDIOSYSTEM_7 NTV2_AUDIOSYSTEM_8
1333  0, 1, 2, 3 };
1334 
1335 bool CNTV2Card::IsAudioChannelPairPresent (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelPair, bool & outIsPresent)
1336 {
1337  NTV2AudioChannelPairs activeChannelPairs;
1338  outIsPresent = false;
1339  if (!GetDetectedAudioChannelPairs (inAudioSystem, activeChannelPairs))
1340  return false;
1341  if (activeChannelPairs.find (inChannelPair) != activeChannelPairs.end ())
1342  outIsPresent = true;
1343  return true;
1344 }
1345 
1346 
1347 bool CNTV2Card::GetDetectedAudioChannelPairs (const NTV2AudioSystem inAudioSystem, NTV2AudioChannelPairs & outDetectedChannelPairs)
1348 {
1349  outDetectedChannelPairs.clear ();
1350  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1351  return false;
1352 
1353  ULWord detectBits (0);
1354  if (!ReadRegister (sAudioDetectRegs[inAudioSystem], detectBits))
1355  return false;
1356 
1357  const unsigned bitGroup (sAudioDetectGroups[inAudioSystem]);
1359  if (detectBits & BIT(bitGroup * 8 + chanPair))
1360  outDetectedChannelPairs.insert (chanPair);
1361  return true;
1362 }
1363 
1364 
1366 {
1367  uint32_t valLo8(0), valHi8(0);
1368  outDetectedChannelPairs.clear ();
1369  if (!IsSupported(kDeviceCanDoAESAudioIn))
1370  return false;
1371  if (!ReadRegister(kRegInputStatus, valLo8)) // Reg 22, bits 24..27
1372  return false;
1373  if (!ReadRegister(kRegAud1SourceSelect, valHi8)) // Reg 25, bits 28..31
1374  return false;
1375 
1376  const uint32_t detectBits (((valLo8 >> 24) & 0x0000000F) | ((valHi8 >> 24) & 0x000000F0));
1377  for (NTV2AudioChannelPair chPair (NTV2_AudioChannel1_2); chPair < NTV2_AudioChannel15_16; chPair = NTV2AudioChannelPair(chPair+1))
1378  if (!(detectBits & BIT(chPair))) // bit set means "not connected"
1379  outDetectedChannelPairs.insert(chPair);
1380  return true;
1381 }
1382 
1383 
1384 bool CNTV2Card::SetSuspendHostAudio (const bool inIsSuspended)
1385 {
1386  return WriteRegister (kVRegSuspendSystemAudio, ULWord(inIsSuspended));
1387 }
1388 
1389 
1390 bool CNTV2Card::GetSuspendHostAudio (bool & outIsSuspended)
1391 {
1393 }
1394 
1395 
1396 // GetAESOutputSource / SetAESOutputSource:
1397 //
1398 // Register 190 (kRegAudioOutputSourceMap) does the mapping by audio group (audio channel quads).
1399 // Each of the least-significant 4 nibbles correspond to AES output audio channel quads:
1400 //
1401 // RegMask NTV2Audio4ChannelSelect
1402 // ========== =======================
1403 // 0x0000000F NTV2_AudioChannel1_4
1404 // 0x000000F0 NTV2_AudioChannel5_8
1405 // 0x00000F00 NTV2_AudioChannel9_12
1406 // 0x0000F000 NTV2_AudioChannel13_16
1407 //
1408 // The value of the nibble determines the source:
1409 // Value NTV2AudioSystem NTV2Audio4ChannelSelect
1410 // ===== =============== =======================
1411 // 0x0: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel1_4
1412 // 0x1: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel5_8
1413 // 0x2: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel9_12
1414 // 0x3: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel13_16
1415 // 0x4: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel1_4
1416 // 0x5: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel5_8
1417 // 0x6: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel9_12
1418 // 0x7: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel13_16
1419 // 0x8: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel1_4
1420 // 0x9: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel5_8
1421 // 0xA: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel9_12
1422 // 0xB: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel13_16
1423 // 0xC: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel1_4
1424 // 0xD: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel5_8
1425 // 0xE: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel9_12
1426 // 0xF: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel13_16
1427 
1428 static const unsigned gAESChannelMappingShifts [4] = {0, 4, 8, 12};
1429 
1430 
1431 bool CNTV2Card::GetAESOutputSource (const NTV2Audio4ChannelSelect inAESAudioChannels, NTV2AudioSystem & outSrcAudioSystem, NTV2Audio4ChannelSelect & outSrcAudioChannels)
1432 {
1433  const ULWord numAESAudioOutputChannels (GetNumSupported(kDeviceGetNumAESAudioOutputChannels));
1434  const ULWord maxNumAudioChannelsForQuad ((inAESAudioChannels + 1) * 4);
1435 
1436  outSrcAudioSystem = NTV2_AUDIOSYSTEM_INVALID;
1437  outSrcAudioChannels = NTV2_AUDIO_CHANNEL_QUAD_INVALID;
1438 
1439  if (numAESAudioOutputChannels < 4)
1440  return false; // Fail, device doesn't support AES output
1441  if (maxNumAudioChannelsForQuad > numAESAudioOutputChannels)
1442  return false; // Fail, illegal inAESAudioChannels value
1443 
1444  ULWord regValue (0);
1445  if (!ReadRegister (kRegAudioOutputSourceMap, regValue))
1446  return false; // Failed in ReadRegister
1447 
1448  regValue = (regValue >> gAESChannelMappingShifts[inAESAudioChannels]) & 0x0000000F;
1449  outSrcAudioSystem = NTV2AudioSystem(regValue / 4);
1450  NTV2_ASSERT (NTV2_IS_VALID_AUDIO_SYSTEM (outSrcAudioSystem));
1451 
1452  outSrcAudioChannels = NTV2Audio4ChannelSelect(regValue % 4);
1453  NTV2_ASSERT (NTV2_IS_NORMAL_AUDIO_CHANNEL_QUAD (outSrcAudioChannels));
1454  return true;
1455 }
1456 
1457 
1458 bool CNTV2Card::SetAESOutputSource (const NTV2Audio4ChannelSelect inAESAudioChannels, const NTV2AudioSystem inSrcAudioSystem, const NTV2Audio4ChannelSelect inSrcAudioChannels)
1459 {
1460  const ULWord nibble (ULWord(inSrcAudioSystem) * 4 + ULWord(inSrcAudioChannels));
1461  return WriteRegister (kRegAudioOutputSourceMap, // reg
1462  nibble, // value
1463  ULWord(0xF << gAESChannelMappingShifts[inAESAudioChannels]), // mask
1464  gAESChannelMappingShifts[inAESAudioChannels]); // shift
1465 }
1466 
1467 
1468 static NTV2AudioChannelPairs BitMasksToNTV2AudioChannelPairs (const ULWord inBitMask, const ULWord inExtendedBitMask)
1469 {
1470  NTV2AudioChannelPairs result;
1471  if (inBitMask)
1472  for (NTV2AudioChannelPair channelPair (NTV2_AudioChannel1_2); channelPair < NTV2_AudioChannel17_18; channelPair = NTV2AudioChannelPair (channelPair + 1))
1473  if (inBitMask & BIT (channelPair))
1474  result.insert (channelPair);
1475  if (inExtendedBitMask)
1476  for (NTV2AudioChannelPair channelPair (NTV2_AudioChannel17_18); channelPair < NTV2_MAX_NUM_AudioChannelPair; channelPair = NTV2AudioChannelPair (channelPair + 1))
1477  if (inExtendedBitMask & BIT (channelPair))
1478  result.insert (channelPair);
1479  return result;
1480 }
1481 
1482 
1483 static inline NTV2RegisterNumber GetNonPCMDetectRegisterNumber (const NTV2Channel inSDIInputChannel, const bool inIsExtended = false)
1484 {
1485  return NTV2RegisterNumber (kRegFirstNonPCMAudioDetectRegister + inSDIInputChannel * 2 + (inIsExtended ? 1 : 0));
1486 }
1487 
1488 
1489 bool CNTV2Card::InputAudioChannelPairHasPCM (const NTV2Channel inSDIInputChannel, const NTV2AudioChannelPair inAudioChannelPair, bool & outHasPCM)
1490 {
1491  if (!NTV2_IS_VALID_AUDIO_CHANNEL_PAIR (inAudioChannelPair))
1492  return false;
1493  NTV2AudioChannelPairs withPCMs;
1494  if (!GetInputAudioChannelPairsWithPCM (inSDIInputChannel, withPCMs))
1495  return false;
1496 
1497  outHasPCM = withPCMs.find (inAudioChannelPair) != withPCMs.end (); // Test set membership
1498  return true;
1499 }
1500 
1501 
1503 {
1504  outPCMPairs.clear ();
1505  if (!IsSupported(kDeviceCanDoPCMDetection))
1506  return false;
1507  if (!NTV2_IS_VALID_CHANNEL (inSDIInputChannel))
1508  return false;
1509  if (ULWord(inSDIInputChannel) >= GetNumSupported(kDeviceGetNumVideoInputs))
1510  return false;
1511 
1512  // Read channel pair bitmask registers...
1513  const ULWord numChannels (GetNumSupported(kDeviceGetMaxAudioChannels));
1514  const bool isExtended (numChannels > 16);
1515  const NTV2RegisterNumber regNum (::GetNonPCMDetectRegisterNumber (inSDIInputChannel));
1516  ULWord mask (0);
1517  ULWord extMask (0);
1518  if (!ReadRegister (regNum, mask))
1519  return false;
1520  if (isExtended)
1521  if (!ReadRegister (regNum + 1, extMask))
1522  return false;
1523 
1524  // Convert bitmasks to set of with-PCM pairs...
1525  outPCMPairs = ::BitMasksToNTV2AudioChannelPairs (~mask, isExtended ? ~extMask : 0);
1526  return true;
1527 }
1528 
1529 
1531 {
1532  outNonPCMPairs.clear ();
1533  if (!IsSupported(kDeviceCanDoPCMDetection))
1534  return false;
1535  if (!NTV2_IS_VALID_CHANNEL (inSDIInputChannel))
1536  return false;
1537  if (ULWord(inSDIInputChannel) >= GetNumSupported(kDeviceGetNumVideoInputs))
1538  return false;
1539 
1540  // Read channel pair bitmask registers...
1541  const ULWord numChannels (GetNumSupported(kDeviceGetMaxAudioChannels));
1542  const bool isExtended (numChannels > 16);
1543  const NTV2RegisterNumber regNum (::GetNonPCMDetectRegisterNumber (inSDIInputChannel));
1544  ULWord mask (0);
1545  ULWord extMask (0);
1546  if (!ReadRegister (regNum, mask))
1547  return false;
1548  if (isExtended)
1549  if (!ReadRegister (regNum + 1, extMask))
1550  return false;
1551 
1552  // Convert bitmasks to set of non-PCM pairs...
1553  outNonPCMPairs = ::BitMasksToNTV2AudioChannelPairs (mask, isExtended ? extMask : 0);
1554  return true;
1555 }
1556 
1557 
1560 
1561 bool CNTV2Card::GetAudioOutputEmbedderState (const NTV2Channel inSDIOutputSpigot, bool & outIsEnabled)
1562 {
1563  outIsEnabled = true; // presume normal
1564  if (!NTV2_IS_VALID_CHANNEL (inSDIOutputSpigot))
1565  return false;
1566  if (ULWord(inSDIOutputSpigot) >= GetNumSupported(kDeviceGetNumVideoOutputs))
1567  return false;
1568 
1569  ULWord value (0);
1570  if (!ReadRegister (kAudCtrlRegsForSDIOutputs[inSDIOutputSpigot], value,
1573  return false;
1574  outIsEnabled = value ? false : true; // Bit sense is 1=disabled, 0=enabled/normal
1575  return true;
1576 }
1577 
1578 bool CNTV2Card::SetAudioOutputEmbedderState (const NTV2Channel inSDIOutputSpigot, const bool & inEnable)
1579 {
1580  if (!NTV2_IS_VALID_CHANNEL (inSDIOutputSpigot))
1581  return false;
1582  if (ULWord(inSDIOutputSpigot) >= GetNumSupported(kDeviceGetNumVideoOutputs))
1583  return false;
1584 
1585  return WriteRegister (kAudCtrlRegsForSDIOutputs[inSDIOutputSpigot], inEnable ? 0 : 1,
1588 }
1589 
1590 
1591 bool CNTV2Card::GetAudioOutputEraseMode (const NTV2AudioSystem inAudioSystem, bool & outEraseModeEnabled)
1592 {
1593  outEraseModeEnabled = false;
1594  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1595  return false;
1596  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1597  return false;
1598  ULWord regValue(0);
1599  if (!ReadRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], regValue))
1600  return false;
1601  outEraseModeEnabled = (regValue & kRegMaskAudioAutoErase) ? true : false;
1602  return true;
1603 }
1604 
1605 
1606 bool CNTV2Card::SetAudioOutputEraseMode (const NTV2AudioSystem inAudioSystem, const bool & inEraseModeEnabled)
1607 {
1608  if (!NTV2_IS_VALID_AUDIO_SYSTEM (inAudioSystem))
1609  return false;
1610  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1611  return false;
1612  return WriteRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], inEraseModeEnabled ? 1 : 0, kRegMaskAudioAutoErase, kRegShiftAudioAutoErase);
1613 }
1614 
1615 bool CNTV2Card::SetAnalogAudioTransmitEnable (const NTV2Audio4ChannelSelect inChannelQuad, const bool inXmitEnable)
1616 {
1617  // Reg 108 (kRegGlobalControl3) has two bits for controlling XLR direction: BIT(0) for XLRs 1-4, BIT(1) for XLRs 5-8
1619  return false; // unsupported
1620  if (inChannelQuad > NTV2_AudioChannel5_8)
1621  return false; // NTV2_AudioChannel1_4 & NTV2_AudioChannel5_8 only
1622  return WriteRegister (kRegGlobalControl3, inXmitEnable ? 0 : 1, // 0 == xmit 1 == recv
1624  ULWord(inChannelQuad));
1625 }
1626 
1627 bool CNTV2Card::GetAnalogAudioTransmitEnable (const NTV2Audio4ChannelSelect inChannelQuad, bool & outXmitEnabled)
1628 {
1629  outXmitEnabled = false;
1630  // Reg 108 (kRegGlobalControl3) has two bits for controlling XLR direction: BIT(0) for XLRs 1-4, BIT(1) for XLRs 5-8
1632  return false; // unsupported
1633  if (inChannelQuad > NTV2_AudioChannel5_8)
1634  return false; // NTV2_AudioChannel1_4 & NTV2_AudioChannel5_8 only
1635  if (!CNTV2DriverInterface::ReadRegister (kRegGlobalControl3, outXmitEnabled, // false == xmit true == recv
1637  ULWord(inChannelQuad)))
1638  return false;
1639  outXmitEnabled = !outXmitEnabled; // Flip the sense, we want xmit == true, recv == false
1640  return true;
1641 }
1642 
1643 bool CNTV2Card::SetMultiLinkAudioMode (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1644 {
1645  if (!NTV2DeviceCanDoMultiLinkAudio(_boardID))
1646  return false;
1647 
1648  return WriteRegister(gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMaskMultiLinkAudio, kRegShiftMultiLinkAudio);
1649 }
1650 
1651 bool CNTV2Card::GetMultiLinkAudioMode (const NTV2AudioSystem inAudioSystem, bool & outEnabled)
1652 {
1653  outEnabled = false;
1654  if (!NTV2DeviceCanDoMultiLinkAudio(_boardID))
1655  return false;
1657 }
1658 
1659 #if !defined(NTV2_DEPRECATE_16_1)
1661  {
1662  if (inConfig > NTV2_AnalogAudioIO_8In)
1663  return false;
1664  return SetAnalogAudioTransmitEnable (NTV2_AudioChannel1_4, inConfig == NTV2_AnalogAudioIO_8Out || inConfig == NTV2_AnalogAudioIO_4Out_4In)
1665  && SetAnalogAudioTransmitEnable (NTV2_AudioChannel5_8, inConfig == NTV2_AnalogAudioIO_8Out || inConfig == NTV2_AnalogAudioIO_4In_4Out);
1666  }
1667 
1669  {
1670  bool xlr14Xmit(false), xlr58Xmit(false);
1671  if (!GetAnalogAudioTransmitEnable (NTV2_AudioChannel1_4, xlr14Xmit))
1672  return false;
1673  if (!GetAnalogAudioTransmitEnable (NTV2_AudioChannel5_8, xlr58Xmit))
1674  return false;
1675  if (xlr14Xmit && xlr58Xmit)
1676  outConfig = NTV2_AnalogAudioIO_8Out;
1677  else if (xlr14Xmit && !xlr58Xmit)
1678  outConfig = NTV2_AnalogAudioIO_4Out_4In;
1679  else if (!xlr14Xmit && xlr58Xmit)
1680  outConfig = NTV2_AnalogAudioIO_4In_4Out;
1681  else
1682  outConfig = NTV2_AnalogAudioIO_8In;
1683  return true;
1684  }
1685 #endif // !defined(NTV2_DEPRECATE_16_1)
1686 
1687 bool CNTV2Card::GetAudioOutputAESSyncModeBit (const NTV2AudioSystem inAudioSystem, bool & outAESSyncModeBitSet)
1688 {
1689  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1690  return false;
1691  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1692  return false;
1693  ULWord regValue(0);
1694  if (!ReadRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], regValue, BIT(18), 18))
1695  return false;
1696  outAESSyncModeBitSet = regValue ? true : false;
1697  return true;
1698 }
1699 
1700 bool CNTV2Card::SetAudioOutputAESSyncModeBit (const NTV2AudioSystem inAudioSystem, const bool & inAESSyncModeBitSet)
1701 {
1702  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1703  return false;
1704  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1705  return false;
1706  return WriteRegister(gAudioSystemToSrcSelectRegNum[inAudioSystem], inAESSyncModeBitSet?1:0, BIT(18), 18);
1707 }
1708 
1709 bool CNTV2Card::GetRawAudioTimer (ULWord & outValue, const NTV2AudioSystem inAudioSystem)
1710 {
1711  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1712  return false;
1713  return ReadRegister(kRegAud1Counter, outValue);
1714 }
1715 
1717 {
1718  if (!NTV2DeviceCanDoBreakoutBoard(_boardID))
1719  return false;
1720  return WriteRegister(kRegBOBAudioControl, inEnable ? 1 : 0, kRegMaskBOBAnalogInputSelect, kRegShiftBOBAnalogInputSelect);
1721 }
1722 
1723 bool CNTV2Card::GetAudioMemoryOffset (const ULWord inOffsetBytes, ULWord & outAbsByteOffset,
1724  const NTV2AudioSystem inAudioSystem, const bool inCaptureBuffer)
1725 {
1726  outAbsByteOffset = 0;
1727  const NTV2DeviceID deviceID(GetDeviceID());
1728  if (ULWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1729  return false; // Invalid audio system
1730 
1731  if (IsSupported(kDeviceCanDoStackedAudio))
1732  {
1733  const ULWord EIGHT_MEGABYTES (0x800000);
1734  const ULWord memSize (GetNumSupported(kDeviceGetActiveMemorySize));
1735  const ULWord engineOffset (memSize - EIGHT_MEGABYTES * ULWord(inAudioSystem+1));
1736  outAbsByteOffset = inOffsetBytes + engineOffset;
1737  }
1738  else
1739  {
1742  if (!GetFrameGeometry (fg, NTV2Channel(inAudioSystem)) || !GetFrameBufferFormat (NTV2Channel(inAudioSystem), fbf))
1743  return false;
1744 
1745  const ULWord audioFrameBuffer (::NTV2DeviceGetNumberFrameBuffers(deviceID, fg, fbf) - 1);
1746  outAbsByteOffset = inOffsetBytes + audioFrameBuffer * ::NTV2DeviceGetFrameBufferSize(deviceID, fg, fbf);
1747  }
1748 
1749  if (inCaptureBuffer) // Capture mode?
1750  { ULWord rdBufOffset(0x400000); // 4MB
1751  GetAudioReadOffset (rdBufOffset, inAudioSystem);
1752  outAbsByteOffset += rdBufOffset; // Add offset to point to capture buffer
1753  }
1754  return true;
1755 }
1756 
1757 #ifdef MSWindows
1758  #pragma warning(default: 4800)
1759 #endif
kRegShiftAud4PlayCapMode
@ kRegShiftAud4PlayCapMode
Definition: ntv2publicinterface.h:2269
kRegMaskPCMControlA2P9_10
@ kRegMaskPCMControlA2P9_10
Definition: ntv2publicinterface.h:2058
kK2RegShiftAudioBufferSize
@ kK2RegShiftAudioBufferSize
Definition: ntv2publicinterface.h:2404
kRegShiftAud3RateHigh
@ kRegShiftAud3RateHigh
Definition: ntv2publicinterface.h:2305
kRegShiftPCMControlA7P15_16
@ kRegShiftPCMControlA7P15_16
Definition: ntv2publicinterface.h:3167
kRegMaskPCMControlA5P1_2
@ kRegMaskPCMControlA5P1_2
Definition: ntv2publicinterface.h:2081
kDeviceGetNumVideoInputs
@ kDeviceGetNumVideoInputs
The number of SDI video inputs on the device.
Definition: ntv2devicefeatures.h:207
kRegShiftEmbeddedAudioInput
@ kRegShiftEmbeddedAudioInput
Definition: ntv2publicinterface.h:2409
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:1066
kRegMaskPCMControlA5P13_14
@ kRegMaskPCMControlA5P13_14
Definition: ntv2publicinterface.h:2087
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:1150
kRegMaskPCMControlA3P11_12
@ kRegMaskPCMControlA3P11_12
Definition: ntv2publicinterface.h:2068
kRegShiftPCMControlA7P11_12
@ kRegShiftPCMControlA7P11_12
Definition: ntv2publicinterface.h:3165
NTV2AnalogAudioIO
NTV2AnalogAudioIO
Definition: ntv2enums.h:2207
kRegShiftPCMControlA8P9_10
@ kRegShiftPCMControlA8P9_10
Definition: ntv2publicinterface.h:3173
kRegShift20BitMode
@ kRegShift20BitMode
Definition: ntv2publicinterface.h:2379
kRegShiftCaptureEnable
@ kRegShiftCaptureEnable
Definition: ntv2publicinterface.h:2376
kDeviceCanDoStackedAudio
@ kDeviceCanDoStackedAudio
True if device uses a "stacked" arrangement of its audio buffers.
Definition: ntv2devicefeatures.h:85
kRegMaskPCMControlA6P15_16
@ kRegMaskPCMControlA6P15_16
Definition: ntv2publicinterface.h:2097
kFS1RegMaskAudioLevel
@ kFS1RegMaskAudioLevel
Definition: ntv2publicinterface.h:1315
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:1214
kRegMaskAudioMixerChannelSelect
@ kRegMaskAudioMixerChannelSelect
Definition: ntv2publicinterface.h:2143
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:1502
kRegMaskPCMControlA6P11_12
@ kRegMaskPCMControlA6P11_12
Definition: ntv2publicinterface.h:2095
kRegMaskHDMIOutAudioFormat
@ kRegMaskHDMIOutAudioFormat
Definition: ntv2publicinterface.h:1527
kRegShiftPCMControlA4P13_14
@ kRegShiftPCMControlA4P13_14
Definition: ntv2publicinterface.h:3139
kRegAud5Delay
@ kRegAud5Delay
Definition: ntv2publicinterface.h:668
kRegMaskPCMControlA1P7_8
@ kRegMaskPCMControlA1P7_8
Definition: ntv2publicinterface.h:2048
NTV2_AUDIO_192K
@ NTV2_AUDIO_192K
Definition: ntv2enums.h:1907
kRegAud4Delay
@ kRegAud4Delay
Definition: ntv2publicinterface.h:432
kAudCtrlRegsForSDIOutputs
static const ULWord kAudCtrlRegsForSDIOutputs[]
Definition: ntv2audio.cpp:1558
kRegShiftOutputStartAtVBI
@ kRegShiftOutputStartAtVBI
Definition: ntv2publicinterface.h:2388
kRegAud1OutputLastAddr
@ kRegAud1OutputLastAddr
Definition: ntv2publicinterface.h:129
kRegShiftHDMIOutAudioCh
@ kRegShiftHDMIOutAudioCh
Definition: ntv2publicinterface.h:2613
kRegMaskLoopBack
@ kRegMaskLoopBack
Definition: ntv2publicinterface.h:1293
kRegAud7Delay
@ kRegAud7Delay
Definition: ntv2publicinterface.h:670
kRegMaskAud6PlayCapMode
@ kRegMaskAud6PlayCapMode
Definition: ntv2publicinterface.h:1186
PCM_CONTROL_INFO
Definition: ntv2audio.cpp:54
kRegMaskPCMControlA2P5_6
@ kRegMaskPCMControlA2P5_6
Definition: ntv2publicinterface.h:2056
gChannelToAudioOutLastAddrRegNum
static const ULWord gChannelToAudioOutLastAddrRegNum[]
Definition: ntv2audio.cpp:34
kRegMaskAudioMixerMainInputSelect
@ kRegMaskAudioMixerMainInputSelect
Definition: ntv2publicinterface.h:2140
kDeviceCanDoIP
@ kDeviceCanDoIP
True if device has SFP connectors.
Definition: ntv2devicefeatures.h:127
kRegShiftAud2PlayCapMode
@ kRegShiftAud2PlayCapMode
Definition: ntv2publicinterface.h:2267
kRegAudioMixerAux1GainCh2
@ kRegAudioMixerAux1GainCh2
Definition: ntv2publicinterface.h:800
kRegMaskPCMControlA5P5_6
@ kRegMaskPCMControlA5P5_6
Definition: ntv2publicinterface.h:2083
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:996
kRegShiftAudioMixerOutputChannelsMute
@ kRegShiftAudioMixerOutputChannelsMute
Definition: ntv2publicinterface.h:3205
NTV2_AudioChannel13_16
@ NTV2_AudioChannel13_16
This selects audio channels 13 thru 16.
Definition: ntv2enums.h:3232
NTV2_IS_VALID_AUDIO_CHANNEL_OCTET
#define NTV2_IS_VALID_AUDIO_CHANNEL_OCTET(__p__)
Definition: ntv2enums.h:3300
kRegMaskAudioInDelay
@ kRegMaskAudioInDelay
Definition: ntv2publicinterface.h:1436
kRegShiftPCMControlA6P9_10
@ kRegShiftPCMControlA6P9_10
Definition: ntv2publicinterface.h:3155
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4
Definition: ntv2enums.h:1947
NTV2_HDMIAudio2Channels
@ NTV2_HDMIAudio2Channels
2 audio channels
Definition: ntv2enums.h:3622
kRegMaskCaptureEnable
@ kRegMaskCaptureEnable
Definition: ntv2publicinterface.h:1289
kRegAudioMixerAux1InputLevels
@ kRegAudioMixerAux1InputLevels
Definition: ntv2publicinterface.h:805
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:520
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:417
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:753
NTV2StringSet
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1146
kRegShiftPCMControlA4P1_2
@ kRegShiftPCMControlA4P1_2
Definition: ntv2publicinterface.h:3133
NTV2DeviceGetNumberFrameBuffers
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:496
kRegAud2Delay
@ kRegAud2Delay
Definition: ntv2publicinterface.h:192
kRegMaskRotaryEncoderGain
@ kRegMaskRotaryEncoderGain
Definition: ntv2publicinterface.h:2191
kRegShiftPCMControlA7P5_6
@ kRegShiftPCMControlA7P5_6
Definition: ntv2publicinterface.h:3162
gAudioPlayCaptureModeShifts
static const ULWord gAudioPlayCaptureModeShifts[]
Definition: ntv2audio.cpp:40
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:594
NTV2AudioChannelPairs
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
Definition: ntv2publicinterface.h:58
kRegMaskAud8PlayCapMode
@ kRegMaskAud8PlayCapMode
Definition: ntv2publicinterface.h:1188
NTV2AudioFormat
NTV2AudioFormat
Definition: ntv2enums.h:1926
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1334
kRegShiftAudioMixerChannelSelect
@ kRegShiftAudioMixerChannelSelect
Definition: ntv2publicinterface.h:3204
kRegAudioMixerAux1GainCh1
@ kRegAudioMixerAux1GainCh1
Definition: ntv2publicinterface.h:796
kRegMaskPCMControlA1P5_6
@ kRegMaskPCMControlA1P5_6
Definition: ntv2publicinterface.h:2047
NTV2AudioMixerInput
NTV2AudioMixerInput
Identifies the Audio Mixer's audio inputs.
Definition: ntv2enums.h:3210
PCM_CONTROL_INFO::pcmControlShift
ULWord pcmControlShift
Definition: ntv2audio.cpp:57
ntv2audiodefines.h
Declares common audio macros and structs used in the SDK.
kRegShiftAud6PlayCapMode
@ kRegShiftAud6PlayCapMode
Definition: ntv2publicinterface.h:2271
kRegShiftPCMControlA5P9_10
@ kRegShiftPCMControlA5P9_10
Definition: ntv2publicinterface.h:3146
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:550
kRegAud6InputLastAddr
@ kRegAud6InputLastAddr
Definition: ntv2publicinterface.h:609
kRegShiftAudioMixerAux2InputEnable
@ kRegShiftAudioMixerAux2InputEnable
Definition: ntv2publicinterface.h:3224
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:508
kRegMaskPCMControlA4P3_4
@ kRegMaskPCMControlA4P3_4
Definition: ntv2publicinterface.h:2073
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:1060
kRegAud8OutputLastAddr
@ kRegAud8OutputLastAddr
Definition: ntv2publicinterface.h:618
NTV2DeviceGetFrameBufferSize
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:325
NTV2_MAX_NUM_AudioChannelPair
@ NTV2_MAX_NUM_AudioChannelPair
Definition: ntv2enums.h:3153
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:268
kRegMaskAud7RateHigh
@ kRegMaskAud7RateHigh
Definition: ntv2publicinterface.h:1226
kRegShiftPCMControlA2P1_2
@ kRegShiftPCMControlA2P1_2
Definition: ntv2publicinterface.h:3115
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:1384
kRegAudioMixerMutes
@ kRegAudioMixerMutes
Definition: ntv2publicinterface.h:799
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
Definition: ntv2enums.h:1944
kRegAud8Control
@ kRegAud8Control
Definition: ntv2publicinterface.h:616
sAudioMixerInputGainCh1Regs
static const ULWord sAudioMixerInputGainCh1Regs[]
Definition: ntv2audio.cpp:606
kRegMaskHDMIOutAudioSource
@ kRegMaskHDMIOutAudioSource
Definition: ntv2publicinterface.h:1889
NTV2_AUDIO_48K
@ NTV2_AUDIO_48K
Definition: ntv2enums.h:1905
kRegShiftBOBAnalogInputSelect
@ kRegShiftBOBAnalogInputSelect
Definition: ntv2publicinterface.h:3295
NTV2_AUDIO_CHANNEL_PAIR_INVALID
@ NTV2_AUDIO_CHANNEL_PAIR_INVALID
Definition: ntv2enums.h:3154
kRegShiftPCMControlA5P3_4
@ kRegShiftPCMControlA5P3_4
Definition: ntv2publicinterface.h:3143
kRegMaskPCMControlA4P13_14
@ kRegMaskPCMControlA4P13_14
Definition: ntv2publicinterface.h:2078
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:554
kRegMaskPCMControlA2P13_14
@ kRegMaskPCMControlA2P13_14
Definition: ntv2publicinterface.h:2060
NTV2_FG_INVALID
@ NTV2_FG_INVALID
Definition: ntv2enums.h:364
kRegAudioMixerOutRGain
@ kRegAudioMixerOutRGain
Definition: ntv2publicinterface.h:804
NTV2_AUDIO_WRAPADDRESS_BIG
#define NTV2_AUDIO_WRAPADDRESS_BIG
Definition: ntv2audiodefines.h:15
kRegMaskPCMControlA6P3_4
@ kRegMaskPCMControlA6P3_4
Definition: ntv2publicinterface.h:2091
kRegAudDetect2
@ kRegAudDetect2
Definition: ntv2publicinterface.h:405
kRegShiftPCMControlA8P13_14
@ kRegShiftPCMControlA8P13_14
Definition: ntv2publicinterface.h:3175
kRegMaskAud3RateHigh
@ kRegMaskAud3RateHigh
Definition: ntv2publicinterface.h:1222
NTV2_AUDIO_MIC
@ NTV2_AUDIO_MIC
Obtain audio samples from the device microphone input, if available.
Definition: ntv2enums.h:1986
kRegMaskPCMControlA8P13_14
@ kRegMaskPCMControlA8P13_14
Definition: ntv2publicinterface.h:2114
kRegShiftHDMIOut8ChGroupSelect
@ kRegShiftHDMIOut8ChGroupSelect
Definition: ntv2publicinterface.h:2599
NTV2DeviceCanDoMultiLinkAudio
bool NTV2DeviceCanDoMultiLinkAudio(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:4247
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:433
kRegMaskAnalogIOControl_58
@ kRegMaskAnalogIOControl_58
Definition: ntv2publicinterface.h:1211
kRegAud1Counter
@ kRegAud1Counter
Definition: ntv2publicinterface.h:131
kRegMaskAudioMixerAux2x2CHInput
@ kRegMaskAudioMixerAux2x2CHInput
Definition: ntv2publicinterface.h:2142
gAudioEngineChannelPairToFieldInformation
static const PCM_CONTROL_INFO gAudioEngineChannelPairToFieldInformation[][8]
Definition: ntv2audio.cpp:61
NTV2_AudioMixerChannel1
@ NTV2_AudioMixerChannel1
Definition: ntv2enums.h:3183
NTV2_AudioChannel17_18
@ NTV2_AudioChannel17_18
This selects audio channels 17 and 18.
Definition: ntv2enums.h:3097
CNTV2Card::GetEncodedAudioMode
virtual bool GetEncodedAudioMode(NTV2EncodedAudioMode &outValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Definition: ntv2audio.cpp:338
NTV2HDMIAudioChannels
NTV2HDMIAudioChannels
Indicates or specifies the HDMI audio channel count.
Definition: ntv2enums.h:3620
SDRAMAuditor::GetTagsForFrameIndex
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
Definition: ntv2card.cpp:641
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3850
kRegMaskAudioMixerAux1InputEnable
@ kRegMaskAudioMixerAux1InputEnable
Definition: ntv2publicinterface.h:2162
kRegShiftAud1PlayCapMode
@ kRegShiftAud1PlayCapMode
Definition: ntv2publicinterface.h:2266
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_8
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_8
Definition: ntv2enums.h:1951
CNTV2Card::EnableBOBAnalogAudioIn
virtual bool EnableBOBAnalogAudioIn(bool inEnable)
Enables breakout board analog audio XLR inputs.
Definition: ntv2audio.cpp:1716
kRegAudioMixerOutLGain
@ kRegAudioMixerOutLGain
Definition: ntv2publicinterface.h:803
kRegMaskAud7PlayCapMode
@ kRegMaskAud7PlayCapMode
Definition: ntv2publicinterface.h:1187
kRegShiftHDMIOutAudioFormat
@ kRegShiftHDMIOutAudioFormat
Definition: ntv2publicinterface.h:2607
kRegShiftPCMControlA2P15_16
@ kRegShiftPCMControlA2P15_16
Definition: ntv2publicinterface.h:3122
gAudioRateHighMask
static const ULWord gAudioRateHighMask[]
Definition: ntv2audio.cpp:48
kRegShiftPCMControlA3P9_10
@ kRegShiftPCMControlA3P9_10
Definition: ntv2publicinterface.h:3128
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
CNTV2Card::GetHDMIOutAudioRate
virtual bool GetHDMIOutAudioRate(NTV2AudioRate &outValue)
Answers with the HDMI output's current audio rate.
Definition: ntv2audio.cpp:978
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5608
kRegMaskHDMIOutAudioRate
@ kRegMaskHDMIOutAudioRate
Definition: ntv2publicinterface.h:1565
kRegMaskBOBAnalogLevelControl
@ kRegMaskBOBAnalogLevelControl
Definition: ntv2publicinterface.h:2234
kRegAud3SourceSelect
@ kRegAud3SourceSelect
Definition: ntv2publicinterface.h:403
kDeviceGetNumVideoOutputs
@ kDeviceGetNumVideoOutputs
The number of SDI video outputs on the device.
Definition: ntv2devicefeatures.h:208
kRegMaskPCMControlA3P3_4
@ kRegMaskPCMControlA3P3_4
Definition: ntv2publicinterface.h:2064
kRegShiftPCMControlA2P5_6
@ kRegShiftPCMControlA2P5_6
Definition: ntv2publicinterface.h:3117
kRegAudioOutputSourceMap
@ kRegAudioOutputSourceMap
Definition: ntv2publicinterface.h:313
kRegMaskPCMControlA3P15_16
@ kRegMaskPCMControlA3P15_16
Definition: ntv2publicinterface.h:2070
NTV2_FBF_INVALID
@ NTV2_FBF_INVALID
Definition: ntv2enums.h:248
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:210
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:652
kRegShiftPCMControlA3P15_16
@ kRegShiftPCMControlA3P15_16
Definition: ntv2publicinterface.h:3131
kRegShiftPCMControlA1P15_16
@ kRegShiftPCMControlA1P15_16
Definition: ntv2publicinterface.h:3113
kRegShiftAudio16Channel
@ kRegShiftAudio16Channel
Definition: ntv2publicinterface.h:2394
kRegMaskPCMControlA8P5_6
@ kRegMaskPCMControlA8P5_6
Definition: ntv2publicinterface.h:2110
PCM_CONTROL_INFO::pcmControlMask
ULWord pcmControlMask
Definition: ntv2audio.cpp:56
kRegShiftHDMIOutSourceSelect
@ kRegShiftHDMIOutSourceSelect
Definition: ntv2publicinterface.h:2643
kRegMaskPCMControlA5P11_12
@ kRegMaskPCMControlA5P11_12
Definition: ntv2publicinterface.h:2086
kRegAudioMixerAux2GainCh1
@ kRegAudioMixerAux2GainCh1
Definition: ntv2publicinterface.h:797
NTV2AudioChannelsMuted16
std::bitset< 16 > NTV2AudioChannelsMuted16
Per-audio-channel mute state for up to 16 audio channels.
Definition: ntv2publicinterface.h:81
kRegShiftAud8PlayCapMode
@ kRegShiftAud8PlayCapMode
Definition: ntv2publicinterface.h:2273
kRegAud7InputLastAddr
@ kRegAud7InputLastAddr
Definition: ntv2publicinterface.h:614
kRegShiftPCMControlA6P5_6
@ kRegShiftPCMControlA6P5_6
Definition: ntv2publicinterface.h:3153
sAudioMixerInputSelectShifts
static const ULWord sAudioMixerInputSelectShifts[]
Definition: ntv2audio.cpp:551
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:1687
kRegAudioMixerMainOutputLevelsPair0
@ kRegAudioMixerMainOutputLevelsPair0
Definition: ntv2publicinterface.h:816
kDeviceGetNumAESAudioOutputChannels
@ kDeviceGetNumAESAudioOutputChannels
The number of AES/EBU audio output channels on the device.
Definition: ntv2devicefeatures.h:183
kDeviceCanDoAudioMixer
@ kDeviceCanDoAudioMixer
True if device has a firmware audio mixer.
Definition: ntv2devicefeatures.h:120
kRegShiftAud6RateHigh
@ kRegShiftAud6RateHigh
Definition: ntv2publicinterface.h:2308
kRegMaskAud2RateHigh
@ kRegMaskAud2RateHigh
Definition: ntv2publicinterface.h:1221
kRegMaskPCMControlA8P3_4
@ kRegMaskPCMControlA8P3_4
Definition: ntv2publicinterface.h:2109
kRegAud1Delay
@ kRegAud1Delay
Definition: ntv2publicinterface.h:122
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:300
kRegAudioMixerMainOutputLevelsPair6
@ kRegAudioMixerMainOutputLevelsPair6
Definition: ntv2publicinterface.h:822
kRegAud7OutputLastAddr
@ kRegAud7OutputLastAddr
Definition: ntv2publicinterface.h:613
NTV2DeviceHasBiDirectionalAnalogAudio
bool NTV2DeviceHasBiDirectionalAnalogAudio(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:6504
kK2RegShiftAudioLevel
@ kK2RegShiftAudioLevel
Definition: ntv2publicinterface.h:2401
kRegAud8InputLastAddr
@ kRegAud8InputLastAddr
Definition: ntv2publicinterface.h:619
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:1206
kRegAudioMixerMainInputLevelsPair1
@ kRegAudioMixerMainInputLevelsPair1
Definition: ntv2publicinterface.h:808
kRegMaskPCMControlA6P5_6
@ kRegMaskPCMControlA6P5_6
Definition: ntv2publicinterface.h:2092
kRegShiftEmbeddedAudioClock
@ kRegShiftEmbeddedAudioClock
Definition: ntv2publicinterface.h:2413
SDRAMAuditor
Audits an NTV2 device's SDRAM utilization, and can report contiguous regions of SDRAM,...
Definition: ntv2card.h:6591
kRegAudioMixerMainInputLevelsPair5
@ kRegAudioMixerMainInputLevelsPair5
Definition: ntv2publicinterface.h:812
kRegShiftPCMControlA1P3_4
@ kRegShiftPCMControlA1P3_4
Definition: ntv2publicinterface.h:3107
nlohmann::json_abiNLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON_v3_11_NLOHMANN_JSON_VERSION_PATCH::detail::void
j template void())
Definition: json.hpp:4893
CNTV2Card::SetAnalogAudioIOConfiguration
virtual bool SetAnalogAudioIOConfiguration(const NTV2AnalogAudioIO inConfig)
Definition: ntv2audio.cpp:1660
kRegMaskAudioAutoErase
@ kRegMaskAudioAutoErase
Definition: ntv2publicinterface.h:1328
NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2
#define NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2(__p__)
Definition: ntv2enums.h:3204
CNTV2Card::GetHDMIOutAudioChannels
virtual bool GetHDMIOutAudioChannels(NTV2HDMIAudioChannels &outValue)
Definition: ntv2audio.cpp:857
kRegShiftPCMControlA8P3_4
@ kRegShiftPCMControlA8P3_4
Definition: ntv2publicinterface.h:3170
NTV2_HDMIAudio8Channels
@ NTV2_HDMIAudio8Channels
8 audio channels
Definition: ntv2enums.h:3623
CNTV2Card::SetAudioMixerOutputGain
virtual bool SetAudioMixerOutputGain(const ULWord inGainValue)
Sets the gain for the output of the Audio Mixer.
Definition: ntv2audio.cpp:644
kRegShiftAud5PlayCapMode
@ kRegShiftAud5PlayCapMode
Definition: ntv2publicinterface.h:2270
NTV2_EMBEDDED_AUDIO_INPUT_INVALID
@ NTV2_EMBEDDED_AUDIO_INPUT_INVALID
Definition: ntv2enums.h:1953
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:1183
kDeviceGetNumBufferedAudioSystems
@ kDeviceGetNumBufferedAudioSystems
The total number of audio systems on the device that can read/write audio buffer memory....
Definition: ntv2devicefeatures.h:216
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:485
kRegShiftInputStartAtVBI
@ kRegShiftInputStartAtVBI
Definition: ntv2publicinterface.h:2384
kRegAud5Control
@ kRegAud5Control
Definition: ntv2publicinterface.h:601
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:1335
kRegMaskPCMControlA4P1_2
@ kRegMaskPCMControlA4P1_2
Definition: ntv2publicinterface.h:2072
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:1176
kRegAud3InputLastAddr
@ kRegAud3InputLastAddr
Definition: ntv2publicinterface.h:407
GetNonPCMDetectRegisterNumber
static NTV2RegisterNumber GetNonPCMDetectRegisterNumber(const NTV2Channel inSDIInputChannel, const bool inIsExtended=(0))
Definition: ntv2audio.cpp:1483
kRegAudioMixerAux2GainCh2
@ kRegAudioMixerAux2GainCh2
Definition: ntv2publicinterface.h:801
kDeviceCanDoAudioDelay
@ kDeviceCanDoAudioDelay
True if Audio System(s) support an adjustable delay.
Definition: ntv2devicefeatures.h:52
kRegAud5InputLastAddr
@ kRegAud5InputLastAddr
Definition: ntv2publicinterface.h:604
CNTV2Card::GetAudioMixerLevelsSampleCount
virtual bool GetAudioMixerLevelsSampleCount(ULWord &outSampleCount)
Answers with the Audio Mixer's current sample count used for measuring audio levels.
Definition: ntv2audio.cpp:828
kRegAudioControl2
@ kRegAudioControl2
Definition: ntv2publicinterface.h:229
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:1347
kRegAud8Delay
@ kRegAud8Delay
Definition: ntv2publicinterface.h:671
kRegMaskBOBAnalogInputSelect
@ kRegMaskBOBAnalogInputSelect
Definition: ntv2publicinterface.h:2235
NTV2EmbeddedAudioClock
NTV2EmbeddedAudioClock
This enum value determines/states the device audio clock reference source. It was important to set th...
Definition: ntv2enums.h:1965
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:429
NTV2_IS_EXTENDED_AUDIO_CHANNEL_PAIR
#define NTV2_IS_EXTENDED_AUDIO_CHANNEL_PAIR(__p__)
Definition: ntv2enums.h:3162
NTV2DeviceGetHDMIVersion
ULWord NTV2DeviceGetHDMIVersion(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:8821
kRegHDMIOutControl
@ kRegHDMIOutControl
Definition: ntv2publicinterface.h:240
CNTV2Card::GetHDMIOutAudioSource8Channel
virtual bool GetHDMIOutAudioSource8Channel(NTV2Audio8ChannelSelect &outValue, NTV2AudioSystem &outAudioSystem)
Answers with the HDMI output's current 8-channel audio source.
Definition: ntv2audio.cpp:940
kRegShiftPCMControlA5P7_8
@ kRegShiftPCMControlA5P7_8
Definition: ntv2publicinterface.h:3145
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:1606
NTV2_AudioChannel9_10
@ NTV2_AudioChannel9_10
This selects audio channels 9 and 10 (Group 3 channels 1 and 2)
Definition: ntv2enums.h:3093
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:1157
kRegShiftPCMControlA4P11_12
@ kRegShiftPCMControlA4P11_12
Definition: ntv2publicinterface.h:3138
kRegMaskAudioMixerInputLeftLevel
@ kRegMaskAudioMixerInputLeftLevel
Definition: ntv2publicinterface.h:2186
kRegShiftAud2RateHigh
@ kRegShiftAud2RateHigh
Definition: ntv2publicinterface.h:2304
kRegShiftPCMControlA8P5_6
@ kRegShiftPCMControlA8P5_6
Definition: ntv2publicinterface.h:3171
kRegMaskPCMControlA7P9_10
@ kRegMaskPCMControlA7P9_10
Definition: ntv2publicinterface.h:2103
kRegMaskPCMControlA3P5_6
@ kRegMaskPCMControlA3P5_6
Definition: ntv2publicinterface.h:2065
kRegShiftResetAudioOutput
@ kRegShiftResetAudioOutput
Definition: ntv2publicinterface.h:2383
kRegShiftPCMControlA2P3_4
@ kRegShiftPCMControlA2P3_4
Definition: ntv2publicinterface.h:3116
kRegAud6SourceSelect
@ kRegAud6SourceSelect
Definition: ntv2publicinterface.h:607
kRegShiftPCMControlA2P11_12
@ kRegShiftPCMControlA2P11_12
Definition: ntv2publicinterface.h:3120
kDeviceGetNumAudioSystems
@ kDeviceGetNumAudioSystems
The number of independent Audio Systems on the device.
Definition: ntv2devicefeatures.h:188
CNTV2Card::SetHDMIOutAudioChannels
virtual bool SetHDMIOutAudioChannels(const NTV2HDMIAudioChannels inNewValue)
Definition: ntv2audio.cpp:851
kRegMaskPCMControlA2P15_16
@ kRegMaskPCMControlA2P15_16
Definition: ntv2publicinterface.h:2061
kRegAud4InputLastAddr
@ kRegAud4InputLastAddr
Definition: ntv2publicinterface.h:409
NTV2_EMBEDDED_AUDIO_CLOCK_REFERENCE
@ NTV2_EMBEDDED_AUDIO_CLOCK_REFERENCE
Audio clock derived from the device reference.
Definition: ntv2enums.h:1967
kRegShiftPCMControlA2P9_10
@ kRegShiftPCMControlA2P9_10
Definition: ntv2publicinterface.h:3119
NTV2_AnalogAudioIO_4Out_4In
@ NTV2_AnalogAudioIO_4Out_4In
Definition: ntv2enums.h:2211
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:180
ULWord
uint32_t ULWord
Definition: ajatypes.h:255
kRegMaskPCMControlA4P5_6
@ kRegMaskPCMControlA4P5_6
Definition: ntv2publicinterface.h:2074
kRegShiftAudioMixerInputRightLevel
@ kRegShiftAudioMixerInputRightLevel
Definition: ntv2publicinterface.h:3248
kRegShiftPCMControlA3P13_14
@ kRegShiftPCMControlA3P13_14
Definition: ntv2publicinterface.h:3130
kRegMaskPCMControlA1P9_10
@ kRegMaskPCMControlA1P9_10
Definition: ntv2publicinterface.h:2049
kRegShiftPCMControlA6P15_16
@ kRegShiftPCMControlA6P15_16
Definition: ntv2publicinterface.h:3158
kRegShiftPCMControlA5P1_2
@ kRegShiftPCMControlA5P1_2
Definition: ntv2publicinterface.h:3142
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:1591
kRegMaskPCMControlA3P7_8
@ kRegMaskPCMControlA3P7_8
Definition: ntv2publicinterface.h:2066
kRegMaskInputStartAtVBI
@ kRegMaskInputStartAtVBI
Definition: ntv2publicinterface.h:1297
kFS1RegShiftAudioLevel
@ kFS1RegShiftAudioLevel
Definition: ntv2publicinterface.h:2403
kRegShiftEncodedAudioMode
@ kRegShiftEncodedAudioMode
Definition: ntv2publicinterface.h:2393
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:1709
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:449
CNTV2Card::GetAudioMixerOutputGain
virtual bool GetAudioMixerOutputGain(ULWord &outGainValue)
Answers with the current gain setting for the Audio Mixer's output.
Definition: ntv2audio.cpp:636
kRegShiftPCMControlA3P11_12
@ kRegShiftPCMControlA3P11_12
Definition: ntv2publicinterface.h:3129
kRegMaskPCMControlA1P3_4
@ kRegMaskPCMControlA1P3_4
Definition: ntv2publicinterface.h:2046
kRegMaskPCMControlA1P11_12
@ kRegMaskPCMControlA1P11_12
Definition: ntv2publicinterface.h:2050
NTV2_IS_VALID_AUDIO_MIXER_INPUT
#define NTV2_IS_VALID_AUDIO_MIXER_INPUT(__p__)
Definition: ntv2enums.h:3219
kRegShiftPCMControlA7P9_10
@ kRegShiftPCMControlA7P9_10
Definition: ntv2publicinterface.h:3164
kRegShiftPCMControlA3P3_4
@ kRegShiftPCMControlA3P3_4
Definition: ntv2publicinterface.h:3125
kRegShiftPCMControlA6P11_12
@ kRegShiftPCMControlA6P11_12
Definition: ntv2publicinterface.h:3156
kRegAudioMixerMainOutputLevelsPair5
@ kRegAudioMixerMainOutputLevelsPair5
Definition: ntv2publicinterface.h:821
kRegMaskAudioMixerLevelSampleCount
@ kRegMaskAudioMixerLevelSampleCount
Definition: ntv2publicinterface.h:2188
kRegFirstNonPCMAudioDetectRegister
@ kRegFirstNonPCMAudioDetectRegister
Definition: ntv2publicinterface.h:829
kRegShiftAudioSource
@ kRegShiftAudioSource
Definition: ntv2publicinterface.h:2408
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:1431
kRegShiftPCMControlA8P11_12
@ kRegShiftPCMControlA8P11_12
Definition: ntv2publicinterface.h:3174
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:1530
kRegAud1InputLastAddr
@ kRegAud1InputLastAddr
Definition: ntv2publicinterface.h:130
kRegAud3Control
@ kRegAud3Control
Definition: ntv2publicinterface.h:401
kRegMaskPCMControlA7P15_16
@ kRegMaskPCMControlA7P15_16
Definition: ntv2publicinterface.h:2106
NTV2AudioSystemSet
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
Definition: ntv2publicinterface.h:3900
kRegShiftAudioMixerLevelSampleCount
@ kRegShiftAudioMixerLevelSampleCount
Definition: ntv2publicinterface.h:3249
kRegShiftPCMControlA1P11_12
@ kRegShiftPCMControlA1P11_12
Definition: ntv2publicinterface.h:3111
kRegMaskPCMControlA5P15_16
@ kRegMaskPCMControlA5P15_16
Definition: ntv2publicinterface.h:2088
ntv2card.h
Declares the CNTV2Card class.
kRegShiftEmbeddedOutputSupressCh1
@ kRegShiftEmbeddedOutputSupressCh1
Definition: ntv2publicinterface.h:2387
kRegMaskHDMIOutAudio2ChannelSelect
@ kRegMaskHDMIOutAudio2ChannelSelect
Definition: ntv2publicinterface.h:1572
kDeviceCanDoPCMDetection
@ kDeviceCanDoPCMDetection
True if device can detect which audio channel pairs are not carrying PCM (Pulse Code Modulation) audi...
Definition: ntv2devicefeatures.h:72
NTV2_AudioMixerInputAux1
@ NTV2_AudioMixerInputAux1
This selects the Audio Mixer's 1st Auxiliary input.
Definition: ntv2enums.h:3213
kRegShiftPCMControlA1P5_6
@ kRegShiftPCMControlA1P5_6
Definition: ntv2publicinterface.h:3108
kRegMaskPauseAudio
@ kRegMaskPauseAudio
Definition: ntv2publicinterface.h:1298
kRegShiftHDMIOutAudio2ChannelSelect
@ kRegShiftHDMIOutAudio2ChannelSelect
Definition: ntv2publicinterface.h:2649
CNTV2Card::GetAudioAnalogLevel
virtual bool GetAudioAnalogLevel(NTV2AudioLevel &outValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Definition: ntv2audio.cpp:290
kDeviceAudioCanWaitForVBI
@ kDeviceAudioCanWaitForVBI
True if device audio systems can wait for VBI before starting. (New in SDK 17.0)
Definition: ntv2devicefeatures.h:144
kRegMaskAud1PlayCapMode
@ kRegMaskAud1PlayCapMode
Definition: ntv2publicinterface.h:1181
NTV2RegisterReadsConstIter
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
Definition: ntv2publicinterface.h:4015
kRegShiftPCMControlA2P7_8
@ kRegShiftPCMControlA2P7_8
Definition: ntv2publicinterface.h:3118
kRegGlobalControl2
@ kRegGlobalControl2
Definition: ntv2publicinterface.h:390
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:1222
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:465
kRegAudioDetect5678
@ kRegAudioDetect5678
Definition: ntv2publicinterface.h:621
kRegShiftPCMControlA6P7_8
@ kRegShiftPCMControlA6P7_8
Definition: ntv2publicinterface.h:3154
kRegMaskPCMControlA1P1_2
@ kRegMaskPCMControlA1P1_2
Definition: ntv2publicinterface.h:2045
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:472
kRegAudioMixerInputSelects
@ kRegAudioMixerInputSelects
Definition: ntv2publicinterface.h:794
NTV2AudioChannelPair
NTV2AudioChannelPair
Identifies a pair of audio channels.
Definition: ntv2enums.h:3087
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:1561
kRegGlobalControl3
@ kRegGlobalControl3
Definition: ntv2publicinterface.h:216
kRegShiftAud8RateHigh
@ kRegShiftAud8RateHigh
Definition: ntv2publicinterface.h:2310
NTV2AudioLevel
NTV2AudioLevel
Definition: ntv2enums.h:2288
kRegShiftPCMControlA6P13_14
@ kRegShiftPCMControlA6P13_14
Definition: ntv2publicinterface.h:3157
UWord
uint16_t UWord
Definition: ajatypes.h:253
NTV2RegisterReads
NTV2RegWrites NTV2RegisterReads
Definition: ntv2publicinterface.h:4014
PCM_CONTROL_INFO::pcmControlReg
ULWord pcmControlReg
Definition: ntv2audio.cpp:55
kRegAudioMixerMainInputLevelsPair7
@ kRegAudioMixerMainInputLevelsPair7
Definition: ntv2publicinterface.h:814
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:425
kRegAud6OutputLastAddr
@ kRegAud6OutputLastAddr
Definition: ntv2publicinterface.h:608
kRegAudioMixerOutGain
@ kRegAudioMixerOutGain
Definition: ntv2publicinterface.h:802
kRegMaskPCMControlA3P9_10
@ kRegMaskPCMControlA3P9_10
Definition: ntv2publicinterface.h:2067
kRegShiftPCMControlA3P7_8
@ kRegShiftPCMControlA3P7_8
Definition: ntv2publicinterface.h:3127
kRegAud3OutputLastAddr
@ kRegAud3OutputLastAddr
Definition: ntv2publicinterface.h:406
kRegShiftPCMControlA5P13_14
@ kRegShiftPCMControlA5P13_14
Definition: ntv2publicinterface.h:3148
kRegHDMIInputControl
@ kRegHDMIInputControl
Definition: ntv2publicinterface.h:242
NTV2_EMBEDDED_AUDIO_CLOCK_VIDEO_INPUT
@ NTV2_EMBEDDED_AUDIO_CLOCK_VIDEO_INPUT
Audio clock derived from the video input.
Definition: ntv2enums.h:1968
ntv2utils.h
Declares numerous NTV2 utility functions.
kRegShiftPCMControlA7P3_4
@ kRegShiftPCMControlA7P3_4
Definition: ntv2publicinterface.h:3161
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:1627
NTV2_AnalogAudioIO_4In_4Out
@ NTV2_AnalogAudioIO_4In_4Out
Definition: ntv2enums.h:2210
kRegMaskAudio16Channel
@ kRegMaskAudio16Channel
Definition: ntv2publicinterface.h:1307
CNTV2Card::ReadAudioSource
virtual bool ReadAudioSource(ULWord &outValue, const NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2audio.cpp:480
kRegShiftLoopBack
@ kRegShiftLoopBack
Definition: ntv2publicinterface.h:2380
kRegShiftMultiLinkAudio
@ kRegShiftMultiLinkAudio
Definition: ntv2publicinterface.h:2395
NTV2_AUDIO_BUFFER_SIZE_1MB
@ NTV2_AUDIO_BUFFER_SIZE_1MB
Definition: ntv2enums.h:1891
kRegMaskPCMControlA2P1_2
@ kRegMaskPCMControlA2P1_2
Definition: ntv2publicinterface.h:2054
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:1086
CNTV2Card::StartAudioOutput
virtual bool StartAudioOutput(const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI=(0))
Starts the playout side of the given NTV2AudioSystem, reading outgoing audio samples from the Audio S...
Definition: ntv2audio.cpp:1019
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:1489
kRegMaskPCMControlA1P15_16
@ kRegMaskPCMControlA1P15_16
Definition: ntv2publicinterface.h:2052
kRegShiftEmbeddedOutputSupressCh2
@ kRegShiftEmbeddedOutputSupressCh2
Definition: ntv2publicinterface.h:2389
CNTV2Card::StartAudioInput
virtual bool StartAudioInput(const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI=(0))
Starts the capture side of the given NTV2AudioSystem, writing incoming audio samples into the Audio S...
Definition: ntv2audio.cpp:1108
kRegShiftPCMControlA4P15_16
@ kRegShiftPCMControlA4P15_16
Definition: ntv2publicinterface.h:3140
kRegShiftPCMControlA7P13_14
@ kRegShiftPCMControlA7P13_14
Definition: ntv2publicinterface.h:3166
NTV2_AUDIO_LOOPBACK_INVALID
@ NTV2_AUDIO_LOOPBACK_INVALID
Definition: ntv2enums.h:2007
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:1007
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:1578
CNTV2Card::SetEncodedAudioMode
virtual bool SetEncodedAudioMode(const NTV2EncodedAudioMode value, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Definition: ntv2audio.cpp:330
kRegShiftPCMControlA4P9_10
@ kRegShiftPCMControlA4P9_10
Definition: ntv2publicinterface.h:3137
kDeviceCanDoPCMControl
@ kDeviceCanDoPCMControl
True if device can mark specific audio channel pairs as not carrying PCM (Pulse Code Modulation) audi...
Definition: ntv2devicefeatures.h:71
kRegAud4Control
@ kRegAud4Control
Definition: ntv2publicinterface.h:402
NTV2_AUDIO_BUFFER_SIZE_4MB
@ NTV2_AUDIO_BUFFER_SIZE_4MB
Definition: ntv2enums.h:1892
NTV2AudioLoopBack
NTV2AudioLoopBack
This enum value determines/states if an audio output embedder will embed silence (zeroes) or de-embed...
Definition: ntv2enums.h:2003
kRegMaskAudioMixerMainInputEnable
@ kRegMaskAudioMixerMainInputEnable
Definition: ntv2publicinterface.h:2161
kRegAud8SourceSelect
@ kRegAud8SourceSelect
Definition: ntv2publicinterface.h:617
PCM_CONTROL_INFO::PCM_CONTROL_INFO
PCM_CONTROL_INFO(ULWord regNum, ULWord mask, ULWord shift)
Definition: ntv2audio.cpp:58
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:377
NTV2_IS_AUDIO_MIXER_INPUT_MAIN
#define NTV2_IS_AUDIO_MIXER_INPUT_MAIN(__p__)
Definition: ntv2enums.h:3220
kRegAudioMixerMainInputLevelsPair0
@ kRegAudioMixerMainInputLevelsPair0
Definition: ntv2publicinterface.h:807
kRegMaskAud4RateHigh
@ kRegMaskAud4RateHigh
Definition: ntv2publicinterface.h:1223
kRegAudioMixerMainOutputLevelsPair3
@ kRegAudioMixerMainOutputLevelsPair3
Definition: ntv2publicinterface.h:819
kRegShiftPCMControlA4P5_6
@ kRegShiftPCMControlA4P5_6
Definition: ntv2publicinterface.h:3135
kRegShiftAudioMixerMainInputSelect
@ kRegShiftAudioMixerMainInputSelect
Definition: ntv2publicinterface.h:3201
kRegAud7Control
@ kRegAud7Control
Definition: ntv2publicinterface.h:611
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:720
kRegShiftRotaryEncoderGain
@ kRegShiftRotaryEncoderGain
Definition: ntv2publicinterface.h:3252
kRegAud4OutputLastAddr
@ kRegAud4OutputLastAddr
Definition: ntv2publicinterface.h:408
kRegAud5OutputLastAddr
@ kRegAud5OutputLastAddr
Definition: ntv2publicinterface.h:603
kRegMaskPCMControlA4P11_12
@ kRegMaskPCMControlA4P11_12
Definition: ntv2publicinterface.h:2077
kRegShiftAud7PlayCapMode
@ kRegShiftAud7PlayCapMode
Definition: ntv2publicinterface.h:2272
kRegMaskAud1RateHigh
@ kRegMaskAud1RateHigh
Definition: ntv2publicinterface.h:1220
kRegAud5SourceSelect
@ kRegAud5SourceSelect
Definition: ntv2publicinterface.h:602
gAudioRateHighShift
static const ULWord gAudioRateHighShift[]
Definition: ntv2audio.cpp:51
CNTV2Card::SetAudio20BitMode
virtual bool SetAudio20BitMode(const NTV2AudioSystem inAudioSystem, const bool inEnable)
Enables or disables 20-bit mode for the NTV2AudioSystem.
Definition: ntv2audio.cpp:1078
kRegShiftAudioMixerMainInputEnable
@ kRegShiftAudioMixerMainInputEnable
Definition: ntv2publicinterface.h:3222
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:1700
kRegMaskPCMControlA7P11_12
@ kRegMaskPCMControlA7P11_12
Definition: ntv2publicinterface.h:2104
sAudioMixerInputMuteShifts
static const ULWord sAudioMixerInputMuteShifts[]
Definition: ntv2audio.cpp:718
kRegMaskPCMControlA4P15_16
@ kRegMaskPCMControlA4P15_16
Definition: ntv2publicinterface.h:2079
kRegShiftAud7RateHigh
@ kRegShiftAud7RateHigh
Definition: ntv2publicinterface.h:2309
kRegAud1SourceSelect
@ kRegAud1SourceSelect
Definition: ntv2publicinterface.h:128
NTV2RegInfo
struct NTV2RegInfo NTV2RegInfo
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
kRegMaskPCMControlA4P7_8
@ kRegMaskPCMControlA4P7_8
Definition: ntv2publicinterface.h:2075
kRegShiftAud3PlayCapMode
@ kRegShiftAud3PlayCapMode
Definition: ntv2publicinterface.h:2268
CNTV2Card::SetHDMIOutAudioRate
virtual bool SetHDMIOutAudioRate(const NTV2AudioRate inNewValue)
Sets the HDMI output's audio rate.
Definition: ntv2audio.cpp:972
NTV2_IS_VALID_AUDIO_LOOPBACK
#define NTV2_IS_VALID_AUDIO_LOOPBACK(_x_)
Definition: ntv2enums.h:2010
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_6
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_6
Definition: ntv2enums.h:1949
kRegShiftNumChannels
@ kRegShiftNumChannels
Definition: ntv2publicinterface.h:2390
kRegShiftPCMControlA5P5_6
@ kRegShiftPCMControlA5P5_6
Definition: ntv2publicinterface.h:3144
kRegAud4SourceSelect
@ kRegAud4SourceSelect
Definition: ntv2publicinterface.h:404
kRegMaskAud2PlayCapMode
@ kRegMaskAud2PlayCapMode
Definition: ntv2publicinterface.h:1182
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1348
CNTV2Card::GetAnalogAudioIOConfiguration
virtual bool GetAnalogAudioIOConfiguration(NTV2AnalogAudioIO &outConfig)
Definition: ntv2audio.cpp:1668
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:1651
kRegAudioMixerMainOutputLevelsPair4
@ kRegAudioMixerMainOutputLevelsPair4
Definition: ntv2publicinterface.h:820
NTV2_IS_VALID_AUDIO_SOURCE
#define NTV2_IS_VALID_AUDIO_SOURCE(_x_)
Definition: ntv2enums.h:1995
sAudioDetectGroups
static const unsigned sAudioDetectGroups[]
Definition: ntv2audio.cpp:1331
NTV2_AUDIO_WRAPADDRESS
#define NTV2_AUDIO_WRAPADDRESS
Definition: ntv2audiodefines.h:13
SDRAMAuditor::AssessDevice
bool AssessDevice(CNTV2Card &inDevice, const bool inIgnoreStoppedAudioBuffers=(0))
Assesses the given device.
Definition: ntv2card.cpp:507
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:1190
NTV2_AudioChannel5_8
@ NTV2_AudioChannel5_8
This selects audio channels 5 thru 8.
Definition: ntv2enums.h:3230
kRegMaskResetAudioOutput
@ kRegMaskResetAudioOutput
Definition: ntv2publicinterface.h:1296
kRegShiftAud1RateHigh
@ kRegShiftAud1RateHigh
Definition: ntv2publicinterface.h:2303
kRegMaskEmbeddedAudioClock
@ kRegMaskEmbeddedAudioClock
Definition: ntv2publicinterface.h:1331
kRegMaskAud5RateHigh
@ kRegMaskAud5RateHigh
Definition: ntv2publicinterface.h:1224
kDeviceGetNumHDMIVideoInputs
@ kDeviceGetNumHDMIVideoInputs
The number of HDMI video inputs on the device.
Definition: ntv2devicefeatures.h:198
kDeviceCanDoAESAudioIn
@ kDeviceCanDoAESAudioIn
True if device has any AES audio inputs or outputs.
Definition: ntv2devicefeatures.h:44
kRegMaskPCMControlA7P7_8
@ kRegMaskPCMControlA7P7_8
Definition: ntv2publicinterface.h:2102
kRegAudioMixerMainInputLevelsPair6
@ kRegAudioMixerMainInputLevelsPair6
Definition: ntv2publicinterface.h:813
kRegAudioMixerMainInputLevelsPair2
@ kRegAudioMixerMainInputLevelsPair2
Definition: ntv2publicinterface.h:809
kRegAudioMixerChannelSelect
@ kRegAudioMixerChannelSelect
Definition: ntv2publicinterface.h:798
kVRegSuspendSystemAudio
@ kVRegSuspendSystemAudio
Definition: ntv2virtualregisters.h:310
kRegShiftPCMControlA6P3_4
@ kRegShiftPCMControlA6P3_4
Definition: ntv2publicinterface.h:3152
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:566
kRegMaskAud3PlayCapMode
@ kRegMaskAud3PlayCapMode
Definition: ntv2publicinterface.h:1183
kRegRotaryEncoder
@ kRegRotaryEncoder
Definition: ntv2publicinterface.h:1042
kRegMaskPCMControlA1P13_14
@ kRegMaskPCMControlA1P13_14
Definition: ntv2publicinterface.h:2051
kRegMaskHDMIOutSourceSelect
@ kRegMaskHDMIOutSourceSelect
Definition: ntv2publicinterface.h:1566
NTV2_AUDIO_AES
@ NTV2_AUDIO_AES
Obtain audio samples from the device AES inputs, if available.
Definition: ntv2enums.h:1983
kRegMaskAudioOutDelay
@ kRegMaskAudioOutDelay
Definition: ntv2publicinterface.h:1437
gAudioDelayRegisterNumbers
static const ULWord gAudioDelayRegisterNumbers[]
Definition: ntv2audio.cpp:43
kRegShiftPCMControlA4P3_4
@ kRegShiftPCMControlA4P3_4
Definition: ntv2publicinterface.h:3134
kRegShiftAudioRate
@ kRegShiftAudioRate
Definition: ntv2publicinterface.h:2392
NTV2_AUDIO_HDMI
@ NTV2_AUDIO_HDMI
Obtain audio samples from the device HDMI input, if available.
Definition: ntv2enums.h:1985
kRegAud1Control
@ kRegAud1Control
Definition: ntv2publicinterface.h:127
NTV2AudioRate
NTV2AudioRate
Definition: ntv2enums.h:1903
kRegMaskNumChannels
@ kRegMaskNumChannels
Definition: ntv2publicinterface.h:1303
kRegMaskPCMControlA3P1_2
@ kRegMaskPCMControlA3P1_2
Definition: ntv2publicinterface.h:2063
CNTV2Card::GetHDMIOutAudioSource2Channel
virtual bool GetHDMIOutAudioSource2Channel(NTV2AudioChannelPair &outValue, NTV2AudioSystem &outAudioSystem)
Answers with the HDMI output's current 2-channel audio source.
Definition: ntv2audio.cpp:885
kRegMaskPCMControlA7P5_6
@ kRegMaskPCMControlA7P5_6
Definition: ntv2publicinterface.h:2101
kRegShiftBOBAnalogLevelControl
@ kRegShiftBOBAnalogLevelControl
Definition: ntv2publicinterface.h:3294
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:863
kRegShiftAud5RateHigh
@ kRegShiftAud5RateHigh
Definition: ntv2publicinterface.h:2307
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:1101
NTV2RegisterNumber
NTV2RegisterNumber
Definition: ntv2publicinterface.h:100
NTV2_AudioChannel9_16
@ NTV2_AudioChannel9_16
This selects audio channels 9 thru 16.
Definition: ntv2enums.h:3279
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5606
kRegMaskOutputStartAtVBI
@ kRegMaskOutputStartAtVBI
Definition: ntv2publicinterface.h:1301
CNTV2Card::WriteAudioSource
virtual bool WriteAudioSource(const ULWord inValue, const NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2audio.cpp:481
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:346
NTV2AudioMixerChannel
NTV2AudioMixerChannel
Definition: ntv2enums.h:3181
kRegMaskPCMControlA5P3_4
@ kRegMaskPCMControlA5P3_4
Definition: ntv2publicinterface.h:2082
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_7
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_7
Definition: ntv2enums.h:1950
kRegMaskAudioRate
@ kRegMaskAudioRate
Definition: ntv2publicinterface.h:1305
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:321
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:3901
kRegPCMControl4321
@ kRegPCMControl4321
Definition: ntv2publicinterface.h:673
kRegShiftAudioAutoErase
@ kRegShiftAudioAutoErase
Definition: ntv2publicinterface.h:2410
NTV2_AnalogAudioIO_8In
@ NTV2_AnalogAudioIO_8In
Definition: ntv2enums.h:2212
kRegAudioMixerAux2InputLevels
@ kRegAudioMixerAux2InputLevels
Definition: ntv2publicinterface.h:806
CNTV2Card::GetDetectedAESChannelPairs
virtual bool GetDetectedAESChannelPairs(NTV2AudioChannelPairs &outDetectedChannelPairs)
Answers which AES/EBU audio channel pairs are present on the device.
Definition: ntv2audio.cpp:1365
NTV2_AUDIO_LOOPBACK_ON
@ NTV2_AUDIO_LOOPBACK_ON
Embeds SDI input source audio into the data stream.
Definition: ntv2enums.h:2006
kRegShiftResetAudioInput
@ kRegShiftResetAudioInput
Definition: ntv2publicinterface.h:2382
kRegShiftPCMControlA1P7_8
@ kRegShiftPCMControlA1P7_8
Definition: ntv2publicinterface.h:3109
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:1230
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:579
kRegMaskEmbeddedAudioInput
@ kRegMaskEmbeddedAudioInput
Definition: ntv2publicinterface.h:1327
kRegShiftPCMControlA5P11_12
@ kRegShiftPCMControlA5P11_12
Definition: ntv2publicinterface.h:3147
kRegMaskPCMControlA2P3_4
@ kRegMaskPCMControlA2P3_4
Definition: ntv2publicinterface.h:2055
NTV2_AUDIO_CHANNEL_QUAD_INVALID
@ NTV2_AUDIO_CHANNEL_QUAD_INVALID
Definition: ntv2enums.h:3262
NTV2_AUDIO_96K
@ NTV2_AUDIO_96K
Definition: ntv2enums.h:1906
CNTV2Card::SetHeadphoneOutputGain
virtual bool SetHeadphoneOutputGain(const ULWord inGainValue)
Sets the gain for the headphone out.
Definition: ntv2audio.cpp:710
kRegMaskEncodedAudioMode
@ kRegMaskEncodedAudioMode
Definition: ntv2publicinterface.h:1306
kRegInputStatus
@ kRegInputStatus
Definition: ntv2publicinterface.h:125
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:1615
std
Definition: json.hpp:5362
kRegShiftPCMControlA1P1_2
@ kRegShiftPCMControlA1P1_2
Definition: ntv2publicinterface.h:3106
NTV2DeviceCanDoBreakoutBoard
bool NTV2DeviceCanDoBreakoutBoard(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:1765
kRegMaskPCMControlA2P7_8
@ kRegMaskPCMControlA2P7_8
Definition: ntv2publicinterface.h:2057
NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16
#define NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16(__p__)
Definition: ntv2enums.h:3160
gAESChannelMappingShifts
static const unsigned gAESChannelMappingShifts[4]
Definition: ntv2audio.cpp:1428
NTV2_AUDIO_EMBEDDED
@ NTV2_AUDIO_EMBEDDED
Obtain audio samples from the audio that's embedded in the video HANC.
Definition: ntv2enums.h:1982
kRegMaskPCMControlA6P13_14
@ kRegMaskPCMControlA6P13_14
Definition: ntv2publicinterface.h:2096
ULWordSequence
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:46
kRegAud2InputLastAddr
@ kRegAud2InputLastAddr
Definition: ntv2publicinterface.h:366
kRegShiftPCMControlA1P9_10
@ kRegShiftPCMControlA1P9_10
Definition: ntv2publicinterface.h:3110
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:1458
kRegMaskEmbeddedOutputSupressCh1
@ kRegMaskEmbeddedOutputSupressCh1
Definition: ntv2publicinterface.h:1300
kRegShiftPCMControlA6P1_2
@ kRegShiftPCMControlA6P1_2
Definition: ntv2publicinterface.h:3151
sAudioMixerInputGainCh2Regs
static const ULWord sAudioMixerInputGainCh2Regs[]
Definition: ntv2audio.cpp:607
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:1094
NTV2_IS_NORMAL_AUDIO_CHANNEL_QUAD
#define NTV2_IS_NORMAL_AUDIO_CHANNEL_QUAD(__p__)
Definition: ntv2enums.h:3268
kRegShiftPCMControlA4P7_8
@ kRegShiftPCMControlA4P7_8
Definition: ntv2publicinterface.h:3136
kRegMaskAnalogIOControl_14
@ kRegMaskAnalogIOControl_14
Definition: ntv2publicinterface.h:1210
kRegShiftAudioInDelay
@ kRegShiftAudioInDelay
Definition: ntv2publicinterface.h:2518
kRegAudioMixerMainOutputLevelsPair1
@ kRegAudioMixerMainOutputLevelsPair1
Definition: ntv2publicinterface.h:817
CNTV2Card::SetAudioMixerOutputChannelsMute
virtual bool SetAudioMixerOutputChannelsMute(const NTV2AudioChannelsMuted16 inMutes)
Mutes or enables the individual output audio channels of the Audio Mixer.
Definition: ntv2audio.cpp:732
kRegMaskPCMControlA6P9_10
@ kRegMaskPCMControlA6P9_10
Definition: ntv2publicinterface.h:2094
kRegShiftAudioMixerInputLeftLevel
@ kRegShiftAudioMixerInputLeftLevel
Definition: ntv2publicinterface.h:3247
kRegMaskPCMControlA6P1_2
@ kRegMaskPCMControlA6P1_2
Definition: ntv2publicinterface.h:2090
NTV2FrameGeometry
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:339
kRegMaskPCMControlA8P15_16
@ kRegMaskPCMControlA8P15_16
Definition: ntv2publicinterface.h:2115
gAudioSystemToSrcSelectRegNum
static const ULWord gAudioSystemToSrcSelectRegNum[]
Definition: ntv2audio.cpp:28
kRegAud6Control
@ kRegAud6Control
Definition: ntv2publicinterface.h:606
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:1643
kRegMaskResetAudioInput
@ kRegMaskResetAudioInput
Definition: ntv2publicinterface.h:1295
kRegShiftAudioMixerAux1x2CHInput
@ kRegShiftAudioMixerAux1x2CHInput
Definition: ntv2publicinterface.h:3202
kRegMaskPCMControlA8P11_12
@ kRegMaskPCMControlA8P11_12
Definition: ntv2publicinterface.h:2113
kRegAudioMixerMainOutputLevelsPair7
@ kRegAudioMixerMainOutputLevelsPair7
Definition: ntv2publicinterface.h:823
kRegMaskPCMControlA8P1_2
@ kRegMaskPCMControlA8P1_2
Definition: ntv2publicinterface.h:2108
NTV2_AudioChannel1_8
@ NTV2_AudioChannel1_8
This selects audio channels 1 thru 8.
Definition: ntv2enums.h:3278
true
#define true
Definition: ntv2devicefeatures.h:26
kRegMaskPCMControlA4P9_10
@ kRegMaskPCMControlA4P9_10
Definition: ntv2publicinterface.h:2076
sAudioMixerInputMuteMasks
static const ULWord sAudioMixerInputMuteMasks[]
Definition: ntv2audio.cpp:717
kDeviceGetMaxAudioChannels
@ kDeviceGetMaxAudioChannels
The maximum number of audio channels that a single Audio System can support on the device.
Definition: ntv2devicefeatures.h:174
NTV2_AnalogAudioIO_8Out
@ NTV2_AnalogAudioIO_8Out
Definition: ntv2enums.h:2209
kRegMaskHDMIOut8ChGroupSelect
@ kRegMaskHDMIOut8ChGroupSelect
Definition: ntv2publicinterface.h:1520
kRegMaskAudioMixerOutputChannelsMute
@ kRegMaskAudioMixerOutputChannelsMute
Definition: ntv2publicinterface.h:2144
kRegMaskPCMControlA8P7_8
@ kRegMaskPCMControlA8P7_8
Definition: ntv2publicinterface.h:2111
kRegBOBAudioControl
@ kRegBOBAudioControl
Definition: ntv2publicinterface.h:1062
NTV2_AUDIO_BUFFER_INVALID
@ NTV2_AUDIO_BUFFER_INVALID
Definition: ntv2enums.h:1895
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:226
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:623
NTV2Audio4ChannelSelect
NTV2Audio4ChannelSelect
Identifies a contiguous, adjacent group of four audio channels.
Definition: ntv2enums.h:3227
kRegMaskEmbeddedOutputSupressCh2
@ kRegMaskEmbeddedOutputSupressCh2
Definition: ntv2publicinterface.h:1302
NTV2DeviceHasRotaryEncoder
bool NTV2DeviceHasRotaryEncoder(const NTV2DeviceID inDeviceID)
Definition: ntv2devicefeatures.hpp:7450
kRegShiftEmbeddedAudioInput2
@ kRegShiftEmbeddedAudioInput2
Definition: ntv2publicinterface.h:2414
kRegMaskMonitorSource
@ kRegMaskMonitorSource
Definition: ntv2publicinterface.h:1888
kRegMaskAud4PlayCapMode
@ kRegMaskAud4PlayCapMode
Definition: ntv2publicinterface.h:1184
kDeviceGetActiveMemorySize
@ kDeviceGetActiveMemorySize
The size, in bytes, of the device's active RAM available for video and audio.
Definition: ntv2devicefeatures.h:169
NTV2EncodedAudioMode
NTV2EncodedAudioMode
Definition: ntv2enums.h:1915
NTV2AudioChannelPairsConstIter
NTV2AudioChannelPairs::const_iterator NTV2AudioChannelPairsConstIter
Handy const iterator to iterate over a set of distinct NTV2AudioChannelPair values.
Definition: ntv2publicinterface.h:59
kRegMaskPCMControlA8P9_10
@ kRegMaskPCMControlA8P9_10
Definition: ntv2publicinterface.h:2112
NTV2_AUDIOSYSTEM_5
@ NTV2_AUDIOSYSTEM_5
This identifies the 5th Audio System.
Definition: ntv2enums.h:3854
CNTV2Card::GetHeadphoneOutputGain
virtual bool GetHeadphoneOutputGain(ULWord &outGainValue)
Answers with the current gain setting for the headphone out.
Definition: ntv2audio.cpp:702
sAudioDetectRegs
static const ULWord sAudioDetectRegs[]
Definition: ntv2audio.cpp:1326
kRegMaskPCMControlA2P11_12
@ kRegMaskPCMControlA2P11_12
Definition: ntv2publicinterface.h:2059
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:914
kDeviceGetTotalNumAudioSystems
@ kDeviceGetTotalNumAudioSystems
The total number of audio systems on the device, including host audio and mixer audio systems,...
Definition: ntv2devicefeatures.h:215
kRegAud2OutputLastAddr
@ kRegAud2OutputLastAddr
Definition: ntv2publicinterface.h:365
kRegMaskAud8RateHigh
@ kRegMaskAud8RateHigh
Definition: ntv2publicinterface.h:1227
kRegAud2SourceSelect
@ kRegAud2SourceSelect
Definition: ntv2publicinterface.h:364
kRegMaskAudioSource
@ kRegMaskAudioSource
Definition: ntv2publicinterface.h:1326
NTV2_AUDIO_ANALOG
@ NTV2_AUDIO_ANALOG
Obtain audio samples from the device analog input(s), if available.
Definition: ntv2enums.h:1984
kRegShiftPCMControlA2P13_14
@ kRegShiftPCMControlA2P13_14
Definition: ntv2publicinterface.h:3121
kRegShiftPCMControlA7P1_2
@ kRegShiftPCMControlA7P1_2
Definition: ntv2publicinterface.h:3160
gAudioSystemToAudioControlRegNum
static const ULWord gAudioSystemToAudioControlRegNum[]
Definition: ntv2audio.cpp:45
kRegShiftPCMControlA8P1_2
@ kRegShiftPCMControlA8P1_2
Definition: ntv2publicinterface.h:3169
NTV2_AudioChannel15_16
@ NTV2_AudioChannel15_16
This selects audio channels 15 and 16 (Group 4 channels 3 and 4)
Definition: ntv2enums.h:3096
kRegShiftPauseAudio
@ kRegShiftPauseAudio
Definition: ntv2publicinterface.h:2385
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:146
kRegAudioMixerMainInputLevelsPair3
@ kRegAudioMixerMainInputLevelsPair3
Definition: ntv2publicinterface.h:810
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:249
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:1390
kRegShiftAudioOutDelay
@ kRegShiftAudioOutDelay
Definition: ntv2publicinterface.h:2519
kRegMaskAud6RateHigh
@ kRegMaskAud6RateHigh
Definition: ntv2publicinterface.h:1225
kRegMaskEmbeddedAudioInput2
@ kRegMaskEmbeddedAudioInput2
Definition: ntv2publicinterface.h:1332
kRegShiftPCMControlA7P7_8
@ kRegShiftPCMControlA7P7_8
Definition: ntv2publicinterface.h:3163
NTV2EmbeddedAudioInput
NTV2EmbeddedAudioInput
This enum value determines/states which SDI video input will be used to supply audio samples to an au...
Definition: ntv2enums.h:1942
SDRAMAuditor::GetBadRegions
bool GetBadRegions(ULWordSequence &outBlks) const
Answers with the list of colliding and illegal memory regions.
Definition: ntv2card.h:6656
kRegShiftAud4RateHigh
@ kRegShiftAud4RateHigh
Definition: ntv2publicinterface.h:2306
NTV2_IS_VALID_AUDIO_CHANNEL_PAIR
#define NTV2_IS_VALID_AUDIO_CHANNEL_PAIR(__p__)
Definition: ntv2enums.h:3159
kRegMaskPCMControlA5P9_10
@ kRegMaskPCMControlA5P9_10
Definition: ntv2publicinterface.h:2085
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:1198
kRegAudioMixerMainOutputLevelsPair2
@ kRegAudioMixerMainOutputLevelsPair2
Definition: ntv2publicinterface.h:818
BIT
#define BIT(_x_)
Definition: ajatypes.h:563
kRegShiftPCMControlA3P5_6
@ kRegShiftPCMControlA3P5_6
Definition: ntv2publicinterface.h:3126
NTV2_AudioChannel1_4
@ NTV2_AudioChannel1_4
This selects audio channels 1 thru 4.
Definition: ntv2enums.h:3229
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3848
kRegMask20BitMode
@ kRegMask20BitMode
Definition: ntv2publicinterface.h:1292
NTV2_IS_VALID_AUDIO_SYSTEM
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
Definition: ntv2enums.h:3867
kRegShiftPCMControlA3P1_2
@ kRegShiftPCMControlA3P1_2
Definition: ntv2publicinterface.h:3124
NTV2_AudioChannel1_2
@ NTV2_AudioChannel1_2
This selects audio channels 1 and 2 (Group 1 channels 1 and 2)
Definition: ntv2enums.h:3089
BitMasksToNTV2AudioChannelPairs
static NTV2AudioChannelPairs BitMasksToNTV2AudioChannelPairs(const ULWord inBitMask, const ULWord inExtendedBitMask)
Definition: ntv2audio.cpp:1468
kRegAudioMixerMainGain
@ kRegAudioMixerMainGain
Definition: ntv2publicinterface.h:795
kRegMaskPCMControlA6P7_8
@ kRegMaskPCMControlA6P7_8
Definition: ntv2publicinterface.h:2093
NTV2_AudioChannel9_12
@ NTV2_AudioChannel9_12
This selects audio channels 9 thru 12.
Definition: ntv2enums.h:3231
CNTV2Card::GetHDMIOutAudioFormat
virtual bool GetHDMIOutAudioFormat(NTV2AudioFormat &outValue)
Answers with the HDMI output's current audio format.
Definition: ntv2audio.cpp:990
kK2RegMaskAudioBufferSize
@ kK2RegMaskAudioBufferSize
Definition: ntv2publicinterface.h:1317
NTV2Audio8ChannelSelect
NTV2Audio8ChannelSelect
Identifies a contiguous, adjacent group of eight audio channels.
Definition: ntv2enums.h:3276
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:1169
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_2
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_2
Definition: ntv2enums.h:1945
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:1237
NTV2AudioSource
NTV2AudioSource
This enum value determines/states where an audio system will obtain its audio samples.
Definition: ntv2enums.h:1980
gChannelToAudioInLastAddrRegNum
static const ULWord gChannelToAudioInLastAddrRegNum[]
Definition: ntv2audio.cpp:31
CNTV2Card::SetAudioAnalogLevel
virtual bool SetAudioAnalogLevel(const NTV2AudioLevel value, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1)
Definition: ntv2audio.cpp:280
kRegShiftPCMControlA1P13_14
@ kRegShiftPCMControlA1P13_14
Definition: ntv2publicinterface.h:3112
kRegShiftAudioMixerAux2x2CHInput
@ kRegShiftAudioMixerAux2x2CHInput
Definition: ntv2publicinterface.h:3203
CNTV2Card::SetHDMIOutAudioFormat
virtual bool SetHDMIOutAudioFormat(const NTV2AudioFormat inNewValue)
Sets the HDMI output's audio format.
Definition: ntv2audio.cpp:984
kRegMaskAudioMixerInputRightLevel
@ kRegMaskAudioMixerInputRightLevel
Definition: ntv2publicinterface.h:2187
NTV2_AUDIO_READBUFFEROFFSET_BIG
#define NTV2_AUDIO_READBUFFEROFFSET_BIG
Definition: ntv2audiodefines.h:19
CNTV2Card::GetAudioMemoryOffset
virtual bool GetAudioMemoryOffset(const ULWord inOffsetBytes, ULWord &outAbsByteOffset, const NTV2AudioSystem inAudioSystem, const bool inCaptureBuffer=(0))
Answers with the byte offset in device SDRAM into the specified Audio System's audio buffer.
Definition: ntv2audio.cpp:1723
kRegMaskPCMControlA3P13_14
@ kRegMaskPCMControlA3P13_14
Definition: ntv2publicinterface.h:2069
kRegShiftPCMControlA8P7_8
@ kRegShiftPCMControlA8P7_8
Definition: ntv2publicinterface.h:3172
kRegMaskHDMIOutAudioCh
@ kRegMaskHDMIOutAudioCh
Definition: ntv2publicinterface.h:1535
kRegShiftMonitorSource
@ kRegShiftMonitorSource
Definition: ntv2publicinterface.h:2952
kRegShiftHDMIOutAudioSource
@ kRegShiftHDMIOutAudioSource
Definition: ntv2publicinterface.h:2953
kRegShiftAudioMixerAux1InputEnable
@ kRegShiftAudioMixerAux1InputEnable
Definition: ntv2publicinterface.h:3223
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:764
kRegAud2Control
@ kRegAud2Control
Definition: ntv2publicinterface.h:363
kRegMaskPCMControlA5P7_8
@ kRegMaskPCMControlA5P7_8
Definition: ntv2publicinterface.h:2084
NTV2AudioBufferSize
NTV2AudioBufferSize
Represents the size of the audio buffer used by a device audio system for storing captured samples or...
Definition: ntv2enums.h:1889
kRegAud3Delay
@ kRegAud3Delay
Definition: ntv2publicinterface.h:431
kRegAud6Delay
@ kRegAud6Delay
Definition: ntv2publicinterface.h:669
NTV2_AUDIO_SOURCE_INVALID
@ NTV2_AUDIO_SOURCE_INVALID
Definition: ntv2enums.h:1988
NTV2RegInfo
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
Definition: ntv2publicinterface.h:3931
CNTV2Card::SetAudioMixerLevelsSampleCount
virtual bool SetAudioMixerLevelsSampleCount(const ULWord inSampleCount)
Sets the Audio Mixer's sample count it uses for measuring audio levels.
Definition: ntv2audio.cpp:837
kRegAudioMixerMainInputLevelsPair4
@ kRegAudioMixerMainInputLevelsPair4
Definition: ntv2publicinterface.h:811
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:739
debug.h
Declares the AJADebug class.
kRegMaskAudioMixerAux2InputEnable
@ kRegMaskAudioMixerAux2InputEnable
Definition: ntv2publicinterface.h:2163
kRegMaskPCMControlA7P1_2
@ kRegMaskPCMControlA7P1_2
Definition: ntv2publicinterface.h:2099
kRegMaskPCMControlA7P13_14
@ kRegMaskPCMControlA7P13_14
Definition: ntv2publicinterface.h:2105
kRegMaskAud5PlayCapMode
@ kRegMaskAud5PlayCapMode
Definition: ntv2publicinterface.h:1185
kRegPCMControl8765
@ kRegPCMControl8765
Definition: ntv2publicinterface.h:674
kRegMaskPCMControlA7P3_4
@ kRegMaskPCMControlA7P3_4
Definition: ntv2publicinterface.h:2100
NTV2_NUM_AUDIOSYSTEMS
@ NTV2_NUM_AUDIOSYSTEMS
Definition: ntv2enums.h:3859
gAudioPlayCaptureModeMasks
static const ULWord gAudioPlayCaptureModeMasks[]
Definition: ntv2audio.cpp:37
kRegShiftPCMControlA5P15_16
@ kRegShiftPCMControlA5P15_16
Definition: ntv2publicinterface.h:3149
kRegAud1Detect
@ kRegAud1Detect
Definition: ntv2publicinterface.h:126
kRegShiftHDMIOutAudioRate
@ kRegShiftHDMIOutAudioRate
Definition: ntv2publicinterface.h:2642
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_5
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_5
Definition: ntv2enums.h:1948
kRegMaskMultiLinkAudio
@ kRegMaskMultiLinkAudio
Definition: ntv2publicinterface.h:1308
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:609
kRegMaskAudioMixerAux1x2CHInput
@ kRegMaskAudioMixerAux1x2CHInput
Definition: ntv2publicinterface.h:2141
kRegAud7SourceSelect
@ kRegAud7SourceSelect
Definition: ntv2publicinterface.h:612
kRegShiftPCMControlA8P15_16
@ kRegShiftPCMControlA8P15_16
Definition: ntv2publicinterface.h:3176
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:205
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_3
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_3
Definition: ntv2enums.h:1946
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3860