| 1213 | //============================================================= |
| 1214 | template <class T> |
| 1215 | AudioFileFormat AudioFile<T>::determineAudioFileFormat (const std::vector<uint8_t>& fileData) |
| 1216 | { |
| 1217 | if (fileData.size() < 4) |
| 1218 | return AudioFileFormat::Error; |
| 1219 | |
| 1220 | std::string header (fileData.begin(), fileData.begin() + 4); |
| 1221 | |
| 1222 | if (header == "RIFF") |
| 1223 | return AudioFileFormat::Wave; |
| 1224 | else if (header == "FORM") |
| 1225 | return AudioFileFormat::Aiff; |
| 1226 | else |
| 1227 | return AudioFileFormat::Error; |
| 1228 | } |
| 1229 | |
| 1230 | //============================================================= |
| 1231 | template <class T> |
nothing calls this directly
no outgoing calls
no test coverage detected