@@ -45,28 +45,28 @@ static constexpr int kIdToSampleRate[4] = {24000, 32000, 44100, 48000};
45
45
46
46
class XmaContextNew : public XmaContext {
47
47
public:
48
- static const uint32_t kBytesPerPacket = 2048 ;
49
- static const uint32_t kBytesPerPacketHeader = 4 ;
50
- static const uint32_t kBytesPerPacketData =
48
+ static constexpr uint32_t kBytesPerPacket = 2048 ;
49
+ static constexpr uint32_t kBytesPerPacketHeader = 4 ;
50
+ static constexpr uint32_t kBytesPerPacketData =
51
51
kBytesPerPacket - kBytesPerPacketHeader ;
52
52
53
- static const uint32_t kBitsPerPacket = kBytesPerPacket * 8 ;
54
- static const uint32_t kBitsPerPacketHeader = 32 ;
55
- static const uint32_t kBitsPerFrameHeader = 15 ;
53
+ static constexpr uint32_t kBitsPerPacket = kBytesPerPacket * 8 ;
54
+ static constexpr uint32_t kBitsPerPacketHeader = 32 ;
55
+ static constexpr uint32_t kBitsPerFrameHeader = 15 ;
56
56
57
- static const uint32_t kBytesPerSample = 2 ;
58
- static const uint32_t kSamplesPerFrame = 512 ;
59
- static const uint32_t kSamplesPerSubframe = 128 ;
60
- static const uint32_t kBytesPerFrameChannel =
57
+ static constexpr uint32_t kBytesPerSample = 2 ;
58
+ static constexpr uint32_t kSamplesPerFrame = 512 ;
59
+ static constexpr uint32_t kSamplesPerSubframe = 128 ;
60
+ static constexpr uint32_t kBytesPerFrameChannel =
61
61
kSamplesPerFrame * kBytesPerSample ;
62
- static const uint32_t kBytesPerSubframeChannel =
62
+ static constexpr uint32_t kBytesPerSubframeChannel =
63
63
kSamplesPerSubframe * kBytesPerSample ;
64
64
65
- static const uint32_t kOutputBytesPerBlock = 256 ;
66
- static const uint32_t kOutputMaxSizeBytes = 31 * kOutputBytesPerBlock ;
65
+ static constexpr uint32_t kOutputBytesPerBlock = 256 ;
66
+ static constexpr uint32_t kOutputMaxSizeBytes = 31 * kOutputBytesPerBlock ;
67
67
68
- static const uint32_t kLastFrameMarker = 0x7FFF ;
69
- static const uint32_t kMaxFrameSizeinBits = 0x4000 - kBitsPerPacketHeader ;
68
+ static constexpr uint32_t kLastFrameMarker = 0x7FFF ;
69
+ static constexpr uint32_t kMaxFrameSizeinBits = 0x4000 - kBitsPerPacketHeader ;
70
70
71
71
explicit XmaContextNew ();
72
72
~XmaContextNew ();
0 commit comments