fork download
  1. #include <iostream>
  2.  
  3. struct AudioStreamPacketDescription
  4. {
  5. long mStartOffset;
  6. unsigned int mVariableFramesInPacket;
  7. unsigned int mDataByteSize;
  8. };
  9.  
  10. void print(const AudioStreamPacketDescription* a_packets,
  11. const size_t a_count)
  12. {
  13. for (size_t i = 0; i < a_count; i++)
  14. {
  15. std::cout << a_packets[i].mStartOffset << ", "
  16. << a_packets[i].mVariableFramesInPacket << ", "
  17. << a_packets[i].mDataByteSize << "\n";
  18. }
  19. }
  20.  
  21. int main()
  22. {
  23. AudioStreamPacketDescription descriptions[2] = { { 4, 10, 20 },
  24. { 8, 20, 40 }
  25. };
  26.  
  27. print(descriptions, 2);
  28. return 0;
  29. }
  30.  
Success #stdin #stdout 0.01s 2680KB
stdin
Standard input is empty
stdout
4, 10, 20
8, 20, 40