| 1155 | //============================================================= |
| 1156 | template <class T> |
| 1157 | void AudioFile<T>::addInt32ToFileData (std::vector<uint8_t>& fileData, int32_t i, Endianness endianness) |
| 1158 | { |
| 1159 | uint8_t bytes[4]; |
| 1160 | |
| 1161 | if (endianness == Endianness::LittleEndian) |
| 1162 | { |
| 1163 | bytes[3] = (i >> 24) & 0xFF; |
| 1164 | bytes[2] = (i >> 16) & 0xFF; |
| 1165 | bytes[1] = (i >> 8) & 0xFF; |
| 1166 | bytes[0] = i & 0xFF; |
| 1167 | } |
| 1168 | else |
| 1169 | { |
| 1170 | bytes[0] = (i >> 24) & 0xFF; |
| 1171 | bytes[1] = (i >> 16) & 0xFF; |
| 1172 | bytes[2] = (i >> 8) & 0xFF; |
| 1173 | bytes[3] = i & 0xFF; |
| 1174 | } |
| 1175 | |
| 1176 | for (int j = 0; j < 4; j++) |
| 1177 | fileData.push_back (bytes[j]); |
| 1178 | } |
| 1179 | |
| 1180 | //============================================================= |
| 1181 | template <class T> |
nothing calls this directly
no outgoing calls
no test coverage detected