AJA NTV2 SDK  17.6.0.2675
NTV2 SDK 17.6.0.2675
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 (IsSupported(kDeviceHasBreakoutBoard))
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 (IsSupported(kDeviceHasBreakoutBoard))
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 (IsSupported(kDeviceCanDoBreakoutBoard))
508  result = EnableBOBAnalogAudioIn(IsSupported(kDeviceHasBreakoutBoard) && inAudioSource == NTV2_AUDIO_ANALOG);
509  }
510  return result;
511 
512 } // SetAudioSystemInputSource
513 
514 
515 bool CNTV2Card::GetAudioSystemInputSource (const NTV2AudioSystem inAudioSystem, NTV2AudioSource & outAudioSource, NTV2EmbeddedAudioInput & outEmbeddedSource)
516 {
517  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
518  return false;
519  ULWord regValue (0);
520 
521  outAudioSource = NTV2_AUDIO_SOURCE_INVALID;
522  outEmbeddedSource = NTV2_EMBEDDED_AUDIO_INPUT_INVALID;
523 
524  if (ULWord(inAudioSystem) >= GetNumSupported(kDeviceGetTotalNumAudioSystems))
525  return false; // Invalid audio system
526  if (!ReadRegister (gAudioSystemToSrcSelectRegNum [inAudioSystem], regValue, kRegMaskAudioSource, kRegShiftAudioSource))
527  return false;
528  switch (regValue & 0x0000000F)
529  {
530  case 0x1: outAudioSource = NTV2_AUDIO_EMBEDDED; break;
531  case 0x0: outAudioSource = NTV2_AUDIO_AES; break;
532  case 0x9: outAudioSource = NTV2_AUDIO_ANALOG; break;
533  case 0xA: outAudioSource = NTV2_AUDIO_HDMI; break;
534  case 0xB: outAudioSource = NTV2_AUDIO_MIC; break;
535  default: return false;
536  }
537 
538  if (outAudioSource == NTV2_AUDIO_EMBEDDED)
539  GetEmbeddedAudioInput(outEmbeddedSource, inAudioSystem);
540  return true;
541 
542 }
543 
544 
547 
548 
550 {
551  outAudioSystem = NTV2_AUDIOSYSTEM_INVALID;
552  if (!IsSupported(kDeviceCanDoAudioMixer))
553  return false; // No Audio Mixer -- shouldn't be calling this function
554  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
555  return false; // Bad Mixer Input specified
557  sAudioMixerInputSelectMasks[inMixerInput],
558  sAudioMixerInputSelectShifts[inMixerInput]);
559 }
560 
562 {
563  if (!IsSupported(kDeviceCanDoAudioMixer))
564  return false; // No Audio Mixer -- shouldn't be calling this function
565  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
566  return false; // Bad Mixer Input specified
567  if (ULWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumAudioSystems) + 1)
568  return false; // No such audio system on this device
569  return WriteRegister (kRegAudioMixerInputSelects, ULWord(inAudioSystem),
570  sAudioMixerInputSelectMasks[inMixerInput],
571  sAudioMixerInputSelectShifts[inMixerInput]);
572 }
573 
575 {
576  outChannelPair = NTV2_AUDIO_CHANNEL_PAIR_INVALID;
577  if (!IsSupported(kDeviceCanDoAudioMixer))
578  return false; // No Audio Mixer -- shouldn't be calling this function
579  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
580  return false; // Bad Mixer Input specified
581  if (NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
585  outChannelPair = NTV2_AudioChannel1_2; // Aux1/Aux2 always use 1&2
586  return true;
587 }
588 
590 {
591  if (!IsSupported(kDeviceCanDoAudioMixer))
592  return false; // No Audio Mixer -- shouldn't be calling this function
593  if (!NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
594  return false; // Can only change Main channel selection
595  if (!NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16(inChannelPair))
596  return false; // Only audio channels 1 thru 16 allowed
597  return WriteRegister (kRegAudioMixerChannelSelect, ULWord(inChannelPair),
599 }
600 
603 
604 bool CNTV2Card::GetAudioMixerInputGain (const NTV2AudioMixerInput inMixerInput, const NTV2AudioMixerChannel inChannel, ULWord & outGainValue)
605 {
606  outGainValue = 0;
607  if (!IsSupported(kDeviceCanDoAudioMixer))
608  return false; // No Audio Mixer -- shouldn't be calling this function
609  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
610  return false; // Bad Mixer Input specified
611  if (!NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2(inChannel))
612  return false; // Bad audio channel specified -- must be Ch1 or Ch2
613  return ReadRegister (inChannel == NTV2_AudioMixerChannel1
614  ? sAudioMixerInputGainCh1Regs[inMixerInput]
615  : sAudioMixerInputGainCh2Regs[inMixerInput], outGainValue);
616 }
617 
618 bool CNTV2Card::SetAudioMixerInputGain (const NTV2AudioMixerInput inMixerInput, const NTV2AudioMixerChannel inChannel, const ULWord inGainValue)
619 {
620  if (!IsSupported(kDeviceCanDoAudioMixer))
621  return false; // No Audio Mixer -- shouldn't be calling this function
622  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
623  return false; // Bad Mixer Input specified
624  if (!NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2(inChannel))
625  return false; // Bad audio channel specified -- must be Ch1 or Ch2
626  return WriteRegister(inChannel == NTV2_AudioMixerChannel1
627  ? sAudioMixerInputGainCh1Regs[inMixerInput]
628  : sAudioMixerInputGainCh2Regs[inMixerInput], inGainValue);
629 }
630 
632 {
633  outGainValue = 0;
634  if (!IsSupported(kDeviceCanDoAudioMixer))
635  return false; // No Audio Mixer -- shouldn't be calling this function
636  return ReadRegister (kRegAudioMixerOutGain, outGainValue);
637 }
638 
640 {
641  if (!IsSupported(kDeviceCanDoAudioMixer))
642  return false; // No Audio Mixer -- shouldn't be calling this function
643  WriteRegister(kRegAudioMixerOutLGain, inGainValue);
644  return WriteRegister(kRegAudioMixerOutRGain, inGainValue);
645 }
646 
648  vector<uint32_t> & outLevels)
649 {
654  outLevels.clear();
655  if (!IsSupported(kDeviceCanDoAudioMixer))
656  return false;
657 
658  // If caller specified empty channelPairs set, do "all" possible pairs...
659  NTV2AudioChannelPairs chanPairs;
660  if (inChannelPairs.empty())
661  {
663  chanPairs.insert(chPr); // Main supports Ch 1-16
664  }
665  else
666  chanPairs = inChannelPairs; // Non-empty set: do what the caller requested
667 
668  // Build a bulk register read...
669  NTV2RegisterReads regs;
670  std::set<ULWord> regsToRead;
671  for (NTV2AudioChannelPairsConstIter it(chanPairs.begin()); it != chanPairs.end(); ++it)
672  {
673  const NTV2AudioChannelPair chanPair(*it);
675  return false;
676  uint32_t regNum(gAudMxrMainOutLvlRegs[chanPair]);
677  regsToRead.insert(regNum);
678  } // for each audio channel pair
679  for (std::set<ULWord>::const_iterator it(regsToRead.begin()); it != regsToRead.end(); ++it)
680  regs.push_back(NTV2RegInfo(*it));
681 
682  // Read the level registers...
683  const bool result(ReadRegisters(regs));
684  if (result)
685  for (NTV2RegisterReadsConstIter it(regs.begin()); it != regs.end(); ++it)
686  {
687  ULWord rawLevels(it->IsValid() ? it->registerValue : 0);
688  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputLeftLevel) >> kRegShiftAudioMixerInputLeftLevel));
689  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputRightLevel) >> kRegShiftAudioMixerInputRightLevel));
690  }
691  else
692  while (outLevels.size() < chanPairs.size() * 2)
693  outLevels.push_back(0);
694  return result;
695 }
696 
698 {
699  outGainValue = 0;
700  if (!IsSupported(kDeviceHasRotaryEncoder))
701  return false; // No Rotary Encoder control
702  return ReadRegister (kRegRotaryEncoder, outGainValue, kRegMaskRotaryEncoderGain, kRegShiftRotaryEncoderGain);
703 }
704 
706 {
707  if (!IsSupported(kDeviceHasRotaryEncoder))
708  return false; // No Rotary Encoder control
709  return WriteRegister(kRegRotaryEncoder, inGainValue, kRegMaskRotaryEncoderGain, kRegShiftRotaryEncoderGain);
710 }
711 
714 
716 {
717  outMutes.reset();
718  if (!IsSupported(kDeviceCanDoAudioMixer))
719  return false; // No Audio Mixer -- shouldn't be calling this function
720  unsigned long ulongvalue(0);
722  return false;
723  outMutes = NTV2AudioChannelsMuted16(ulongvalue); // Hardware uses 1=mute 0=enabled
724  return true;
725 }
726 
728 {
729  if (!IsSupported(kDeviceCanDoAudioMixer))
730  return false; // No Audio Mixer -- shouldn't be calling this function
732 }
733 
735 {
736  outMutes.reset();
737  if (!IsSupported(kDeviceCanDoAudioMixer))
738  return false; // No Audio Mixer -- shouldn't be calling this function
739  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
740  return false; // Bad Mixer Input specified
741  ULWord muteBits(0);
742  if (!ReadRegister(kRegAudioMixerMutes, muteBits, sAudioMixerInputMuteMasks[inMixerInput], sAudioMixerInputMuteShifts[inMixerInput]))
743  return false;
744  outMutes = NTV2AudioChannelsMuted16(muteBits);
745  return true;
746 }
747 
749 {
750  if (!IsSupported(kDeviceCanDoAudioMixer))
751  return false; // No Audio Mixer -- shouldn't be calling this function
752  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
753  return false; // Bad Mixer Input specified
754  const ULWord muteBits(ULWord(inMutes.to_ulong()));
755  return WriteRegister (kRegAudioMixerMutes, muteBits, sAudioMixerInputMuteMasks[inMixerInput], sAudioMixerInputMuteShifts[inMixerInput]);
756 }
757 
758 
760  const NTV2AudioChannelPairs & inChannelPairs,
761  vector<uint32_t> & outLevels)
762 {
767  outLevels.clear();
768  if (!IsSupported(kDeviceCanDoAudioMixer))
769  return false;
770  if (!NTV2_IS_VALID_AUDIO_MIXER_INPUT(inMixerInput))
771  return false;
772 
773  // If caller specified empty channelPairs set, do "all" possible pairs...
774  NTV2AudioChannelPairs chanPairs;
775  if (inChannelPairs.empty())
776  {
777  if (!NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
778  chanPairs.insert(NTV2_AudioChannel1_2); // Aux1/Aux2 only support Ch1&2
779  else
781  chanPairs.insert(chPr); // Main supports Ch 1-16
782  }
783  else
784  chanPairs = inChannelPairs; // Non-empty set: do what the caller requested
785 
786  // Build a bulk register read...
787  NTV2RegisterReads regs;
788  std::set<ULWord> regsToRead;
789  for (NTV2AudioChannelPairsConstIter it(chanPairs.begin()); it != chanPairs.end(); ++it)
790  {
791  const NTV2AudioChannelPair chanPair(*it);
793  return false;
794  uint32_t regNum(gAudMxrMainInLvlRegs[chanPair]);
795  if (!NTV2_IS_AUDIO_MIXER_INPUT_MAIN(inMixerInput))
796  {
797  if (chanPair != NTV2_AudioChannel1_2)
798  return false; // Aux1 & Aux2 can only report Chan 1&2 levels
799  regNum = (inMixerInput == NTV2_AudioMixerInputAux1)
802  }
803  regsToRead.insert(regNum);
804  } // for each audio channel pair
805  for (std::set<ULWord>::const_iterator it(regsToRead.begin()); it != regsToRead.end(); ++it)
806  regs.push_back(NTV2RegInfo(*it));
807 
808  // Read the level registers...
809  const bool result(ReadRegisters(regs));
810  if (result)
811  for (NTV2RegisterReadsConstIter it(regs.begin()); it != regs.end(); ++it)
812  {
813  ULWord rawLevels(it->IsValid() ? it->registerValue : 0);
814  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputLeftLevel) >> kRegShiftAudioMixerInputLeftLevel));
815  outLevels.push_back(uint32_t((rawLevels & kRegMaskAudioMixerInputRightLevel) >> kRegShiftAudioMixerInputRightLevel));
816  }
817  else
818  while (outLevels.size() < chanPairs.size() * 2)
819  outLevels.push_back(0);
820  return result;
821 }
822 
824 {
825  outSampleCount = 0;
827  return false;
828  outSampleCount = 1 << outSampleCount;
829  return true;
830 }
831 
833 {
834  if (!inSampleCount)
835  return false; // Must be > 0
836  if (inSampleCount > 0x00008000)
837  return false; // Must be <= 0x8000
838  ULWord result(0), sampleCount(inSampleCount);
839  while (sampleCount >>= 1)
840  ++result;
842 }
843 
844 
845 
847 {
849 
850  if (!GetHDMIOutControlReg(reg, inWhichHDMIOut))
851  return false;
852 
853  return WriteRegister (reg, ULWord(value), kRegMaskHDMIOutAudioCh, kRegShiftHDMIOutAudioCh);
854 }
855 
856 
858 {
860 
861  if (!GetHDMIOutControlReg(reg, inWhichHDMIOut))
862  return false;
863 
865 }
866 
867 
868 bool CNTV2Card::SetHDMIOutAudioSource2Channel (const NTV2AudioChannelPair inValue, const NTV2AudioSystem inAudioSystem, const NTV2Channel inWhichHDMIOut)
869 {
871  ULWord regOC(kRegHDMIOutControl);
872 
873  if (!NTV2_IS_VALID_AUDIO_CHANNEL_PAIR (inValue))
874  return false;
875 
876  if (GetNumSupported(kDeviceGetHDMIVersion) > 3)
877  {
878  if (!GetHDMIOutInputControlRegNum(regIC, inWhichHDMIOut))
879  return false;
880  if (!GetHDMIOutControlReg(regOC, inWhichHDMIOut))
881  return false;
882 
884  ULWord channelSelect = static_cast<ULWord>(inValue) % 4;
885  WriteRegister (regIC, inAudioSystem, kRegMaskHDMIOutSourceSelect, kRegShiftHDMIOutSourceSelect);
886  WriteRegister (regOC, bankSelect, kRegMaskHDMIOut8ChGroupSelect, kRegShiftHDMIOut8ChGroupSelect);
887  WriteRegister (regIC, channelSelect, kRegMaskHDMIOutAudio2ChannelSelect, kRegShiftHDMIOutAudio2ChannelSelect);
888  return SetHDMIOutAudioChannels(NTV2_HDMIAudio2Channels, inWhichHDMIOut);
889  }
890  else
891  {
892  const ULWord encoding ((ULWord (inAudioSystem) << 4) | inValue);
894  }
895 }
896 
897 
898 bool CNTV2Card::GetHDMIOutAudioSource2Channel (NTV2AudioChannelPair & outValue, NTV2AudioSystem & outAudioSystem, const NTV2Channel inWhichHDMIOut)
899 {
901  ULWord regOC(kRegHDMIOutControl);
902  bool result = false;
903 
904  if (GetNumSupported(kDeviceGetHDMIVersion) > 3)
905  {
906  if (!GetHDMIOutInputControlRegNum(regIC, inWhichHDMIOut))
907  return false;
908  if (!GetHDMIOutControlReg(regOC, inWhichHDMIOut))
909  return false;
910 
911  ULWord engineSelect (0), channelSelect(0), bankSelect(0);
912  result = ReadRegister(regIC, engineSelect, kRegMaskHDMIOutSourceSelect, kRegShiftHDMIOutSourceSelect);
913  if (result)
914  {
915  outAudioSystem = NTV2AudioSystem(engineSelect);
916  result = ReadRegister(regIC, channelSelect, kRegMaskHDMIOutAudio2ChannelSelect, kRegShiftHDMIOutAudio2ChannelSelect);
917  result = ReadRegister(regOC, bankSelect, kRegMaskHDMIOut8ChGroupSelect, kRegShiftHDMIOut8ChGroupSelect);
918  outValue = NTV2AudioChannelPair((bankSelect == 0 ? 0 : 4) + channelSelect);
919  }
920  }
921  else
922  {
923  ULWord encoding (0);
925  if (result)
926  {
927  outValue = NTV2AudioChannelPair(encoding & 0x7);
928  outAudioSystem = NTV2AudioSystem(encoding >> 4);
929  }
930  }
931  return result;
932 }
933 
934 
935 bool CNTV2Card::SetHDMIOutAudioSource8Channel (const NTV2Audio8ChannelSelect inValue, const NTV2AudioSystem inAudioSystem, const NTV2Channel inWhichHDMIOut)
936 {
938  ULWord regOC(kRegHDMIOutControl);
939 
940  if (!NTV2_IS_VALID_AUDIO_CHANNEL_OCTET (inValue))
941  return false;
942 
943  if (GetNumSupported(kDeviceGetHDMIVersion) > 3)
944  {
945  if (!GetHDMIOutInputControlRegNum(regIC, inWhichHDMIOut))
946  return false;
947  if (!GetHDMIOutControlReg(regOC, inWhichHDMIOut))
948  return false;
949 
951  WriteRegister (regIC, inAudioSystem, kRegMaskHDMIOutSourceSelect, kRegShiftHDMIOutSourceSelect);
952  WriteRegister (regOC, channelSelect, kRegMaskHDMIOut8ChGroupSelect, kRegShiftHDMIOut8ChGroupSelect);
953  return SetHDMIOutAudioChannels(NTV2_HDMIAudio8Channels, inWhichHDMIOut);
954  }
955  else
956  {
957  ULWord encoding (0);
958  ULWord ch (ULWord (inAudioSystem) << 2);
959  if (inValue == NTV2_AudioChannel1_8)
960  encoding = (ch + NTV2_AudioChannel1_4) | ((ch + NTV2_AudioChannel5_8) << 4);
961  else
962  encoding = (ch + NTV2_AudioChannel9_12) | ((ch + NTV2_AudioChannel13_16) << 4);
963 
965  }
966 }
967 
968 
969 bool CNTV2Card::GetHDMIOutAudioSource8Channel (NTV2Audio8ChannelSelect & outValue, NTV2AudioSystem & outAudioSystem, const NTV2Channel inWhichHDMIOut)
970 {
972  ULWord regOC(kRegHDMIOutControl);
973  bool result = false;
974 
975  if (GetNumSupported(kDeviceGetHDMIVersion) > 3)
976  {
977  if (!GetHDMIOutInputControlRegNum(regIC, inWhichHDMIOut))
978  return false;
979  if (!GetHDMIOutControlReg(regOC, inWhichHDMIOut))
980  return false;
981 
982  ULWord engineSelect (0), channelSelect(0);
983  result = ReadRegister(regOC, channelSelect, kRegMaskHDMIOut8ChGroupSelect, kRegShiftHDMIOut8ChGroupSelect);
984  if (result)
985  {
986  outValue = channelSelect == 1 ? NTV2_AudioChannel9_16 : NTV2_AudioChannel1_8;
987  result = ReadRegister(regIC, engineSelect, kRegMaskHDMIOutSourceSelect, kRegShiftHDMIOutSourceSelect);
988  outAudioSystem = static_cast <NTV2AudioSystem> (engineSelect);
989  }
990  }
991  else
992  {
993  ULWord encoding (0);
995  if (result)
996  {
997  if ((encoding & 0x3) == static_cast <ULWord> (NTV2_AudioChannel1_4))
998  outValue = NTV2_AudioChannel1_8;
999  else
1000  outValue = NTV2_AudioChannel9_16;
1001 
1002  outAudioSystem = static_cast <NTV2AudioSystem> ((encoding & 0xC) >> 2);
1003  }
1004  }
1005  return result;
1006 }
1007 
1008 
1009 bool CNTV2Card::SetHDMIOutAudioRate (const NTV2AudioRate inNewValue, const NTV2Channel inWhichHDMIOut)
1010 {
1012 
1013  if (!GetHDMIOutInputControlRegNum(reg, inWhichHDMIOut))
1014  return false;
1015 
1016  return WriteRegister (reg, static_cast <ULWord> (inNewValue), kRegMaskHDMIOutAudioRate, kRegShiftHDMIOutAudioRate);
1017 }
1018 
1019 
1020 bool CNTV2Card::GetHDMIOutAudioRate (NTV2AudioRate & outValue, const NTV2Channel inWhichHDMIOut)
1021 {
1023 
1024  if (!GetHDMIOutInputControlRegNum(reg, inWhichHDMIOut))
1025  return false;
1026 
1028 }
1029 
1030 
1031 bool CNTV2Card::SetHDMIOutAudioFormat (const NTV2AudioFormat inNewValue, const NTV2Channel inWhichHDMIOut)
1032 {
1034 
1035  if (!GetHDMIOutControlReg(reg, inWhichHDMIOut))
1036  return false;
1037 
1038  return WriteRegister (reg, static_cast <ULWord> (inNewValue), kRegMaskHDMIOutAudioFormat, kRegShiftHDMIOutAudioFormat);
1039 }
1040 
1041 
1042 bool CNTV2Card::GetHDMIOutAudioFormat (NTV2AudioFormat & outValue, const NTV2Channel inWhichHDMIOut)
1043 {
1045 
1046  if (!GetHDMIOutControlReg(reg, inWhichHDMIOut))
1047  return false;
1048 
1050 }
1051 
1052 
1053 bool CNTV2Card::SetAudioOutputMonitorSource (const NTV2AudioChannelPair inChannelPair, const NTV2AudioSystem inAudioSystem)
1054 {
1055  if (!NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16(inChannelPair))
1056  return false;
1057  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1058  return false;
1059  const ULWord encoding ((ULWord(inAudioSystem) << 4) | inChannelPair);
1060  return WriteRegister (kRegAudioOutputSourceMap, encoding, kRegMaskMonitorSource, kRegShiftMonitorSource);
1061 }
1062 
1063 
1065 {
1066  ULWord encoding (0);
1067  bool result = ReadRegister (kRegAudioOutputSourceMap, encoding, kRegMaskMonitorSource, kRegShiftMonitorSource);
1068  if (result)
1069  {
1070  outChannelPair = NTV2AudioChannelPair(encoding & 0xF);
1071  outAudioSystem = NTV2AudioSystem(encoding >> 4);
1072  }
1073  return result;
1074 }
1075 
1076 bool CNTV2Card::StartAudioOutput (const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI)
1077 {
1078  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1079  return false; // Bad AudioSystem
1080  const ULWord audioCtrlRegNum(gAudioSystemToAudioControlRegNum[inAudioSystem]);
1081  if (inWaitForVBI)
1082  {
1083  if (!IsSupported(kDeviceAudioCanWaitForVBI))
1084  return false; // Caller requested wait-til-VBI, but firmware doesn't support it
1085  // Set or clear the start-at-VBI bit...
1086  if (!WriteRegister(audioCtrlRegNum, inWaitForVBI ? 1UL : 0UL, kRegMaskOutputStartAtVBI, kRegShiftOutputStartAtVBI))
1087  return false;
1088  }
1089  if (!WriteRegister (audioCtrlRegNum, 0, kRegMaskResetAudioOutput, kRegShiftResetAudioOutput))
1090  return false;
1091 #if 1
1092  // Now that this audio system is reading from SDRAM, see if its buffer is colliding with other device SDRAM activity...
1093  ULWordSequence badRgns;
1094  SDRAMAuditor auditor;
1095  auditor.AssessDevice(*this, /*ignoreStoppedAudioSystemBuffers*/true); // Only care about running audio systems
1096  auditor.GetBadRegions(badRgns); // Receive the interfering memory regions
1097  for (size_t ndx(0); ndx < badRgns.size(); ndx++)
1098  { const ULWord rgnInfo(badRgns.at(ndx));
1099  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
1100  NTV2StringSet tags;
1101  auditor.GetTagsForFrameIndex (startBlk, tags);
1102  const string infoStr (aja::join(tags, ", "));
1103  ostringstream acLabel; acLabel << "Aud" << DEC(inAudioSystem+1); // Search for label e.g. "Aud2"
1104  if (infoStr.find(acLabel.str()) != string::npos)
1105  { ostringstream warning;
1106  if (numBlks > 1)
1107  warning << "8MB Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3);
1108  else
1109  warning << "8MB Frm " << DEC0N(startBlk,3);
1110  AUDWARN("Aud" << DEC(inAudioSystem+1) << " memory overlap/interference: " << warning.str() << ": " << infoStr);
1111  }
1112  } // for each "bad" region
1113 #endif
1114  return true;
1115 } // StartAudioOutput
1116 
1118 {
1119  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1121 }
1122 
1123 bool CNTV2Card::IsAudioOutputRunning (const NTV2AudioSystem inAudioSystem, bool & outIsRunning)
1124 {
1125  bool isStopped (true);
1126  bool result (inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1129  if (result)
1130  outIsRunning = !isStopped;
1131  return result;
1132 }
1133 
1134 
1135 bool CNTV2Card::SetAudio20BitMode (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1136 {
1137  return IsSupported(kDeviceCanDoIP)
1138  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1139  && WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMask20BitMode, kRegShift20BitMode);
1140 }
1141 
1142 
1143 bool CNTV2Card::GetAudio20BitMode (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1144 {
1145  return IsSupported(kDeviceCanDoIP)
1146  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1148 }
1149 
1150 
1151 bool CNTV2Card::SetAudioOutputPause (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1152 {
1153  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1154  && WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMaskPauseAudio, kRegShiftPauseAudio);
1155 }
1156 
1157 
1158 bool CNTV2Card::GetAudioOutputPause (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1159 {
1160  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1162 }
1163 
1164 
1165 bool CNTV2Card::StartAudioInput (const NTV2AudioSystem inAudioSystem, const bool inWaitForVBI)
1166 {
1167  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1168  return false; // Bad AudioSystem
1169  const ULWord audioCtrlRegNum(gAudioSystemToAudioControlRegNum[inAudioSystem]);
1170  if (inWaitForVBI)
1171  {
1172  if (!IsSupported(kDeviceAudioCanWaitForVBI))
1173  return false; // Caller requested wait-til-VBI, but firmware doesn't support it
1174  // Set or clear the start-at-VBI bit...
1175  if (!WriteRegister(audioCtrlRegNum, inWaitForVBI ? 1UL : 0UL, kRegMaskInputStartAtVBI, kRegShiftInputStartAtVBI))
1176  return false;
1177  }
1178  if (!WriteRegister (audioCtrlRegNum, 0, kRegMaskResetAudioInput, kRegShiftResetAudioInput))
1179  return false;
1180 #if 1
1181  // Now that this audio system is writing into SDRAM, see if its buffer is colliding with other device SDRAM activity...
1182  ULWordSequence badRgns;
1183  SDRAMAuditor auditor;
1184  auditor.AssessDevice(*this, /*ignoreStoppedAudioSystemBuffers*/true); // Only care about running audio systems
1185  auditor.GetBadRegions(badRgns); // Receive the interfering memory regions
1186  for (size_t ndx(0); ndx < badRgns.size(); ndx++)
1187  { const ULWord rgnInfo(badRgns.at(ndx));
1188  const UWord startBlk(rgnInfo >> 16), numBlks(UWord(rgnInfo & 0x0000FFFF));
1189  NTV2StringSet tags;
1190  auditor.GetTagsForFrameIndex (startBlk, tags);
1191  const string infoStr (aja::join(tags, ", "));
1192  ostringstream acLabel; acLabel << "Aud" << DEC(inAudioSystem+1); // Search for label e.g. "Aud2"
1193  if (infoStr.find(acLabel.str()) != string::npos)
1194  { ostringstream warning;
1195  if (numBlks > 1)
1196  warning << "8MB Frms " << DEC0N(startBlk,3) << "-" << DEC0N(startBlk+numBlks-1,3);
1197  else
1198  warning << "8MB Frm " << DEC0N(startBlk,3);
1199  AUDWARN("Aud" << DEC(inAudioSystem+1) << " memory overlap/interference: " << warning.str() << ": " << infoStr);
1200  }
1201  } // for each "bad" region
1202 #endif
1203  return true;
1204 } // StartAudioInput
1205 
1206 
1207 bool CNTV2Card::StopAudioInput (const NTV2AudioSystem inAudioSystem)
1208 {
1209  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1211 }
1212 
1213 
1214 bool CNTV2Card::IsAudioInputRunning (const NTV2AudioSystem inAudioSystem, bool & outIsRunning)
1215 {
1216  bool isStopped (true);
1217  bool result (inAudioSystem < NTV2_NUM_AUDIOSYSTEMS &&
1220  if (result)
1221  outIsRunning = !isStopped;
1222  return result;
1223 }
1224 
1225 
1226 bool CNTV2Card::SetAudioCaptureEnable (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1227 {
1228  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1229  && WriteRegister (gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMaskCaptureEnable, kRegShiftCaptureEnable);
1230 }
1231 
1232 
1233 bool CNTV2Card::GetAudioCaptureEnable (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1234 {
1235  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1237 }
1238 
1239 
1240 bool CNTV2Card::SetAudioPlayCaptureModeEnable (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1241 {
1242  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1243  && WriteRegister (kRegGlobalControl2, inEnable ? 1 : 0, gAudioPlayCaptureModeMasks[inAudioSystem], gAudioPlayCaptureModeShifts[inAudioSystem]);
1244 }
1245 
1246 
1247 bool CNTV2Card::GetAudioPlayCaptureModeEnable (const NTV2AudioSystem inAudioSystem, bool & outEnable)
1248 {
1249  outEnable = false;
1250  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1252 }
1253 
1254 
1255 bool CNTV2Card::SetAudioInputDelay (const NTV2AudioSystem inAudioSystem, const ULWord inDelay)
1256 {
1257  return IsSupported(kDeviceCanDoAudioDelay)
1258  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1259  && WriteRegister (gAudioDelayRegisterNumbers [inAudioSystem], inDelay, kRegMaskAudioInDelay, kRegShiftAudioInDelay);
1260 }
1261 
1262 
1263 bool CNTV2Card::GetAudioInputDelay (const NTV2AudioSystem inAudioSystem, ULWord & outDelay)
1264 {
1265  return IsSupported(kDeviceCanDoAudioDelay)
1266  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1267  && ReadRegister (gAudioDelayRegisterNumbers[inAudioSystem], outDelay, kRegMaskAudioInDelay, kRegShiftAudioInDelay);
1268 }
1269 
1270 
1271 bool CNTV2Card::SetAudioOutputDelay (const NTV2AudioSystem inAudioSystem, const ULWord inDelay)
1272 {
1273  return IsSupported(kDeviceCanDoAudioDelay)
1274  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1275  && WriteRegister (gAudioDelayRegisterNumbers[inAudioSystem], inDelay, kRegMaskAudioOutDelay, kRegShiftAudioOutDelay);
1276 }
1277 
1278 
1279 bool CNTV2Card::GetAudioOutputDelay (const NTV2AudioSystem inAudioSystem, ULWord & outDelay)
1280 {
1281  return IsSupported(kDeviceCanDoAudioDelay)
1282  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1283  && ReadRegister (gAudioDelayRegisterNumbers[inAudioSystem], outDelay, kRegMaskAudioOutDelay, kRegShiftAudioOutDelay);
1284 }
1285 
1286 
1287 bool CNTV2Card::SetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const bool inNonPCM)
1288 {
1289  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1290  && WriteRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], inNonPCM ? 1 : 0, BIT(17), 17);
1291 }
1292 
1293 
1294 bool CNTV2Card::GetAudioPCMControl (const NTV2AudioSystem inAudioSystem, bool & outIsNonPCM)
1295 {
1296  return inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1297  && CNTV2DriverInterface::ReadRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], outIsNonPCM, BIT(17), 17);
1298 }
1299 
1300 
1301 bool CNTV2Card::SetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelSelect, bool inNonPCM)
1302 {
1303  return IsSupported(kDeviceCanDoPCMControl)
1304  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1305  && NTV2_IS_VALID_AUDIO_CHANNEL_PAIR(inChannelSelect)
1306  && WriteRegister(gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlReg,
1307  inNonPCM ? 1 : 0,
1308  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlMask,
1309  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlShift);
1310 }
1311 
1312 
1313 bool CNTV2Card::SetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPairs & inNonPCMChannelPairs)
1314 {
1315  if (!IsSupported(kDeviceCanDoPCMControl) || inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1316  return false;
1317 
1318  bool result (true);
1319  for (NTV2AudioChannelPair chanPair (NTV2_AudioChannel1_2); NTV2_IS_VALID_AUDIO_CHANNEL_PAIR (chanPair); chanPair = NTV2AudioChannelPair (chanPair + 1))
1320  {
1321  if (NTV2_IS_EXTENDED_AUDIO_CHANNEL_PAIR (chanPair))
1322  break; // Extended audio channels not yet supported
1323 
1324  const bool isNonPCM (inNonPCMChannelPairs.find (chanPair) != inNonPCMChannelPairs.end ());
1325  result = WriteRegister (gAudioEngineChannelPairToFieldInformation[inAudioSystem][chanPair].pcmControlReg, isNonPCM ? 1 : 0,
1326  gAudioEngineChannelPairToFieldInformation[inAudioSystem][chanPair].pcmControlMask,
1327  gAudioEngineChannelPairToFieldInformation[inAudioSystem][chanPair].pcmControlShift);
1328  if (!result)
1329  break;
1330  }
1331  return result;
1332 }
1333 
1334 
1335 bool CNTV2Card::GetAudioPCMControl (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelSelect, bool & outIsNonPCM)
1336 {
1337  return IsSupported(kDeviceCanDoPCMControl)
1338  && inAudioSystem < NTV2_NUM_AUDIOSYSTEMS
1339  && NTV2_IS_VALID_AUDIO_CHANNEL_PAIR(inChannelSelect)
1340  && CNTV2DriverInterface::ReadRegister (gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlReg,
1341  outIsNonPCM,
1342  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlMask,
1343  gAudioEngineChannelPairToFieldInformation[inAudioSystem][inChannelSelect].pcmControlShift);
1344 }
1345 
1346 
1347 bool CNTV2Card::GetAudioPCMControl (const NTV2AudioSystem inAudioSystem, NTV2AudioChannelPairs & outNonPCMChannelPairs)
1348 {
1349  ULWord numAudioChannels (0);
1350  bool isNonPCM (false);
1351 
1352  outNonPCMChannelPairs.clear ();
1353  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1354  return false; // no such audio system on this device
1355  if (!GetNumberAudioChannels (numAudioChannels, inAudioSystem))
1356  return false; // fail
1357 
1358  const NTV2AudioChannelPair maxPair (NTV2AudioChannelPair(numAudioChannels/2));
1359  if (!GetAudioPCMControl (inAudioSystem, isNonPCM))
1360  return false; // fail
1361 
1362  if (isNonPCM) // this global mode overrides per-channel PCM control
1363  {
1364  for (UWord chPair (0); chPair <= maxPair; chPair++)
1365  outNonPCMChannelPairs.insert (NTV2AudioChannelPair (chPair));
1366  return true; // done
1367  }
1368 
1369  if (IsSupported(kDeviceCanDoPCMControl))
1370  {
1371  ULWord regVal (0);
1372  if (!ReadRegister (inAudioSystem < NTV2_AUDIOSYSTEM_5 ? kRegPCMControl4321 : kRegPCMControl8765, regVal))
1373  return false;
1375  if (regVal & BIT(inAudioSystem * 8 + chanPair))
1376  outNonPCMChannelPairs.insert (chanPair);
1377  }
1378  return true;
1379 }
1380 
1381 
1382 // NTV2_AUDIOSYSTEM_1 NTV2_AUDIOSYSTEM_2 NTV2_AUDIOSYSTEM_3 NTV2_AUDIOSYSTEM_4
1384 // NTV2_AUDIOSYSTEM_5 NTV2_AUDIOSYSTEM_6 NTV2_AUDIOSYSTEM_7 NTV2_AUDIOSYSTEM_8
1386 
1387 // NTV2_AUDIOSYSTEM_1 NTV2_AUDIOSYSTEM_2 NTV2_AUDIOSYSTEM_3 NTV2_AUDIOSYSTEM_4
1388 static const unsigned sAudioDetectGroups [] = { 0, 1, 0, 1,
1389 // NTV2_AUDIOSYSTEM_5 NTV2_AUDIOSYSTEM_6 NTV2_AUDIOSYSTEM_7 NTV2_AUDIOSYSTEM_8
1390  0, 1, 2, 3 };
1391 
1392 bool CNTV2Card::IsAudioChannelPairPresent (const NTV2AudioSystem inAudioSystem, const NTV2AudioChannelPair inChannelPair, bool & outIsPresent)
1393 {
1394  NTV2AudioChannelPairs activeChannelPairs;
1395  outIsPresent = false;
1396  if (!GetDetectedAudioChannelPairs (inAudioSystem, activeChannelPairs))
1397  return false;
1398  if (activeChannelPairs.find (inChannelPair) != activeChannelPairs.end ())
1399  outIsPresent = true;
1400  return true;
1401 }
1402 
1403 
1404 bool CNTV2Card::GetDetectedAudioChannelPairs (const NTV2AudioSystem inAudioSystem, NTV2AudioChannelPairs & outDetectedChannelPairs)
1405 {
1406  outDetectedChannelPairs.clear ();
1407  if (inAudioSystem >= NTV2_NUM_AUDIOSYSTEMS)
1408  return false;
1409 
1410  ULWord detectBits (0);
1411  if (!ReadRegister (sAudioDetectRegs[inAudioSystem], detectBits))
1412  return false;
1413 
1414  const unsigned bitGroup (sAudioDetectGroups[inAudioSystem]);
1416  if (detectBits & BIT(bitGroup * 8 + chanPair))
1417  outDetectedChannelPairs.insert (chanPair);
1418  return true;
1419 }
1420 
1421 
1423 {
1424  uint32_t valLo8(0), valHi8(0);
1425  outDetectedChannelPairs.clear ();
1426  if (!IsSupported(kDeviceCanDoAESAudioIn))
1427  return false;
1428  if (!ReadRegister(kRegInputStatus, valLo8)) // Reg 22, bits 24..27
1429  return false;
1430  if (!ReadRegister(kRegAud1SourceSelect, valHi8)) // Reg 25, bits 28..31
1431  return false;
1432 
1433  const uint32_t detectBits (((valLo8 >> 24) & 0x0000000F) | ((valHi8 >> 24) & 0x000000F0));
1434  for (NTV2AudioChannelPair chPair (NTV2_AudioChannel1_2); chPair < NTV2_AudioChannel15_16; chPair = NTV2AudioChannelPair(chPair+1))
1435  if (!(detectBits & BIT(chPair))) // bit set means "not connected"
1436  outDetectedChannelPairs.insert(chPair);
1437  return true;
1438 }
1439 
1440 
1441 bool CNTV2Card::SetSuspendHostAudio (const bool inIsSuspended)
1442 {
1443  return WriteRegister (kVRegSuspendSystemAudio, ULWord(inIsSuspended));
1444 }
1445 
1446 
1447 bool CNTV2Card::GetSuspendHostAudio (bool & outIsSuspended)
1448 {
1450 }
1451 
1452 
1453 // GetAESOutputSource / SetAESOutputSource:
1454 //
1455 // Register 190 (kRegAudioOutputSourceMap) does the mapping by audio group (audio channel quads).
1456 // Each of the least-significant 4 nibbles correspond to AES output audio channel quads:
1457 //
1458 // RegMask NTV2Audio4ChannelSelect
1459 // ========== =======================
1460 // 0x0000000F NTV2_AudioChannel1_4
1461 // 0x000000F0 NTV2_AudioChannel5_8
1462 // 0x00000F00 NTV2_AudioChannel9_12
1463 // 0x0000F000 NTV2_AudioChannel13_16
1464 //
1465 // The value of the nibble determines the source:
1466 // Value NTV2AudioSystem NTV2Audio4ChannelSelect
1467 // ===== =============== =======================
1468 // 0x0: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel1_4
1469 // 0x1: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel5_8
1470 // 0x2: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel9_12
1471 // 0x3: NTV2_AUDIOSYSTEM_1 NTV2_AudioChannel13_16
1472 // 0x4: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel1_4
1473 // 0x5: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel5_8
1474 // 0x6: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel9_12
1475 // 0x7: NTV2_AUDIOSYSTEM_2 NTV2_AudioChannel13_16
1476 // 0x8: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel1_4
1477 // 0x9: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel5_8
1478 // 0xA: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel9_12
1479 // 0xB: NTV2_AUDIOSYSTEM_3 NTV2_AudioChannel13_16
1480 // 0xC: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel1_4
1481 // 0xD: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel5_8
1482 // 0xE: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel9_12
1483 // 0xF: NTV2_AUDIOSYSTEM_4 NTV2_AudioChannel13_16
1484 
1485 static const unsigned gAESChannelMappingShifts [4] = {0, 4, 8, 12};
1486 
1487 
1488 bool CNTV2Card::GetAESOutputSource (const NTV2Audio4ChannelSelect inAESAudioChannels, NTV2AudioSystem & outSrcAudioSystem, NTV2Audio4ChannelSelect & outSrcAudioChannels)
1489 {
1490  const ULWord numAESAudioOutputChannels (GetNumSupported(kDeviceGetNumAESAudioOutputChannels));
1491  const ULWord maxNumAudioChannelsForQuad ((inAESAudioChannels + 1) * 4);
1492 
1493  outSrcAudioSystem = NTV2_AUDIOSYSTEM_INVALID;
1494  outSrcAudioChannels = NTV2_AUDIO_CHANNEL_QUAD_INVALID;
1495 
1496  if (numAESAudioOutputChannels < 4)
1497  return false; // Fail, device doesn't support AES output
1498  if (maxNumAudioChannelsForQuad > numAESAudioOutputChannels)
1499  return false; // Fail, illegal inAESAudioChannels value
1500 
1501  ULWord regValue (0);
1502  if (!ReadRegister (kRegAudioOutputSourceMap, regValue))
1503  return false; // Failed in ReadRegister
1504 
1505  regValue = (regValue >> gAESChannelMappingShifts[inAESAudioChannels]) & 0x0000000F;
1506  outSrcAudioSystem = NTV2AudioSystem(regValue / 4);
1507  NTV2_ASSERT (NTV2_IS_VALID_AUDIO_SYSTEM (outSrcAudioSystem));
1508 
1509  outSrcAudioChannels = NTV2Audio4ChannelSelect(regValue % 4);
1510  NTV2_ASSERT (NTV2_IS_NORMAL_AUDIO_CHANNEL_QUAD (outSrcAudioChannels));
1511  return true;
1512 }
1513 
1514 
1515 bool CNTV2Card::SetAESOutputSource (const NTV2Audio4ChannelSelect inAESAudioChannels, const NTV2AudioSystem inSrcAudioSystem, const NTV2Audio4ChannelSelect inSrcAudioChannels)
1516 {
1517  const ULWord nibble (ULWord(inSrcAudioSystem) * 4 + ULWord(inSrcAudioChannels));
1518  return WriteRegister (kRegAudioOutputSourceMap, // reg
1519  nibble, // value
1520  ULWord(0xF << gAESChannelMappingShifts[inAESAudioChannels]), // mask
1521  gAESChannelMappingShifts[inAESAudioChannels]); // shift
1522 }
1523 
1524 
1525 static NTV2AudioChannelPairs BitMasksToNTV2AudioChannelPairs (const ULWord inBitMask, const ULWord inExtendedBitMask)
1526 {
1527  NTV2AudioChannelPairs result;
1528  if (inBitMask)
1529  for (NTV2AudioChannelPair channelPair (NTV2_AudioChannel1_2); channelPair < NTV2_AudioChannel17_18; channelPair = NTV2AudioChannelPair (channelPair + 1))
1530  if (inBitMask & BIT (channelPair))
1531  result.insert (channelPair);
1532  if (inExtendedBitMask)
1533  for (NTV2AudioChannelPair channelPair (NTV2_AudioChannel17_18); channelPair < NTV2_MAX_NUM_AudioChannelPair; channelPair = NTV2AudioChannelPair (channelPair + 1))
1534  if (inExtendedBitMask & BIT (channelPair))
1535  result.insert (channelPair);
1536  return result;
1537 }
1538 
1539 
1540 static inline NTV2RegisterNumber GetNonPCMDetectRegisterNumber (const NTV2Channel inSDIInputChannel, const bool inIsExtended = false)
1541 {
1542  return NTV2RegisterNumber (kRegFirstNonPCMAudioDetectRegister + inSDIInputChannel * 2 + (inIsExtended ? 1 : 0));
1543 }
1544 
1545 
1546 bool CNTV2Card::InputAudioChannelPairHasPCM (const NTV2Channel inSDIInputChannel, const NTV2AudioChannelPair inAudioChannelPair, bool & outHasPCM)
1547 {
1548  if (!NTV2_IS_VALID_AUDIO_CHANNEL_PAIR (inAudioChannelPair))
1549  return false;
1550  NTV2AudioChannelPairs withPCMs;
1551  if (!GetInputAudioChannelPairsWithPCM (inSDIInputChannel, withPCMs))
1552  return false;
1553 
1554  outHasPCM = withPCMs.find (inAudioChannelPair) != withPCMs.end (); // Test set membership
1555  return true;
1556 }
1557 
1558 
1560 {
1561  outPCMPairs.clear ();
1562  if (!IsSupported(kDeviceCanDoPCMDetection))
1563  return false;
1564  if (!NTV2_IS_VALID_CHANNEL (inSDIInputChannel))
1565  return false;
1566  if (ULWord(inSDIInputChannel) >= GetNumSupported(kDeviceGetNumVideoInputs))
1567  return false;
1568 
1569  // Read channel pair bitmask registers...
1570  const ULWord numChannels (GetNumSupported(kDeviceGetMaxAudioChannels));
1571  const bool isExtended (numChannels > 16);
1572  const NTV2RegisterNumber regNum (::GetNonPCMDetectRegisterNumber (inSDIInputChannel));
1573  ULWord mask (0);
1574  ULWord extMask (0);
1575  if (!ReadRegister (regNum, mask))
1576  return false;
1577  if (isExtended)
1578  if (!ReadRegister (regNum + 1, extMask))
1579  return false;
1580 
1581  // Convert bitmasks to set of with-PCM pairs...
1582  outPCMPairs = ::BitMasksToNTV2AudioChannelPairs (~mask, isExtended ? ~extMask : 0);
1583  return true;
1584 }
1585 
1586 
1588 {
1589  outNonPCMPairs.clear ();
1590  if (!IsSupported(kDeviceCanDoPCMDetection))
1591  return false;
1592  if (!NTV2_IS_VALID_CHANNEL (inSDIInputChannel))
1593  return false;
1594  if (ULWord(inSDIInputChannel) >= GetNumSupported(kDeviceGetNumVideoInputs))
1595  return false;
1596 
1597  // Read channel pair bitmask registers...
1598  const ULWord numChannels (GetNumSupported(kDeviceGetMaxAudioChannels));
1599  const bool isExtended (numChannels > 16);
1600  const NTV2RegisterNumber regNum (::GetNonPCMDetectRegisterNumber (inSDIInputChannel));
1601  ULWord mask (0);
1602  ULWord extMask (0);
1603  if (!ReadRegister (regNum, mask))
1604  return false;
1605  if (isExtended)
1606  if (!ReadRegister (regNum + 1, extMask))
1607  return false;
1608 
1609  // Convert bitmasks to set of non-PCM pairs...
1610  outNonPCMPairs = ::BitMasksToNTV2AudioChannelPairs (mask, isExtended ? extMask : 0);
1611  return true;
1612 }
1613 
1614 // GetSDIOutputAudioEnabled, SetSDIOutputAudioEnabled:
1615 // The audio HANC disable bit actually controls the SDI Output, not the Audio System
1616 // (They probably should've been put in the SDIOut widget control registers.)
1617 // Also thanks to "legacy", bits 13 & 15 control an even-numbered and odd-numbered, respectively, SDI output:
1618 // Thus the ctrl reg of AudSys1 controls SDI1 & SDI2; AudSys3 controls SDIOut3 & SDIOut4; AudSys5 for SDI5 & SDI6; etc...
1619 // The control registers of Audio Systems 2, 4, 6 & 8 ignore bits 13 & 15.
1622 
1623 bool CNTV2Card::GetSDIOutputAudioEnabled (const NTV2Channel inSDIOutputSpigot, bool & outIsEnabled)
1624 {
1625  outIsEnabled = true; // presume normal
1626  if (!NTV2_IS_VALID_CHANNEL (inSDIOutputSpigot))
1627  return false;
1628  if (ULWord(inSDIOutputSpigot) >= GetNumSupported(kDeviceGetNumVideoOutputs))
1629  return false;
1630 
1631  ULWord value (0);
1632  if (!ReadRegister (kAudCtrlRegsForSDIOutputs[inSDIOutputSpigot], value,
1635  return false;
1636  outIsEnabled = value ? false : true; // Bit sense is 1=disabled, 0=enabled/normal
1637  return true;
1638 }
1639 
1640 bool CNTV2Card::SetSDIOutputAudioEnabled (const NTV2Channel inSDIOutputSpigot, const bool & inEnable)
1641 {
1642  if (!NTV2_IS_VALID_CHANNEL (inSDIOutputSpigot))
1643  return false;
1644  if (ULWord(inSDIOutputSpigot) >= GetNumSupported(kDeviceGetNumVideoOutputs))
1645  return false;
1646 
1647  return WriteRegister (kAudCtrlRegsForSDIOutputs[inSDIOutputSpigot], inEnable ? 0 : 1,
1650 }
1651 
1652 
1653 bool CNTV2Card::GetAudioOutputEraseMode (const NTV2AudioSystem inAudioSystem, bool & outEraseModeEnabled)
1654 {
1655  outEraseModeEnabled = false;
1656  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1657  return false;
1658  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1659  return false;
1660  ULWord regValue(0);
1661  if (!ReadRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], regValue))
1662  return false;
1663  outEraseModeEnabled = (regValue & kRegMaskAudioAutoErase) ? true : false;
1664  return true;
1665 }
1666 
1667 
1668 bool CNTV2Card::SetAudioOutputEraseMode (const NTV2AudioSystem inAudioSystem, const bool & inEraseModeEnabled)
1669 {
1670  if (!NTV2_IS_VALID_AUDIO_SYSTEM (inAudioSystem))
1671  return false;
1672  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1673  return false;
1674  return WriteRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], inEraseModeEnabled ? 1 : 0, kRegMaskAudioAutoErase, kRegShiftAudioAutoErase);
1675 }
1676 
1677 bool CNTV2Card::SetAnalogAudioTransmitEnable (const NTV2Audio4ChannelSelect inChannelQuad, const bool inXmitEnable)
1678 {
1679  // Reg 108 (kRegGlobalControl3) has two bits for controlling XLR direction: BIT(0) for XLRs 1-4, BIT(1) for XLRs 5-8
1680  if (!IsSupported(kDeviceHasBiDirectionalAnalogAudio))
1681  return false; // unsupported
1682  if (inChannelQuad > NTV2_AudioChannel5_8)
1683  return false; // NTV2_AudioChannel1_4 & NTV2_AudioChannel5_8 only
1684  return WriteRegister (kRegGlobalControl3, inXmitEnable ? 0 : 1, // 0 == xmit 1 == recv
1686  ULWord(inChannelQuad));
1687 }
1688 
1689 bool CNTV2Card::GetAnalogAudioTransmitEnable (const NTV2Audio4ChannelSelect inChannelQuad, bool & outXmitEnabled)
1690 {
1691  outXmitEnabled = false;
1692  // Reg 108 (kRegGlobalControl3) has two bits for controlling XLR direction: BIT(0) for XLRs 1-4, BIT(1) for XLRs 5-8
1693  if (!IsSupported(kDeviceHasBiDirectionalAnalogAudio))
1694  return false; // unsupported
1695  if (inChannelQuad > NTV2_AudioChannel5_8)
1696  return false; // NTV2_AudioChannel1_4 & NTV2_AudioChannel5_8 only
1697  if (!CNTV2DriverInterface::ReadRegister (kRegGlobalControl3, outXmitEnabled, // false == xmit true == recv
1699  ULWord(inChannelQuad)))
1700  return false;
1701  outXmitEnabled = !outXmitEnabled; // Flip the sense, we want xmit == true, recv == false
1702  return true;
1703 }
1704 
1705 bool CNTV2Card::SetMultiLinkAudioMode (const NTV2AudioSystem inAudioSystem, const bool inEnable)
1706 {
1707  if (!IsSupported(kDeviceCanDoMultiLinkAudio))
1708  return false;
1709  return WriteRegister(gAudioSystemToAudioControlRegNum[inAudioSystem], inEnable ? 1 : 0, kRegMaskMultiLinkAudio, kRegShiftMultiLinkAudio);
1710 }
1711 
1712 bool CNTV2Card::GetMultiLinkAudioMode (const NTV2AudioSystem inAudioSystem, bool & outEnabled)
1713 {
1714  outEnabled = false;
1715  if (!IsSupported(kDeviceCanDoMultiLinkAudio))
1716  return false;
1718 }
1719 
1720 #if !defined(NTV2_DEPRECATE_16_1)
1722  {
1723  if (inConfig > NTV2_AnalogAudioIO_8In)
1724  return false;
1725  return SetAnalogAudioTransmitEnable (NTV2_AudioChannel1_4, inConfig == NTV2_AnalogAudioIO_8Out || inConfig == NTV2_AnalogAudioIO_4Out_4In)
1726  && SetAnalogAudioTransmitEnable (NTV2_AudioChannel5_8, inConfig == NTV2_AnalogAudioIO_8Out || inConfig == NTV2_AnalogAudioIO_4In_4Out);
1727  }
1728 
1730  {
1731  bool xlr14Xmit(false), xlr58Xmit(false);
1732  if (!GetAnalogAudioTransmitEnable (NTV2_AudioChannel1_4, xlr14Xmit))
1733  return false;
1734  if (!GetAnalogAudioTransmitEnable (NTV2_AudioChannel5_8, xlr58Xmit))
1735  return false;
1736  if (xlr14Xmit && xlr58Xmit)
1737  outConfig = NTV2_AnalogAudioIO_8Out;
1738  else if (xlr14Xmit && !xlr58Xmit)
1739  outConfig = NTV2_AnalogAudioIO_4Out_4In;
1740  else if (!xlr14Xmit && xlr58Xmit)
1741  outConfig = NTV2_AnalogAudioIO_4In_4Out;
1742  else
1743  outConfig = NTV2_AnalogAudioIO_8In;
1744  return true;
1745  }
1746 #endif // !defined(NTV2_DEPRECATE_16_1)
1747 
1748 bool CNTV2Card::GetAudioOutputAESSyncModeBit (const NTV2AudioSystem inAudioSystem, bool & outAESSyncModeBitSet)
1749 {
1750  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1751  return false;
1752  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1753  return false;
1754  ULWord regValue(0);
1755  if (!ReadRegister (gAudioSystemToSrcSelectRegNum[inAudioSystem], regValue, BIT(18), 18))
1756  return false;
1757  outAESSyncModeBitSet = regValue ? true : false;
1758  return true;
1759 }
1760 
1761 bool CNTV2Card::SetAudioOutputAESSyncModeBit (const NTV2AudioSystem inAudioSystem, const bool & inAESSyncModeBitSet)
1762 {
1763  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1764  return false;
1765  if (UWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1766  return false;
1767  return WriteRegister(gAudioSystemToSrcSelectRegNum[inAudioSystem], inAESSyncModeBitSet?1:0, BIT(18), 18);
1768 }
1769 
1770 bool CNTV2Card::GetRawAudioTimer (ULWord & outValue, const NTV2AudioSystem inAudioSystem)
1771 {
1772  if (!NTV2_IS_VALID_AUDIO_SYSTEM(inAudioSystem))
1773  return false;
1774  return ReadRegister(kRegAud1Counter, outValue);
1775 }
1776 
1778 {
1779  return IsSupported(kDeviceCanDoBreakoutBoard)
1781 }
1782 
1783 bool CNTV2Card::GetAudioMemoryOffset (const ULWord inOffsetBytes, ULWord & outAbsByteOffset,
1784  const NTV2AudioSystem inAudioSystem, const bool inCaptureBuffer)
1785 {
1786  outAbsByteOffset = 0;
1787  const NTV2DeviceID deviceID(GetDeviceID());
1788  if (ULWord(inAudioSystem) >= GetNumSupported(kDeviceGetNumBufferedAudioSystems))
1789  return false; // Invalid audio system
1790 
1791  if (IsSupported(kDeviceCanDoStackedAudio))
1792  {
1793  const ULWord EIGHT_MEGABYTES (0x800000);
1794  const ULWord memSize (GetNumSupported(kDeviceGetActiveMemorySize));
1795  const ULWord engineOffset (memSize - EIGHT_MEGABYTES * ULWord(inAudioSystem+1));
1796  outAbsByteOffset = inOffsetBytes + engineOffset;
1797  }
1798  else
1799  {
1802  if (!GetFrameGeometry (fg, NTV2Channel(inAudioSystem)) || !GetFrameBufferFormat (NTV2Channel(inAudioSystem), fbf))
1803  return false;
1804 
1805  const ULWord audioFrameBuffer (::NTV2DeviceGetNumberFrameBuffers(deviceID, fg, fbf) - 1);
1806  outAbsByteOffset = inOffsetBytes + audioFrameBuffer * ::NTV2DeviceGetFrameBufferSize(deviceID, fg, fbf);
1807  }
1808 
1809  if (inCaptureBuffer) // Capture mode?
1810  { ULWord rdBufOffset(0x400000); // 4MB
1811  GetAudioReadOffset (rdBufOffset, inAudioSystem);
1812  outAbsByteOffset += rdBufOffset; // Add offset to point to capture buffer
1813  }
1814  return true;
1815 }
1816 
1817 #ifdef MSWindows
1818  #pragma warning(default: 4800)
1819 #endif
kRegShiftAud4PlayCapMode
@ kRegShiftAud4PlayCapMode
Definition: ntv2publicinterface.h:2352
kRegMaskPCMControlA2P9_10
@ kRegMaskPCMControlA2P9_10
Definition: ntv2publicinterface.h:2141
kK2RegShiftAudioBufferSize
@ kK2RegShiftAudioBufferSize
Definition: ntv2publicinterface.h:2487
kRegShiftAud3RateHigh
@ kRegShiftAud3RateHigh
Definition: ntv2publicinterface.h:2388
kRegShiftPCMControlA7P15_16
@ kRegShiftPCMControlA7P15_16
Definition: ntv2publicinterface.h:3251
kRegMaskPCMControlA5P1_2
@ kRegMaskPCMControlA5P1_2
Definition: ntv2publicinterface.h:2164
kDeviceGetNumVideoInputs
@ kDeviceGetNumVideoInputs
The number of SDI video inputs on the device.
Definition: ntv2devicefeatures.h:212
kRegShiftEmbeddedAudioInput
@ kRegShiftEmbeddedAudioInput
Definition: ntv2publicinterface.h:2492
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:1123
kRegMaskPCMControlA5P13_14
@ kRegMaskPCMControlA5P13_14
Definition: ntv2publicinterface.h:2170
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:1207
kRegMaskPCMControlA3P11_12
@ kRegMaskPCMControlA3P11_12
Definition: ntv2publicinterface.h:2151
kRegShiftPCMControlA7P11_12
@ kRegShiftPCMControlA7P11_12
Definition: ntv2publicinterface.h:3249
NTV2AnalogAudioIO
NTV2AnalogAudioIO
Definition: ntv2enums.h:2221
kRegShiftPCMControlA8P9_10
@ kRegShiftPCMControlA8P9_10
Definition: ntv2publicinterface.h:3257
kRegShift20BitMode
@ kRegShift20BitMode
Definition: ntv2publicinterface.h:2462
kRegShiftCaptureEnable
@ kRegShiftCaptureEnable
Definition: ntv2publicinterface.h:2459
kDeviceCanDoStackedAudio
@ kDeviceCanDoStackedAudio
True if device uses a "stacked" arrangement of its audio buffers.
Definition: ntv2devicefeatures.h:86
kRegMaskPCMControlA6P15_16
@ kRegMaskPCMControlA6P15_16
Definition: ntv2publicinterface.h:2180
kFS1RegMaskAudioLevel
@ kFS1RegMaskAudioLevel
Definition: ntv2publicinterface.h:1390
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:1271
kRegMaskAudioMixerChannelSelect
@ kRegMaskAudioMixerChannelSelect
Definition: ntv2publicinterface.h:2226
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:1559
kRegMaskPCMControlA6P11_12
@ kRegMaskPCMControlA6P11_12
Definition: ntv2publicinterface.h:2178
kRegMaskHDMIOutAudioFormat
@ kRegMaskHDMIOutAudioFormat
Definition: ntv2publicinterface.h:1602
kRegShiftPCMControlA4P13_14
@ kRegShiftPCMControlA4P13_14
Definition: ntv2publicinterface.h:3223
kRegAud5Delay
@ kRegAud5Delay
Definition: ntv2publicinterface.h:686
kRegMaskPCMControlA1P7_8
@ kRegMaskPCMControlA1P7_8
Definition: ntv2publicinterface.h:2131
NTV2_AUDIO_192K
@ NTV2_AUDIO_192K
Definition: ntv2enums.h:1921
kRegAud4Delay
@ kRegAud4Delay
Definition: ntv2publicinterface.h:450
kAudCtrlRegsForSDIOutputs
static const ULWord kAudCtrlRegsForSDIOutputs[]
Definition: ntv2audio.cpp:1620
kRegShiftOutputStartAtVBI
@ kRegShiftOutputStartAtVBI
Definition: ntv2publicinterface.h:2471
kRegAud1OutputLastAddr
@ kRegAud1OutputLastAddr
Definition: ntv2publicinterface.h:147
kRegShiftHDMIOutAudioCh
@ kRegShiftHDMIOutAudioCh
Definition: ntv2publicinterface.h:2696
kRegMaskLoopBack
@ kRegMaskLoopBack
Definition: ntv2publicinterface.h:1368
kRegAud7Delay
@ kRegAud7Delay
Definition: ntv2publicinterface.h:688
kRegMaskAud6PlayCapMode
@ kRegMaskAud6PlayCapMode
Definition: ntv2publicinterface.h:1261
PCM_CONTROL_INFO
Definition: ntv2audio.cpp:54
kRegMaskPCMControlA2P5_6
@ kRegMaskPCMControlA2P5_6
Definition: ntv2publicinterface.h:2139
gChannelToAudioOutLastAddrRegNum
static const ULWord gChannelToAudioOutLastAddrRegNum[]
Definition: ntv2audio.cpp:34
kRegMaskAudioMixerMainInputSelect
@ kRegMaskAudioMixerMainInputSelect
Definition: ntv2publicinterface.h:2223
kDeviceCanDoIP
@ kDeviceCanDoIP
True if device has SFP connectors.
Definition: ntv2devicefeatures.h:129
kRegShiftAud2PlayCapMode
@ kRegShiftAud2PlayCapMode
Definition: ntv2publicinterface.h:2350
kRegAudioMixerAux1GainCh2
@ kRegAudioMixerAux1GainCh2
Definition: ntv2publicinterface.h:818
kRegMaskPCMControlA5P5_6
@ kRegMaskPCMControlA5P5_6
Definition: ntv2publicinterface.h:2166
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:1053
kRegShiftAudioMixerOutputChannelsMute
@ kRegShiftAudioMixerOutputChannelsMute
Definition: ntv2publicinterface.h:3289
NTV2_AudioChannel13_16
@ NTV2_AudioChannel13_16
This selects audio channels 13 thru 16.
Definition: ntv2enums.h:3257
NTV2_IS_VALID_AUDIO_CHANNEL_OCTET
#define NTV2_IS_VALID_AUDIO_CHANNEL_OCTET(__p__)
Definition: ntv2enums.h:3325
kRegMaskAudioInDelay
@ kRegMaskAudioInDelay
Definition: ntv2publicinterface.h:1511
kRegShiftPCMControlA6P9_10
@ kRegShiftPCMControlA6P9_10
Definition: ntv2publicinterface.h:3239
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_4
Definition: ntv2enums.h:1961
NTV2_HDMIAudio2Channels
@ NTV2_HDMIAudio2Channels
2 audio channels
Definition: ntv2enums.h:3647
kRegMaskCaptureEnable
@ kRegMaskCaptureEnable
Definition: ntv2publicinterface.h:1364
kRegAudioMixerAux1InputLevels
@ kRegAudioMixerAux1InputLevels
Definition: ntv2publicinterface.h:823
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:515
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:748
NTV2StringSet
std::set< std::string > NTV2StringSet
Definition: ntv2utils.h:1154
CNTV2Card::GetHDMIOutAudioSource8Channel
virtual bool GetHDMIOutAudioSource8Channel(NTV2Audio8ChannelSelect &outValue, NTV2AudioSystem &outAudioSystem, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Answers with the HDMI output's current 8-channel audio source.
Definition: ntv2audio.cpp:969
kRegShiftPCMControlA4P1_2
@ kRegShiftPCMControlA4P1_2
Definition: ntv2publicinterface.h:3217
NTV2DeviceGetNumberFrameBuffers
ULWord NTV2DeviceGetNumberFrameBuffers(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:497
kRegAud2Delay
@ kRegAud2Delay
Definition: ntv2publicinterface.h:210
kRegMaskRotaryEncoderGain
@ kRegMaskRotaryEncoderGain
Definition: ntv2publicinterface.h:2274
kRegShiftPCMControlA7P5_6
@ kRegShiftPCMControlA7P5_6
Definition: ntv2publicinterface.h:3246
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:589
NTV2AudioChannelPairs
std::set< NTV2AudioChannelPair > NTV2AudioChannelPairs
A set of distinct NTV2AudioChannelPair values.
Definition: ntv2publicinterface.h:58
kRegMaskAud8PlayCapMode
@ kRegMaskAud8PlayCapMode
Definition: ntv2publicinterface.h:1263
NTV2AudioFormat
NTV2AudioFormat
Definition: ntv2enums.h:1940
NTV2Channel
NTV2Channel
These enum values are mostly used to identify a specific widget_framestore. They're also commonly use...
Definition: ntv2enums.h:1346
kRegShiftAudioMixerChannelSelect
@ kRegShiftAudioMixerChannelSelect
Definition: ntv2publicinterface.h:3288
kRegAudioMixerAux1GainCh1
@ kRegAudioMixerAux1GainCh1
Definition: ntv2publicinterface.h:814
kRegMaskPCMControlA1P5_6
@ kRegMaskPCMControlA1P5_6
Definition: ntv2publicinterface.h:2130
NTV2AudioMixerInput
NTV2AudioMixerInput
Identifies the Audio Mixer's audio inputs.
Definition: ntv2enums.h:3235
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:2354
kRegShiftPCMControlA5P9_10
@ kRegShiftPCMControlA5P9_10
Definition: ntv2publicinterface.h:3230
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:545
kRegAud6InputLastAddr
@ kRegAud6InputLastAddr
Definition: ntv2publicinterface.h:627
kRegShiftAudioMixerAux2InputEnable
@ kRegShiftAudioMixerAux2InputEnable
Definition: ntv2publicinterface.h:3308
NTV2_ASSERT
#define NTV2_ASSERT(_expr_)
Definition: ajatypes.h:509
kRegMaskPCMControlA4P3_4
@ kRegMaskPCMControlA4P3_4
Definition: ntv2publicinterface.h:2156
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:1117
kRegAud8OutputLastAddr
@ kRegAud8OutputLastAddr
Definition: ntv2publicinterface.h:636
NTV2DeviceGetFrameBufferSize
ULWord NTV2DeviceGetFrameBufferSize(NTV2DeviceID id, NTV2FrameGeometry fg, NTV2FrameBufferFormat fbf)
Definition: ntv2devicefeatures.cpp:325
NTV2_MAX_NUM_AudioChannelPair
@ NTV2_MAX_NUM_AudioChannelPair
Definition: ntv2enums.h:3178
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:1301
kRegShiftPCMControlA2P1_2
@ kRegShiftPCMControlA2P1_2
Definition: ntv2publicinterface.h:3199
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:1441
kRegAudioMixerMutes
@ kRegAudioMixerMutes
Definition: ntv2publicinterface.h:817
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_1
Definition: ntv2enums.h:1958
kRegAud8Control
@ kRegAud8Control
Definition: ntv2publicinterface.h:634
sAudioMixerInputGainCh1Regs
static const ULWord sAudioMixerInputGainCh1Regs[]
Definition: ntv2audio.cpp:601
kRegMaskHDMIOutAudioSource
@ kRegMaskHDMIOutAudioSource
Definition: ntv2publicinterface.h:1972
NTV2_AUDIO_48K
@ NTV2_AUDIO_48K
Definition: ntv2enums.h:1919
kRegShiftBOBAnalogInputSelect
@ kRegShiftBOBAnalogInputSelect
Definition: ntv2publicinterface.h:3379
NTV2_AUDIO_CHANNEL_PAIR_INVALID
@ NTV2_AUDIO_CHANNEL_PAIR_INVALID
Definition: ntv2enums.h:3179
kRegShiftPCMControlA5P3_4
@ kRegShiftPCMControlA5P3_4
Definition: ntv2publicinterface.h:3227
kRegMaskPCMControlA4P13_14
@ kRegMaskPCMControlA4P13_14
Definition: ntv2publicinterface.h:2161
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:549
kRegMaskPCMControlA2P13_14
@ kRegMaskPCMControlA2P13_14
Definition: ntv2publicinterface.h:2143
NTV2_FG_INVALID
@ NTV2_FG_INVALID
Definition: ntv2enums.h:371
kRegAudioMixerOutRGain
@ kRegAudioMixerOutRGain
Definition: ntv2publicinterface.h:822
NTV2_AUDIO_WRAPADDRESS_BIG
#define NTV2_AUDIO_WRAPADDRESS_BIG
Definition: ntv2audiodefines.h:15
kRegMaskPCMControlA6P3_4
@ kRegMaskPCMControlA6P3_4
Definition: ntv2publicinterface.h:2174
kRegAudDetect2
@ kRegAudDetect2
Definition: ntv2publicinterface.h:423
kRegShiftPCMControlA8P13_14
@ kRegShiftPCMControlA8P13_14
Definition: ntv2publicinterface.h:3259
kRegMaskAud3RateHigh
@ kRegMaskAud3RateHigh
Definition: ntv2publicinterface.h:1297
NTV2_AUDIO_MIC
@ NTV2_AUDIO_MIC
Obtain audio samples from the device microphone input, if available.
Definition: ntv2enums.h:2000
kRegMaskPCMControlA8P13_14
@ kRegMaskPCMControlA8P13_14
Definition: ntv2publicinterface.h:2197
kRegShiftHDMIOut8ChGroupSelect
@ kRegShiftHDMIOut8ChGroupSelect
Definition: ntv2publicinterface.h:2682
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:1286
kRegAud1Counter
@ kRegAud1Counter
Definition: ntv2publicinterface.h:149
kRegMaskAudioMixerAux2x2CHInput
@ kRegMaskAudioMixerAux2x2CHInput
Definition: ntv2publicinterface.h:2225
gAudioEngineChannelPairToFieldInformation
static const PCM_CONTROL_INFO gAudioEngineChannelPairToFieldInformation[][8]
Definition: ntv2audio.cpp:61
NTV2_AudioMixerChannel1
@ NTV2_AudioMixerChannel1
Definition: ntv2enums.h:3208
NTV2_AudioChannel17_18
@ NTV2_AudioChannel17_18
This selects audio channels 17 and 18.
Definition: ntv2enums.h:3122
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:3645
SDRAMAuditor::GetTagsForFrameIndex
bool GetTagsForFrameIndex(const UWord inIndex, NTV2StringSet &outTags) const
Answers with the list of tags for the given frame number.
Definition: ntv2card.cpp:747
NTV2_AUDIOSYSTEM_1
@ NTV2_AUDIOSYSTEM_1
This identifies the first Audio System.
Definition: ntv2enums.h:3875
kRegMaskAudioMixerAux1InputEnable
@ kRegMaskAudioMixerAux1InputEnable
Definition: ntv2publicinterface.h:2245
kRegShiftAud1PlayCapMode
@ kRegShiftAud1PlayCapMode
Definition: ntv2publicinterface.h:2349
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_8
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_8
Definition: ntv2enums.h:1965
CNTV2Card::EnableBOBAnalogAudioIn
virtual bool EnableBOBAnalogAudioIn(bool inEnable)
Enables breakout board analog audio XLR inputs.
Definition: ntv2audio.cpp:1777
kRegAudioMixerOutLGain
@ kRegAudioMixerOutLGain
Definition: ntv2publicinterface.h:821
kRegMaskAud7PlayCapMode
@ kRegMaskAud7PlayCapMode
Definition: ntv2publicinterface.h:1262
kRegShiftHDMIOutAudioFormat
@ kRegShiftHDMIOutAudioFormat
Definition: ntv2publicinterface.h:2690
kRegShiftPCMControlA2P15_16
@ kRegShiftPCMControlA2P15_16
Definition: ntv2publicinterface.h:3206
gAudioRateHighMask
static const ULWord gAudioRateHighMask[]
Definition: ntv2audio.cpp:48
kRegShiftPCMControlA3P9_10
@ kRegShiftPCMControlA3P9_10
Definition: ntv2publicinterface.h:3212
NTV2DeviceID
NTV2DeviceID
Identifies a specific AJA NTV2 device model number. The NTV2DeviceID is actually the PROM part number...
Definition: ntv2enums.h:20
DEC0N
#define DEC0N(__x__, __n__)
Definition: ntv2publicinterface.h:5767
kRegMaskHDMIOutAudioRate
@ kRegMaskHDMIOutAudioRate
Definition: ntv2publicinterface.h:1641
kRegMaskBOBAnalogLevelControl
@ kRegMaskBOBAnalogLevelControl
Definition: ntv2publicinterface.h:2317
kRegAud3SourceSelect
@ kRegAud3SourceSelect
Definition: ntv2publicinterface.h:421
kDeviceGetNumVideoOutputs
@ kDeviceGetNumVideoOutputs
The number of SDI video outputs on the device.
Definition: ntv2devicefeatures.h:213
kRegMaskPCMControlA3P3_4
@ kRegMaskPCMControlA3P3_4
Definition: ntv2publicinterface.h:2147
kRegShiftPCMControlA2P5_6
@ kRegShiftPCMControlA2P5_6
Definition: ntv2publicinterface.h:3201
kRegAudioOutputSourceMap
@ kRegAudioOutputSourceMap
Definition: ntv2publicinterface.h:331
kRegMaskPCMControlA3P15_16
@ kRegMaskPCMControlA3P15_16
Definition: ntv2publicinterface.h:2153
NTV2_FBF_INVALID
@ NTV2_FBF_INVALID
Definition: ntv2enums.h:251
NTV2FrameBufferFormat
NTV2FrameBufferFormat
Identifies a particular video frame buffer format. See Device Frame Buffer Formats for details.
Definition: ntv2enums.h:213
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:647
kRegShiftPCMControlA3P15_16
@ kRegShiftPCMControlA3P15_16
Definition: ntv2publicinterface.h:3215
kRegShiftPCMControlA1P15_16
@ kRegShiftPCMControlA1P15_16
Definition: ntv2publicinterface.h:3197
kRegShiftAudio16Channel
@ kRegShiftAudio16Channel
Definition: ntv2publicinterface.h:2477
kRegMaskPCMControlA8P5_6
@ kRegMaskPCMControlA8P5_6
Definition: ntv2publicinterface.h:2193
PCM_CONTROL_INFO::pcmControlMask
ULWord pcmControlMask
Definition: ntv2audio.cpp:56
kRegShiftHDMIOutSourceSelect
@ kRegShiftHDMIOutSourceSelect
Definition: ntv2publicinterface.h:2727
kRegMaskPCMControlA5P11_12
@ kRegMaskPCMControlA5P11_12
Definition: ntv2publicinterface.h:2169
kRegAudioMixerAux2GainCh1
@ kRegAudioMixerAux2GainCh1
Definition: ntv2publicinterface.h:815
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:2356
kRegAud7InputLastAddr
@ kRegAud7InputLastAddr
Definition: ntv2publicinterface.h:632
kRegShiftPCMControlA6P5_6
@ kRegShiftPCMControlA6P5_6
Definition: ntv2publicinterface.h:3237
sAudioMixerInputSelectShifts
static const ULWord sAudioMixerInputSelectShifts[]
Definition: ntv2audio.cpp:546
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:1748
kRegAudioMixerMainOutputLevelsPair0
@ kRegAudioMixerMainOutputLevelsPair0
Definition: ntv2publicinterface.h:834
kDeviceGetNumAESAudioOutputChannels
@ kDeviceGetNumAESAudioOutputChannels
The number of AES/EBU audio output channels on the device.
Definition: ntv2devicefeatures.h:188
kDeviceCanDoAudioMixer
@ kDeviceCanDoAudioMixer
True if device has a firmware audio mixer.
Definition: ntv2devicefeatures.h:122
kRegShiftAud6RateHigh
@ kRegShiftAud6RateHigh
Definition: ntv2publicinterface.h:2391
kRegMaskAud2RateHigh
@ kRegMaskAud2RateHigh
Definition: ntv2publicinterface.h:1296
kRegMaskPCMControlA8P3_4
@ kRegMaskPCMControlA8P3_4
Definition: ntv2publicinterface.h:2192
kRegAud1Delay
@ kRegAud1Delay
Definition: ntv2publicinterface.h:140
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:840
kRegAud7OutputLastAddr
@ kRegAud7OutputLastAddr
Definition: ntv2publicinterface.h:631
kK2RegShiftAudioLevel
@ kK2RegShiftAudioLevel
Definition: ntv2publicinterface.h:2484
kRegAud8InputLastAddr
@ kRegAud8InputLastAddr
Definition: ntv2publicinterface.h:637
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:1263
kRegAudioMixerMainInputLevelsPair1
@ kRegAudioMixerMainInputLevelsPair1
Definition: ntv2publicinterface.h:826
kRegMaskPCMControlA6P5_6
@ kRegMaskPCMControlA6P5_6
Definition: ntv2publicinterface.h:2175
kRegShiftEmbeddedAudioClock
@ kRegShiftEmbeddedAudioClock
Definition: ntv2publicinterface.h:2496
SDRAMAuditor
Audits an NTV2 device's SDRAM utilization, and can report contiguous regions of SDRAM,...
Definition: ntv2card.h:6902
kRegAudioMixerMainInputLevelsPair5
@ kRegAudioMixerMainInputLevelsPair5
Definition: ntv2publicinterface.h:830
kRegShiftPCMControlA1P3_4
@ kRegShiftPCMControlA1P3_4
Definition: ntv2publicinterface.h:3191
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:1721
kRegMaskAudioAutoErase
@ kRegMaskAudioAutoErase
Definition: ntv2publicinterface.h:1403
NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2
#define NTV2_IS_AUDIO_MIXER_CHANNELS_1_OR_2(__p__)
Definition: ntv2enums.h:3229
CNTV2Card::SetHDMIOutAudioChannels
virtual bool SetHDMIOutAudioChannels(const NTV2HDMIAudioChannels inNewValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the audio channel count to use for the given HDMI output.
Definition: ntv2audio.cpp:846
kRegShiftPCMControlA8P3_4
@ kRegShiftPCMControlA8P3_4
Definition: ntv2publicinterface.h:3254
NTV2_HDMIAudio8Channels
@ NTV2_HDMIAudio8Channels
8 audio channels
Definition: ntv2enums.h:3648
CNTV2Card::SetAudioMixerOutputGain
virtual bool SetAudioMixerOutputGain(const ULWord inGainValue)
Sets the gain for the output of the Audio Mixer.
Definition: ntv2audio.cpp:639
kRegShiftAud5PlayCapMode
@ kRegShiftAud5PlayCapMode
Definition: ntv2publicinterface.h:2353
NTV2_EMBEDDED_AUDIO_INPUT_INVALID
@ NTV2_EMBEDDED_AUDIO_INPUT_INVALID
Definition: ntv2enums.h:1967
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:1240
kDeviceGetNumBufferedAudioSystems
@ kDeviceGetNumBufferedAudioSystems
The total number of audio systems on the device that can read/write audio buffer memory....
Definition: ntv2devicefeatures.h:221
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:2467
kRegAud5Control
@ kRegAud5Control
Definition: ntv2publicinterface.h:619
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:1392
kRegMaskPCMControlA4P1_2
@ kRegMaskPCMControlA4P1_2
Definition: ntv2publicinterface.h:2155
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:1233
kRegAud3InputLastAddr
@ kRegAud3InputLastAddr
Definition: ntv2publicinterface.h:425
GetNonPCMDetectRegisterNumber
static NTV2RegisterNumber GetNonPCMDetectRegisterNumber(const NTV2Channel inSDIInputChannel, const bool inIsExtended=(0))
Definition: ntv2audio.cpp:1540
kRegAudioMixerAux2GainCh2
@ kRegAudioMixerAux2GainCh2
Definition: ntv2publicinterface.h:819
kDeviceCanDoAudioDelay
@ kDeviceCanDoAudioDelay
True if Audio System(s) support an adjustable delay.
Definition: ntv2devicefeatures.h:53
kDeviceCanDoBreakoutBoard
@ kDeviceCanDoBreakoutBoard
True if device supports an AJA breakout board. (New in SDK 17.0)
Definition: ntv2devicefeatures.h:144
kRegAud5InputLastAddr
@ kRegAud5InputLastAddr
Definition: ntv2publicinterface.h:622
CNTV2Card::GetAudioMixerLevelsSampleCount
virtual bool GetAudioMixerLevelsSampleCount(ULWord &outSampleCount)
Answers with the Audio Mixer's current sample count used for measuring audio levels.
Definition: ntv2audio.cpp:823
kRegAudioControl2
@ kRegAudioControl2
Definition: ntv2publicinterface.h:247
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:1404
kRegAud8Delay
@ kRegAud8Delay
Definition: ntv2publicinterface.h:689
kRegMaskBOBAnalogInputSelect
@ kRegMaskBOBAnalogInputSelect
Definition: ntv2publicinterface.h:2318
NTV2EmbeddedAudioClock
NTV2EmbeddedAudioClock
This enum value determines/states the device audio clock reference source. It was important to set th...
Definition: ntv2enums.h:1979
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:433
NTV2_IS_EXTENDED_AUDIO_CHANNEL_PAIR
#define NTV2_IS_EXTENDED_AUDIO_CHANNEL_PAIR(__p__)
Definition: ntv2enums.h:3187
kRegHDMIOutControl
@ kRegHDMIOutControl
Definition: ntv2publicinterface.h:258
kRegShiftPCMControlA5P7_8
@ kRegShiftPCMControlA5P7_8
Definition: ntv2publicinterface.h:3229
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:1668
NTV2_AudioChannel9_10
@ NTV2_AudioChannel9_10
This selects audio channels 9 and 10 (Group 3 channels 1 and 2)
Definition: ntv2enums.h:3118
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:1214
kRegShiftPCMControlA4P11_12
@ kRegShiftPCMControlA4P11_12
Definition: ntv2publicinterface.h:3222
kRegMaskAudioMixerInputLeftLevel
@ kRegMaskAudioMixerInputLeftLevel
Definition: ntv2publicinterface.h:2269
kRegShiftAud2RateHigh
@ kRegShiftAud2RateHigh
Definition: ntv2publicinterface.h:2387
kRegShiftPCMControlA8P5_6
@ kRegShiftPCMControlA8P5_6
Definition: ntv2publicinterface.h:3255
kRegMaskPCMControlA7P9_10
@ kRegMaskPCMControlA7P9_10
Definition: ntv2publicinterface.h:2186
kRegMaskPCMControlA3P5_6
@ kRegMaskPCMControlA3P5_6
Definition: ntv2publicinterface.h:2148
kRegShiftResetAudioOutput
@ kRegShiftResetAudioOutput
Definition: ntv2publicinterface.h:2466
kRegShiftPCMControlA2P3_4
@ kRegShiftPCMControlA2P3_4
Definition: ntv2publicinterface.h:3200
kRegAud6SourceSelect
@ kRegAud6SourceSelect
Definition: ntv2publicinterface.h:625
kRegShiftPCMControlA2P11_12
@ kRegShiftPCMControlA2P11_12
Definition: ntv2publicinterface.h:3204
kDeviceGetNumAudioSystems
@ kDeviceGetNumAudioSystems
The number of independent Audio Systems on the device.
Definition: ntv2devicefeatures.h:193
kRegMaskPCMControlA2P15_16
@ kRegMaskPCMControlA2P15_16
Definition: ntv2publicinterface.h:2144
kRegAud4InputLastAddr
@ kRegAud4InputLastAddr
Definition: ntv2publicinterface.h:427
NTV2_EMBEDDED_AUDIO_CLOCK_REFERENCE
@ NTV2_EMBEDDED_AUDIO_CLOCK_REFERENCE
Audio clock derived from the device reference.
Definition: ntv2enums.h:1981
kRegShiftPCMControlA2P9_10
@ kRegShiftPCMControlA2P9_10
Definition: ntv2publicinterface.h:3203
kDeviceHasRotaryEncoder
@ kDeviceHasRotaryEncoder
True if device has a rotary encoder volume control.
Definition: ntv2devicefeatures.h:140
NTV2_AnalogAudioIO_4Out_4In
@ NTV2_AnalogAudioIO_4Out_4In
Definition: ntv2enums.h:2225
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
CNTV2Card::GetHDMIOutAudioSource2Channel
virtual bool GetHDMIOutAudioSource2Channel(NTV2AudioChannelPair &outValue, NTV2AudioSystem &outAudioSystem, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Answers with the HDMI output's current 2-channel audio source.
Definition: ntv2audio.cpp:898
ULWord
uint32_t ULWord
Definition: ajatypes.h:256
kRegMaskPCMControlA4P5_6
@ kRegMaskPCMControlA4P5_6
Definition: ntv2publicinterface.h:2157
kRegShiftAudioMixerInputRightLevel
@ kRegShiftAudioMixerInputRightLevel
Definition: ntv2publicinterface.h:3332
kRegShiftPCMControlA3P13_14
@ kRegShiftPCMControlA3P13_14
Definition: ntv2publicinterface.h:3214
kRegMaskPCMControlA1P9_10
@ kRegMaskPCMControlA1P9_10
Definition: ntv2publicinterface.h:2132
kRegShiftPCMControlA6P15_16
@ kRegShiftPCMControlA6P15_16
Definition: ntv2publicinterface.h:3242
kRegShiftPCMControlA5P1_2
@ kRegShiftPCMControlA5P1_2
Definition: ntv2publicinterface.h:3226
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:1653
kRegMaskPCMControlA3P7_8
@ kRegMaskPCMControlA3P7_8
Definition: ntv2publicinterface.h:2149
kRegMaskInputStartAtVBI
@ kRegMaskInputStartAtVBI
Definition: ntv2publicinterface.h:1372
kFS1RegShiftAudioLevel
@ kFS1RegShiftAudioLevel
Definition: ntv2publicinterface.h:2486
kRegShiftEncodedAudioMode
@ kRegShiftEncodedAudioMode
Definition: ntv2publicinterface.h:2476
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:1770
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:631
kRegShiftPCMControlA3P11_12
@ kRegShiftPCMControlA3P11_12
Definition: ntv2publicinterface.h:3213
kRegMaskPCMControlA1P3_4
@ kRegMaskPCMControlA1P3_4
Definition: ntv2publicinterface.h:2129
kRegMaskPCMControlA1P11_12
@ kRegMaskPCMControlA1P11_12
Definition: ntv2publicinterface.h:2133
NTV2_IS_VALID_AUDIO_MIXER_INPUT
#define NTV2_IS_VALID_AUDIO_MIXER_INPUT(__p__)
Definition: ntv2enums.h:3244
kRegShiftPCMControlA7P9_10
@ kRegShiftPCMControlA7P9_10
Definition: ntv2publicinterface.h:3248
kRegShiftPCMControlA3P3_4
@ kRegShiftPCMControlA3P3_4
Definition: ntv2publicinterface.h:3209
kRegShiftPCMControlA6P11_12
@ kRegShiftPCMControlA6P11_12
Definition: ntv2publicinterface.h:3240
kRegAudioMixerMainOutputLevelsPair5
@ kRegAudioMixerMainOutputLevelsPair5
Definition: ntv2publicinterface.h:839
kRegMaskAudioMixerLevelSampleCount
@ kRegMaskAudioMixerLevelSampleCount
Definition: ntv2publicinterface.h:2271
kRegFirstNonPCMAudioDetectRegister
@ kRegFirstNonPCMAudioDetectRegister
Definition: ntv2publicinterface.h:847
kRegShiftAudioSource
@ kRegShiftAudioSource
Definition: ntv2publicinterface.h:2491
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:1488
CNTV2Card::SetHDMIOutAudioFormat
virtual bool SetHDMIOutAudioFormat(const NTV2AudioFormat inNewValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the HDMI output's audio format.
Definition: ntv2audio.cpp:1031
kRegShiftPCMControlA8P11_12
@ kRegShiftPCMControlA8P11_12
Definition: ntv2publicinterface.h:3258
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:1587
kRegAud1InputLastAddr
@ kRegAud1InputLastAddr
Definition: ntv2publicinterface.h:148
kRegAud3Control
@ kRegAud3Control
Definition: ntv2publicinterface.h:419
kRegMaskPCMControlA7P15_16
@ kRegMaskPCMControlA7P15_16
Definition: ntv2publicinterface.h:2189
NTV2AudioSystemSet
std::set< NTV2AudioSystem > NTV2AudioSystemSet
A set of distinct NTV2AudioSystem values. New in SDK 16.2.
Definition: ntv2publicinterface.h:3984
kRegShiftAudioMixerLevelSampleCount
@ kRegShiftAudioMixerLevelSampleCount
Definition: ntv2publicinterface.h:3333
kRegShiftPCMControlA1P11_12
@ kRegShiftPCMControlA1P11_12
Definition: ntv2publicinterface.h:3195
kRegMaskPCMControlA5P15_16
@ kRegMaskPCMControlA5P15_16
Definition: ntv2publicinterface.h:2171
ntv2card.h
Declares the CNTV2Card class.
kRegShiftEmbeddedOutputSupressCh1
@ kRegShiftEmbeddedOutputSupressCh1
Definition: ntv2publicinterface.h:2470
kRegMaskHDMIOutAudio2ChannelSelect
@ kRegMaskHDMIOutAudio2ChannelSelect
Definition: ntv2publicinterface.h:1648
kDeviceCanDoPCMDetection
@ kDeviceCanDoPCMDetection
True if device can detect which audio channel pairs are not carrying PCM (Pulse Code Modulation) audi...
Definition: ntv2devicefeatures.h:73
NTV2_AudioMixerInputAux1
@ NTV2_AudioMixerInputAux1
This selects the Audio Mixer's 1st Auxiliary input.
Definition: ntv2enums.h:3238
kRegShiftPCMControlA1P5_6
@ kRegShiftPCMControlA1P5_6
Definition: ntv2publicinterface.h:3192
kDeviceGetHDMIVersion
@ kDeviceGetHDMIVersion
The version number of the HDMI chipset on the device.
Definition: ntv2devicefeatures.h:177
kRegMaskPauseAudio
@ kRegMaskPauseAudio
Definition: ntv2publicinterface.h:1373
kRegShiftHDMIOutAudio2ChannelSelect
@ kRegShiftHDMIOutAudio2ChannelSelect
Definition: ntv2publicinterface.h:2733
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:146
kRegMaskAud1PlayCapMode
@ kRegMaskAud1PlayCapMode
Definition: ntv2publicinterface.h:1256
NTV2RegisterReadsConstIter
NTV2RegWritesConstIter NTV2RegisterReadsConstIter
Definition: ntv2publicinterface.h:4142
kRegShiftPCMControlA2P7_8
@ kRegShiftPCMControlA2P7_8
Definition: ntv2publicinterface.h:3202
kRegGlobalControl2
@ kRegGlobalControl2
Definition: ntv2publicinterface.h:408
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:1279
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:639
kRegShiftPCMControlA6P7_8
@ kRegShiftPCMControlA6P7_8
Definition: ntv2publicinterface.h:3238
kRegMaskPCMControlA1P1_2
@ kRegMaskPCMControlA1P1_2
Definition: ntv2publicinterface.h:2128
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:812
NTV2AudioChannelPair
NTV2AudioChannelPair
Identifies a pair of audio channels.
Definition: ntv2enums.h:3112
kRegGlobalControl3
@ kRegGlobalControl3
Definition: ntv2publicinterface.h:234
kRegShiftAud8RateHigh
@ kRegShiftAud8RateHigh
Definition: ntv2publicinterface.h:2393
NTV2AudioLevel
NTV2AudioLevel
Definition: ntv2enums.h:2302
kRegShiftPCMControlA6P13_14
@ kRegShiftPCMControlA6P13_14
Definition: ntv2publicinterface.h:3241
UWord
uint16_t UWord
Definition: ajatypes.h:254
NTV2RegisterReads
NTV2RegWrites NTV2RegisterReads
Definition: ntv2publicinterface.h:4141
PCM_CONTROL_INFO::pcmControlReg
ULWord pcmControlReg
Definition: ntv2audio.cpp:55
kRegAudioMixerMainInputLevelsPair7
@ kRegAudioMixerMainInputLevelsPair7
Definition: ntv2publicinterface.h:832
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:626
kRegAudioMixerOutGain
@ kRegAudioMixerOutGain
Definition: ntv2publicinterface.h:820
kRegMaskPCMControlA3P9_10
@ kRegMaskPCMControlA3P9_10
Definition: ntv2publicinterface.h:2150
kRegShiftPCMControlA3P7_8
@ kRegShiftPCMControlA3P7_8
Definition: ntv2publicinterface.h:3211
kRegAud3OutputLastAddr
@ kRegAud3OutputLastAddr
Definition: ntv2publicinterface.h:424
kRegShiftPCMControlA5P13_14
@ kRegShiftPCMControlA5P13_14
Definition: ntv2publicinterface.h:3232
kRegHDMIInputControl
@ kRegHDMIInputControl
Definition: ntv2publicinterface.h:260
NTV2_EMBEDDED_AUDIO_CLOCK_VIDEO_INPUT
@ NTV2_EMBEDDED_AUDIO_CLOCK_VIDEO_INPUT
Audio clock derived from the video input.
Definition: ntv2enums.h:1982
ntv2utils.h
Declares numerous NTV2 utility functions.
kRegShiftPCMControlA7P3_4
@ kRegShiftPCMControlA7P3_4
Definition: ntv2publicinterface.h:3245
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:1689
NTV2_AnalogAudioIO_4In_4Out
@ NTV2_AnalogAudioIO_4In_4Out
Definition: ntv2enums.h:2224
kRegMaskAudio16Channel
@ kRegMaskAudio16Channel
Definition: ntv2publicinterface.h:1382
kDeviceCanDoMultiLinkAudio
@ kDeviceCanDoMultiLinkAudio
True if device supports grouped audio system control.
Definition: ntv2devicefeatures.h:130
CNTV2Card::ReadAudioSource
virtual bool ReadAudioSource(ULWord &outValue, const NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2audio.cpp:480
kRegShiftLoopBack
@ kRegShiftLoopBack
Definition: ntv2publicinterface.h:2463
kRegShiftMultiLinkAudio
@ kRegShiftMultiLinkAudio
Definition: ntv2publicinterface.h:2478
NTV2_AUDIO_BUFFER_SIZE_1MB
@ NTV2_AUDIO_BUFFER_SIZE_1MB
Definition: ntv2enums.h:1905
kRegMaskPCMControlA2P1_2
@ kRegMaskPCMControlA2P1_2
Definition: ntv2publicinterface.h:2137
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:1143
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:1076
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:1546
kRegMaskPCMControlA1P15_16
@ kRegMaskPCMControlA1P15_16
Definition: ntv2publicinterface.h:2135
kRegShiftEmbeddedOutputSupressCh2
@ kRegShiftEmbeddedOutputSupressCh2
Definition: ntv2publicinterface.h:2472
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:1165
kRegShiftPCMControlA4P15_16
@ kRegShiftPCMControlA4P15_16
Definition: ntv2publicinterface.h:3224
kRegShiftPCMControlA7P13_14
@ kRegShiftPCMControlA7P13_14
Definition: ntv2publicinterface.h:3250
NTV2_AUDIO_LOOPBACK_INVALID
@ NTV2_AUDIO_LOOPBACK_INVALID
Definition: ntv2enums.h:2021
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:1064
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:3221
kDeviceCanDoPCMControl
@ kDeviceCanDoPCMControl
True if device can mark specific audio channel pairs as not carrying PCM (Pulse Code Modulation) audi...
Definition: ntv2devicefeatures.h:72
kRegAud4Control
@ kRegAud4Control
Definition: ntv2publicinterface.h:420
NTV2_AUDIO_BUFFER_SIZE_4MB
@ NTV2_AUDIO_BUFFER_SIZE_4MB
Definition: ntv2enums.h:1906
NTV2AudioLoopBack
NTV2AudioLoopBack
This enum value determines/states if an audio output embedder will embed silence (zeroes) or de-embed...
Definition: ntv2enums.h:2017
kRegMaskAudioMixerMainInputEnable
@ kRegMaskAudioMixerMainInputEnable
Definition: ntv2publicinterface.h:2244
kRegAud8SourceSelect
@ kRegAud8SourceSelect
Definition: ntv2publicinterface.h:635
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:3245
kRegAudioMixerMainInputLevelsPair0
@ kRegAudioMixerMainInputLevelsPair0
Definition: ntv2publicinterface.h:825
kRegMaskAud4RateHigh
@ kRegMaskAud4RateHigh
Definition: ntv2publicinterface.h:1298
kRegAudioMixerMainOutputLevelsPair3
@ kRegAudioMixerMainOutputLevelsPair3
Definition: ntv2publicinterface.h:837
kRegShiftPCMControlA4P5_6
@ kRegShiftPCMControlA4P5_6
Definition: ntv2publicinterface.h:3219
kRegShiftAudioMixerMainInputSelect
@ kRegShiftAudioMixerMainInputSelect
Definition: ntv2publicinterface.h:3285
kRegAud7Control
@ kRegAud7Control
Definition: ntv2publicinterface.h:629
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:715
kRegShiftRotaryEncoderGain
@ kRegShiftRotaryEncoderGain
Definition: ntv2publicinterface.h:3336
kRegAud4OutputLastAddr
@ kRegAud4OutputLastAddr
Definition: ntv2publicinterface.h:426
kRegAud5OutputLastAddr
@ kRegAud5OutputLastAddr
Definition: ntv2publicinterface.h:621
kRegMaskPCMControlA4P11_12
@ kRegMaskPCMControlA4P11_12
Definition: ntv2publicinterface.h:2160
kRegShiftAud7PlayCapMode
@ kRegShiftAud7PlayCapMode
Definition: ntv2publicinterface.h:2355
kRegMaskAud1RateHigh
@ kRegMaskAud1RateHigh
Definition: ntv2publicinterface.h:1295
kRegAud5SourceSelect
@ kRegAud5SourceSelect
Definition: ntv2publicinterface.h:620
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:1135
kRegShiftAudioMixerMainInputEnable
@ kRegShiftAudioMixerMainInputEnable
Definition: ntv2publicinterface.h:3306
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:1761
kRegMaskPCMControlA7P11_12
@ kRegMaskPCMControlA7P11_12
Definition: ntv2publicinterface.h:2187
sAudioMixerInputMuteShifts
static const ULWord sAudioMixerInputMuteShifts[]
Definition: ntv2audio.cpp:713
kRegMaskPCMControlA4P15_16
@ kRegMaskPCMControlA4P15_16
Definition: ntv2publicinterface.h:2162
kRegShiftAud7RateHigh
@ kRegShiftAud7RateHigh
Definition: ntv2publicinterface.h:2392
kRegAud1SourceSelect
@ kRegAud1SourceSelect
Definition: ntv2publicinterface.h:146
kRegMaskPCMControlA4P7_8
@ kRegMaskPCMControlA4P7_8
Definition: ntv2publicinterface.h:2158
kRegShiftAud3PlayCapMode
@ kRegShiftAud3PlayCapMode
Definition: ntv2publicinterface.h:2351
NTV2_IS_VALID_AUDIO_LOOPBACK
#define NTV2_IS_VALID_AUDIO_LOOPBACK(_x_)
Definition: ntv2enums.h:2024
CNTV2Card::SetSDIOutputAudioEnabled
virtual bool SetSDIOutputAudioEnabled(const NTV2Channel inSDIOutput, const bool &inEnable)
Enables or disables the audio output embedder for the given SDI output connector (specified as a chan...
Definition: ntv2audio.cpp:1640
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_6
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_6
Definition: ntv2enums.h:1963
kRegShiftNumChannels
@ kRegShiftNumChannels
Definition: ntv2publicinterface.h:2473
kRegShiftPCMControlA5P5_6
@ kRegShiftPCMControlA5P5_6
Definition: ntv2publicinterface.h:3228
kRegAud4SourceSelect
@ kRegAud4SourceSelect
Definition: ntv2publicinterface.h:422
kRegMaskAud2PlayCapMode
@ kRegMaskAud2PlayCapMode
Definition: ntv2publicinterface.h:1257
NTV2_IS_VALID_CHANNEL
#define NTV2_IS_VALID_CHANNEL(__x__)
Definition: ntv2enums.h:1360
CNTV2Card::GetAnalogAudioIOConfiguration
virtual bool GetAnalogAudioIOConfiguration(NTV2AnalogAudioIO &outConfig)
Definition: ntv2audio.cpp:1729
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:1712
kRegAudioMixerMainOutputLevelsPair4
@ kRegAudioMixerMainOutputLevelsPair4
Definition: ntv2publicinterface.h:838
NTV2_IS_VALID_AUDIO_SOURCE
#define NTV2_IS_VALID_AUDIO_SOURCE(_x_)
Definition: ntv2enums.h:2009
sAudioDetectGroups
static const unsigned sAudioDetectGroups[]
Definition: ntv2audio.cpp:1388
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:613
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:1247
NTV2_AudioChannel5_8
@ NTV2_AudioChannel5_8
This selects audio channels 5 thru 8.
Definition: ntv2enums.h:3255
kRegMaskResetAudioOutput
@ kRegMaskResetAudioOutput
Definition: ntv2publicinterface.h:1371
kRegShiftAud1RateHigh
@ kRegShiftAud1RateHigh
Definition: ntv2publicinterface.h:2386
kRegMaskEmbeddedAudioClock
@ kRegMaskEmbeddedAudioClock
Definition: ntv2publicinterface.h:1406
kRegMaskAud5RateHigh
@ kRegMaskAud5RateHigh
Definition: ntv2publicinterface.h:1299
kDeviceGetNumHDMIVideoInputs
@ kDeviceGetNumHDMIVideoInputs
The number of HDMI video inputs on the device.
Definition: ntv2devicefeatures.h:203
kDeviceCanDoAESAudioIn
@ kDeviceCanDoAESAudioIn
True if device has any AES audio inputs or outputs.
Definition: ntv2devicefeatures.h:45
kRegMaskPCMControlA7P7_8
@ kRegMaskPCMControlA7P7_8
Definition: ntv2publicinterface.h:2185
kRegAudioMixerMainInputLevelsPair6
@ kRegAudioMixerMainInputLevelsPair6
Definition: ntv2publicinterface.h:831
kRegAudioMixerMainInputLevelsPair2
@ kRegAudioMixerMainInputLevelsPair2
Definition: ntv2publicinterface.h:827
kRegAudioMixerChannelSelect
@ kRegAudioMixerChannelSelect
Definition: ntv2publicinterface.h:816
kVRegSuspendSystemAudio
@ kVRegSuspendSystemAudio
Definition: ntv2virtualregisters.h:311
kRegShiftPCMControlA6P3_4
@ kRegShiftPCMControlA6P3_4
Definition: ntv2publicinterface.h:3236
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:561
kRegMaskAud3PlayCapMode
@ kRegMaskAud3PlayCapMode
Definition: ntv2publicinterface.h:1258
kRegRotaryEncoder
@ kRegRotaryEncoder
Definition: ntv2publicinterface.h:1060
kRegMaskPCMControlA1P13_14
@ kRegMaskPCMControlA1P13_14
Definition: ntv2publicinterface.h:2134
kRegMaskHDMIOutSourceSelect
@ kRegMaskHDMIOutSourceSelect
Definition: ntv2publicinterface.h:1642
NTV2_AUDIO_AES
@ NTV2_AUDIO_AES
Obtain audio samples from the device AES inputs, if available.
Definition: ntv2enums.h:1997
kRegMaskAudioOutDelay
@ kRegMaskAudioOutDelay
Definition: ntv2publicinterface.h:1512
gAudioDelayRegisterNumbers
static const ULWord gAudioDelayRegisterNumbers[]
Definition: ntv2audio.cpp:43
kRegShiftPCMControlA4P3_4
@ kRegShiftPCMControlA4P3_4
Definition: ntv2publicinterface.h:3218
kRegShiftAudioRate
@ kRegShiftAudioRate
Definition: ntv2publicinterface.h:2475
NTV2_AUDIO_HDMI
@ NTV2_AUDIO_HDMI
Obtain audio samples from the device HDMI input, if available.
Definition: ntv2enums.h:1999
kRegAud1Control
@ kRegAud1Control
Definition: ntv2publicinterface.h:145
NTV2AudioRate
NTV2AudioRate
Definition: ntv2enums.h:1917
kRegMaskNumChannels
@ kRegMaskNumChannels
Definition: ntv2publicinterface.h:1378
kRegMaskPCMControlA3P1_2
@ kRegMaskPCMControlA3P1_2
Definition: ntv2publicinterface.h:2146
kRegMaskPCMControlA7P5_6
@ kRegMaskPCMControlA7P5_6
Definition: ntv2publicinterface.h:2184
kRegShiftBOBAnalogLevelControl
@ kRegShiftBOBAnalogLevelControl
Definition: ntv2publicinterface.h:3378
kRegShiftAud5RateHigh
@ kRegShiftAud5RateHigh
Definition: ntv2publicinterface.h:2390
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:1158
NTV2RegisterNumber
NTV2RegisterNumber
Definition: ntv2publicinterface.h:118
NTV2_AudioChannel9_16
@ NTV2_AudioChannel9_16
This selects audio channels 9 thru 16.
Definition: ntv2enums.h:3304
DEC
#define DEC(__x__)
Definition: ntv2publicinterface.h:5765
kRegMaskOutputStartAtVBI
@ kRegMaskOutputStartAtVBI
Definition: ntv2publicinterface.h:1376
CNTV2Card::WriteAudioSource
virtual bool WriteAudioSource(const ULWord inValue, const NTV2Channel inChannel=NTV2_CHANNEL1)
Definition: ntv2audio.cpp:481
CNTV2Card::GetHDMIOutAudioFormat
virtual bool GetHDMIOutAudioFormat(NTV2AudioFormat &outValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Answers with the HDMI output's current audio format.
Definition: ntv2audio.cpp:1042
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:3206
kRegMaskPCMControlA5P3_4
@ kRegMaskPCMControlA5P3_4
Definition: ntv2publicinterface.h:2165
CNTV2Card::SetHDMIOutAudioRate
virtual bool SetHDMIOutAudioRate(const NTV2AudioRate inNewValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the HDMI output's audio rate.
Definition: ntv2audio.cpp:1009
CNTV2Card::SetHDMIOutAudioSource2Channel
virtual bool SetHDMIOutAudioSource2Channel(const NTV2AudioChannelPair inNewValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Sets the HDMI output's 2-channel audio source.
Definition: ntv2audio.cpp:868
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_7
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_7
Definition: ntv2enums.h:1964
kRegMaskAudioRate
@ kRegMaskAudioRate
Definition: ntv2publicinterface.h:1380
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
NTV2RegInfo
Everything needed to call CNTV2Card::ReadRegister or CNTV2Card::WriteRegister functions.
Definition: ntv2publicinterface.h:4046
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:3985
kRegPCMControl4321
@ kRegPCMControl4321
Definition: ntv2publicinterface.h:691
kRegShiftAudioAutoErase
@ kRegShiftAudioAutoErase
Definition: ntv2publicinterface.h:2493
NTV2_AnalogAudioIO_8In
@ NTV2_AnalogAudioIO_8In
Definition: ntv2enums.h:2226
kRegAudioMixerAux2InputLevels
@ kRegAudioMixerAux2InputLevels
Definition: ntv2publicinterface.h:824
CNTV2Card::GetDetectedAESChannelPairs
virtual bool GetDetectedAESChannelPairs(NTV2AudioChannelPairs &outDetectedChannelPairs)
Answers which AES/EBU audio channel pairs are present on the device.
Definition: ntv2audio.cpp:1422
NTV2_AUDIO_LOOPBACK_ON
@ NTV2_AUDIO_LOOPBACK_ON
Embeds SDI input source audio into the data stream.
Definition: ntv2enums.h:2020
kRegShiftResetAudioInput
@ kRegShiftResetAudioInput
Definition: ntv2publicinterface.h:2465
kRegShiftPCMControlA1P7_8
@ kRegShiftPCMControlA1P7_8
Definition: ntv2publicinterface.h:3193
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:1287
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:574
kRegMaskEmbeddedAudioInput
@ kRegMaskEmbeddedAudioInput
Definition: ntv2publicinterface.h:1402
kRegShiftPCMControlA5P11_12
@ kRegShiftPCMControlA5P11_12
Definition: ntv2publicinterface.h:3231
kRegMaskPCMControlA2P3_4
@ kRegMaskPCMControlA2P3_4
Definition: ntv2publicinterface.h:2138
NTV2_AUDIO_CHANNEL_QUAD_INVALID
@ NTV2_AUDIO_CHANNEL_QUAD_INVALID
Definition: ntv2enums.h:3287
NTV2_AUDIO_96K
@ NTV2_AUDIO_96K
Definition: ntv2enums.h:1920
CNTV2Card::SetHeadphoneOutputGain
virtual bool SetHeadphoneOutputGain(const ULWord inGainValue)
Sets the gain for the headphone out.
Definition: ntv2audio.cpp:705
kRegMaskEncodedAudioMode
@ kRegMaskEncodedAudioMode
Definition: ntv2publicinterface.h:1381
kRegInputStatus
@ kRegInputStatus
Definition: ntv2publicinterface.h:143
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:1677
std
Definition: json.hpp:5362
kRegShiftPCMControlA1P1_2
@ kRegShiftPCMControlA1P1_2
Definition: ntv2publicinterface.h:3190
kRegMaskPCMControlA2P7_8
@ kRegMaskPCMControlA2P7_8
Definition: ntv2publicinterface.h:2140
NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16
#define NTV2_IS_WITHIN_AUDIO_CHANNELS_1_TO_16(__p__)
Definition: ntv2enums.h:3185
gAESChannelMappingShifts
static const unsigned gAESChannelMappingShifts[4]
Definition: ntv2audio.cpp:1485
NTV2_AUDIO_EMBEDDED
@ NTV2_AUDIO_EMBEDDED
Obtain audio samples from the audio that's embedded in the video HANC.
Definition: ntv2enums.h:1996
kRegMaskPCMControlA6P13_14
@ kRegMaskPCMControlA6P13_14
Definition: ntv2publicinterface.h:2179
ULWordSequence
std::vector< uint32_t > ULWordSequence
An ordered sequence of ULWord (uint32_t) values.
Definition: ntv2publicinterface.h:46
kRegAud2InputLastAddr
@ kRegAud2InputLastAddr
Definition: ntv2publicinterface.h:384
kRegShiftPCMControlA1P9_10
@ kRegShiftPCMControlA1P9_10
Definition: ntv2publicinterface.h:3194
kDeviceHasBreakoutBoard
@ kDeviceHasBreakoutBoard
True if device has attached breakout board. (New in SDK 17.0)
Definition: ntv2devicefeatures.h:145
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:1515
kRegMaskEmbeddedOutputSupressCh1
@ kRegMaskEmbeddedOutputSupressCh1
Definition: ntv2publicinterface.h:1375
kRegShiftPCMControlA6P1_2
@ kRegShiftPCMControlA6P1_2
Definition: ntv2publicinterface.h:3235
sAudioMixerInputGainCh2Regs
static const ULWord sAudioMixerInputGainCh2Regs[]
Definition: ntv2audio.cpp:602
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:1151
NTV2_IS_NORMAL_AUDIO_CHANNEL_QUAD
#define NTV2_IS_NORMAL_AUDIO_CHANNEL_QUAD(__p__)
Definition: ntv2enums.h:3293
kRegShiftPCMControlA4P7_8
@ kRegShiftPCMControlA4P7_8
Definition: ntv2publicinterface.h:3220
kRegMaskAnalogIOControl_14
@ kRegMaskAnalogIOControl_14
Definition: ntv2publicinterface.h:1285
kRegShiftAudioInDelay
@ kRegShiftAudioInDelay
Definition: ntv2publicinterface.h:2601
CNTV2Card::GetSDIOutputAudioEnabled
virtual bool GetSDIOutputAudioEnabled(const NTV2Channel inSDIOutput, bool &outIsEnabled)
Answers with the current state of the audio output embedder for the given SDI output connector (speci...
Definition: ntv2audio.cpp:1623
kRegAudioMixerMainOutputLevelsPair1
@ kRegAudioMixerMainOutputLevelsPair1
Definition: ntv2publicinterface.h:835
CNTV2Card::SetAudioMixerOutputChannelsMute
virtual bool SetAudioMixerOutputChannelsMute(const NTV2AudioChannelsMuted16 inMutes)
Mutes or enables the individual output audio channels of the Audio Mixer.
Definition: ntv2audio.cpp:727
kRegMaskPCMControlA6P9_10
@ kRegMaskPCMControlA6P9_10
Definition: ntv2publicinterface.h:2177
kRegShiftAudioMixerInputLeftLevel
@ kRegShiftAudioMixerInputLeftLevel
Definition: ntv2publicinterface.h:3331
kRegMaskPCMControlA6P1_2
@ kRegMaskPCMControlA6P1_2
Definition: ntv2publicinterface.h:2173
NTV2FrameGeometry
NTV2FrameGeometry
Identifies a particular video frame geometry.
Definition: ntv2enums.h:342
kRegMaskPCMControlA8P15_16
@ kRegMaskPCMControlA8P15_16
Definition: ntv2publicinterface.h:2198
gAudioSystemToSrcSelectRegNum
static const ULWord gAudioSystemToSrcSelectRegNum[]
Definition: ntv2audio.cpp:28
kRegAud6Control
@ kRegAud6Control
Definition: ntv2publicinterface.h:624
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:1705
kRegMaskResetAudioInput
@ kRegMaskResetAudioInput
Definition: ntv2publicinterface.h:1370
kRegShiftAudioMixerAux1x2CHInput
@ kRegShiftAudioMixerAux1x2CHInput
Definition: ntv2publicinterface.h:3286
kRegMaskPCMControlA8P11_12
@ kRegMaskPCMControlA8P11_12
Definition: ntv2publicinterface.h:2196
kRegAudioMixerMainOutputLevelsPair7
@ kRegAudioMixerMainOutputLevelsPair7
Definition: ntv2publicinterface.h:841
kRegMaskPCMControlA8P1_2
@ kRegMaskPCMControlA8P1_2
Definition: ntv2publicinterface.h:2191
NTV2_AudioChannel1_8
@ NTV2_AudioChannel1_8
This selects audio channels 1 thru 8.
Definition: ntv2enums.h:3303
true
#define true
Definition: ntv2devicefeatures.h:26
kRegMaskPCMControlA4P9_10
@ kRegMaskPCMControlA4P9_10
Definition: ntv2publicinterface.h:2159
sAudioMixerInputMuteMasks
static const ULWord sAudioMixerInputMuteMasks[]
Definition: ntv2audio.cpp:712
kDeviceGetMaxAudioChannels
@ kDeviceGetMaxAudioChannels
The maximum number of audio channels that a single Audio System can support on the device.
Definition: ntv2devicefeatures.h:179
NTV2_AnalogAudioIO_8Out
@ NTV2_AnalogAudioIO_8Out
Definition: ntv2enums.h:2223
kRegMaskHDMIOut8ChGroupSelect
@ kRegMaskHDMIOut8ChGroupSelect
Definition: ntv2publicinterface.h:1595
kRegMaskAudioMixerOutputChannelsMute
@ kRegMaskAudioMixerOutputChannelsMute
Definition: ntv2publicinterface.h:2227
kRegMaskPCMControlA8P7_8
@ kRegMaskPCMControlA8P7_8
Definition: ntv2publicinterface.h:2194
kRegBOBAudioControl
@ kRegBOBAudioControl
Definition: ntv2publicinterface.h:1080
NTV2_AUDIO_BUFFER_INVALID
@ NTV2_AUDIO_BUFFER_INVALID
Definition: ntv2enums.h:1909
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:618
NTV2Audio4ChannelSelect
NTV2Audio4ChannelSelect
Identifies a contiguous, adjacent group of four audio channels.
Definition: ntv2enums.h:3252
kRegMaskEmbeddedOutputSupressCh2
@ kRegMaskEmbeddedOutputSupressCh2
Definition: ntv2publicinterface.h:1377
kRegShiftEmbeddedAudioInput2
@ kRegShiftEmbeddedAudioInput2
Definition: ntv2publicinterface.h:2497
kRegMaskMonitorSource
@ kRegMaskMonitorSource
Definition: ntv2publicinterface.h:1971
kRegMaskAud4PlayCapMode
@ kRegMaskAud4PlayCapMode
Definition: ntv2publicinterface.h:1259
kDeviceGetActiveMemorySize
@ kDeviceGetActiveMemorySize
The size, in bytes, of the device's active RAM available for video and audio.
Definition: ntv2devicefeatures.h:174
CNTV2Card::GetHDMIOutAudioRate
virtual bool GetHDMIOutAudioRate(NTV2AudioRate &outValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Answers with the HDMI output's current audio rate.
Definition: ntv2audio.cpp:1020
NTV2EncodedAudioMode
NTV2EncodedAudioMode
Definition: ntv2enums.h:1929
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:2195
NTV2_AUDIOSYSTEM_5
@ NTV2_AUDIOSYSTEM_5
This identifies the 5th Audio System.
Definition: ntv2enums.h:3879
CNTV2Card::GetHeadphoneOutputGain
virtual bool GetHeadphoneOutputGain(ULWord &outGainValue)
Answers with the current gain setting for the headphone out.
Definition: ntv2audio.cpp:697
sAudioDetectRegs
static const ULWord sAudioDetectRegs[]
Definition: ntv2audio.cpp:1383
kRegMaskPCMControlA2P11_12
@ kRegMaskPCMControlA2P11_12
Definition: ntv2publicinterface.h:2142
kDeviceGetTotalNumAudioSystems
@ kDeviceGetTotalNumAudioSystems
The total number of audio systems on the device, including host audio and mixer audio systems,...
Definition: ntv2devicefeatures.h:220
kRegAud2OutputLastAddr
@ kRegAud2OutputLastAddr
Definition: ntv2publicinterface.h:383
kRegMaskAud8RateHigh
@ kRegMaskAud8RateHigh
Definition: ntv2publicinterface.h:1302
kRegAud2SourceSelect
@ kRegAud2SourceSelect
Definition: ntv2publicinterface.h:382
kRegMaskAudioSource
@ kRegMaskAudioSource
Definition: ntv2publicinterface.h:1401
NTV2_AUDIO_ANALOG
@ NTV2_AUDIO_ANALOG
Obtain audio samples from the device analog input(s), if available.
Definition: ntv2enums.h:1998
kRegShiftPCMControlA2P13_14
@ kRegShiftPCMControlA2P13_14
Definition: ntv2publicinterface.h:3205
kRegShiftPCMControlA7P1_2
@ kRegShiftPCMControlA7P1_2
Definition: ntv2publicinterface.h:3244
gAudioSystemToAudioControlRegNum
static const ULWord gAudioSystemToAudioControlRegNum[]
Definition: ntv2audio.cpp:45
kRegShiftPCMControlA8P1_2
@ kRegShiftPCMControlA8P1_2
Definition: ntv2publicinterface.h:3253
NTV2_AudioChannel15_16
@ NTV2_AudioChannel15_16
This selects audio channels 15 and 16 (Group 4 channels 3 and 4)
Definition: ntv2enums.h:3121
kRegShiftPauseAudio
@ kRegShiftPauseAudio
Definition: ntv2publicinterface.h:2468
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:828
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:1447
kRegShiftAudioOutDelay
@ kRegShiftAudioOutDelay
Definition: ntv2publicinterface.h:2602
kRegMaskAud6RateHigh
@ kRegMaskAud6RateHigh
Definition: ntv2publicinterface.h:1300
kRegMaskEmbeddedAudioInput2
@ kRegMaskEmbeddedAudioInput2
Definition: ntv2publicinterface.h:1407
kRegShiftPCMControlA7P7_8
@ kRegShiftPCMControlA7P7_8
Definition: ntv2publicinterface.h:3247
NTV2EmbeddedAudioInput
NTV2EmbeddedAudioInput
This enum value determines/states which SDI video input will be used to supply audio samples to an au...
Definition: ntv2enums.h:1956
SDRAMAuditor::GetBadRegions
bool GetBadRegions(ULWordSequence &outBlks) const
Answers with the list of colliding and illegal memory regions.
Definition: ntv2card.h:6967
kRegShiftAud4RateHigh
@ kRegShiftAud4RateHigh
Definition: ntv2publicinterface.h:2389
NTV2_IS_VALID_AUDIO_CHANNEL_PAIR
#define NTV2_IS_VALID_AUDIO_CHANNEL_PAIR(__p__)
Definition: ntv2enums.h:3184
kRegMaskPCMControlA5P9_10
@ kRegMaskPCMControlA5P9_10
Definition: ntv2publicinterface.h:2168
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:1255
kRegAudioMixerMainOutputLevelsPair2
@ kRegAudioMixerMainOutputLevelsPair2
Definition: ntv2publicinterface.h:836
BIT
#define BIT(_x_)
Definition: ajatypes.h:565
kRegShiftPCMControlA3P5_6
@ kRegShiftPCMControlA3P5_6
Definition: ntv2publicinterface.h:3210
NTV2_AudioChannel1_4
@ NTV2_AudioChannel1_4
This selects audio channels 1 thru 4.
Definition: ntv2enums.h:3254
NTV2AudioSystem
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information.
Definition: ntv2enums.h:3873
CNTV2Card::GetHDMIOutAudioChannels
virtual bool GetHDMIOutAudioChannels(NTV2HDMIAudioChannels &outValue, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Answers with the audio channel count for the given HDMI output (2 or 8).
Definition: ntv2audio.cpp:857
kRegMask20BitMode
@ kRegMask20BitMode
Definition: ntv2publicinterface.h:1367
NTV2_IS_VALID_AUDIO_SYSTEM
#define NTV2_IS_VALID_AUDIO_SYSTEM(__x__)
Definition: ntv2enums.h:3892
kRegShiftPCMControlA3P1_2
@ kRegShiftPCMControlA3P1_2
Definition: ntv2publicinterface.h:3208
NTV2_AudioChannel1_2
@ NTV2_AudioChannel1_2
This selects audio channels 1 and 2 (Group 1 channels 1 and 2)
Definition: ntv2enums.h:3114
BitMasksToNTV2AudioChannelPairs
static NTV2AudioChannelPairs BitMasksToNTV2AudioChannelPairs(const ULWord inBitMask, const ULWord inExtendedBitMask)
Definition: ntv2audio.cpp:1525
kRegAudioMixerMainGain
@ kRegAudioMixerMainGain
Definition: ntv2publicinterface.h:813
kDeviceHasBiDirectionalAnalogAudio
@ kDeviceHasBiDirectionalAnalogAudio
True if device has a bi-directional analog audio connector.
Definition: ntv2devicefeatures.h:135
kRegMaskPCMControlA6P7_8
@ kRegMaskPCMControlA6P7_8
Definition: ntv2publicinterface.h:2176
NTV2_AudioChannel9_12
@ NTV2_AudioChannel9_12
This selects audio channels 9 thru 12.
Definition: ntv2enums.h:3256
kK2RegMaskAudioBufferSize
@ kK2RegMaskAudioBufferSize
Definition: ntv2publicinterface.h:1392
NTV2Audio8ChannelSelect
NTV2Audio8ChannelSelect
Identifies a contiguous, adjacent group of eight audio channels.
Definition: ntv2enums.h:3301
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:1226
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_2
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_2
Definition: ntv2enums.h:1959
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:1294
CNTV2Card::SetHDMIOutAudioSource8Channel
virtual bool SetHDMIOutAudioSource8Channel(const NTV2Audio8ChannelSelect inNewValue, const NTV2AudioSystem inAudioSystem=NTV2_AUDIOSYSTEM_1, const NTV2Channel inWhichHDMIOut=NTV2_CHANNEL1)
Changes the HDMI output's 8-channel audio source.
Definition: ntv2audio.cpp:935
NTV2AudioSource
NTV2AudioSource
This enum value determines/states where an audio system will obtain its audio samples.
Definition: ntv2enums.h:1994
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:3196
kRegShiftAudioMixerAux2x2CHInput
@ kRegShiftAudioMixerAux2x2CHInput
Definition: ntv2publicinterface.h:3287
kRegMaskAudioMixerInputRightLevel
@ kRegMaskAudioMixerInputRightLevel
Definition: ntv2publicinterface.h:2270
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:1783
kRegMaskPCMControlA3P13_14
@ kRegMaskPCMControlA3P13_14
Definition: ntv2publicinterface.h:2152
kRegShiftPCMControlA8P7_8
@ kRegShiftPCMControlA8P7_8
Definition: ntv2publicinterface.h:3256
kRegMaskHDMIOutAudioCh
@ kRegMaskHDMIOutAudioCh
Definition: ntv2publicinterface.h:1610
kRegShiftMonitorSource
@ kRegShiftMonitorSource
Definition: ntv2publicinterface.h:3036
kRegShiftHDMIOutAudioSource
@ kRegShiftHDMIOutAudioSource
Definition: ntv2publicinterface.h:3037
kRegShiftAudioMixerAux1InputEnable
@ kRegShiftAudioMixerAux1InputEnable
Definition: ntv2publicinterface.h:3307
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:759
kRegAud2Control
@ kRegAud2Control
Definition: ntv2publicinterface.h:381
kRegMaskPCMControlA5P7_8
@ kRegMaskPCMControlA5P7_8
Definition: ntv2publicinterface.h:2167
NTV2AudioBufferSize
NTV2AudioBufferSize
Represents the size of the audio buffer used by a device audio system for storing captured samples or...
Definition: ntv2enums.h:1903
kRegAud3Delay
@ kRegAud3Delay
Definition: ntv2publicinterface.h:449
kRegAud6Delay
@ kRegAud6Delay
Definition: ntv2publicinterface.h:687
NTV2_AUDIO_SOURCE_INVALID
@ NTV2_AUDIO_SOURCE_INVALID
Definition: ntv2enums.h:2002
CNTV2Card::SetAudioMixerLevelsSampleCount
virtual bool SetAudioMixerLevelsSampleCount(const ULWord inSampleCount)
Sets the Audio Mixer's sample count it uses for measuring audio levels.
Definition: ntv2audio.cpp:832
kRegAudioMixerMainInputLevelsPair4
@ kRegAudioMixerMainInputLevelsPair4
Definition: ntv2publicinterface.h:829
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:734
debug.h
Declares the AJADebug class.
kRegMaskAudioMixerAux2InputEnable
@ kRegMaskAudioMixerAux2InputEnable
Definition: ntv2publicinterface.h:2246
kRegMaskPCMControlA7P1_2
@ kRegMaskPCMControlA7P1_2
Definition: ntv2publicinterface.h:2182
kRegMaskPCMControlA7P13_14
@ kRegMaskPCMControlA7P13_14
Definition: ntv2publicinterface.h:2188
kRegMaskAud5PlayCapMode
@ kRegMaskAud5PlayCapMode
Definition: ntv2publicinterface.h:1260
kRegPCMControl8765
@ kRegPCMControl8765
Definition: ntv2publicinterface.h:692
kRegMaskPCMControlA7P3_4
@ kRegMaskPCMControlA7P3_4
Definition: ntv2publicinterface.h:2183
NTV2_NUM_AUDIOSYSTEMS
@ NTV2_NUM_AUDIOSYSTEMS
Definition: ntv2enums.h:3884
gAudioPlayCaptureModeMasks
static const ULWord gAudioPlayCaptureModeMasks[]
Definition: ntv2audio.cpp:37
kRegShiftPCMControlA5P15_16
@ kRegShiftPCMControlA5P15_16
Definition: ntv2publicinterface.h:3233
kRegAud1Detect
@ kRegAud1Detect
Definition: ntv2publicinterface.h:144
kRegShiftHDMIOutAudioRate
@ kRegShiftHDMIOutAudioRate
Definition: ntv2publicinterface.h:2726
NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_5
@ NTV2_EMBEDDED_AUDIO_INPUT_VIDEO_5
Definition: ntv2enums.h:1962
kRegMaskMultiLinkAudio
@ kRegMaskMultiLinkAudio
Definition: ntv2publicinterface.h:1383
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:604
kRegMaskAudioMixerAux1x2CHInput
@ kRegMaskAudioMixerAux1x2CHInput
Definition: ntv2publicinterface.h:2224
kRegAud7SourceSelect
@ kRegAud7SourceSelect
Definition: ntv2publicinterface.h:630
kRegShiftPCMControlA8P15_16
@ kRegShiftPCMControlA8P15_16
Definition: ntv2publicinterface.h:3260
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:1960
NTV2_AUDIOSYSTEM_INVALID
@ NTV2_AUDIOSYSTEM_INVALID
Definition: ntv2enums.h:3885