MCPcopy Create free account
hub / github.com/adamstark/AudioFile / writeDataToFile

Method writeDataToFile

AudioFile.h:1133–1145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131//=============================================================
1132template <class T>
1133bool AudioFile<T>::writeDataToFile (const std::vector<uint8_t>& fileData, std::string filePath)
1134{
1135 std::ofstream outputFile (filePath, std::ios::binary);
1136
1137 if (!outputFile.is_open())
1138 {
1139 return false;
1140 }
1141
1142 outputFile.write (reinterpret_cast<const char*> (fileData.data()), fileData.size());
1143 outputFile.close();
1144 return true;
1145}
1146
1147//=============================================================
1148template <class T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected