Using this library, you can quickly write code to create or read simple wav file(*.wav).
This library enables you to read, write or create wav file without confusing binary files! 👌 Even if you are not good at file operations, you can write code intuitively.
Also this can be used for managing RIFF file such as *.wav, *.avi, *.ani. It means that you can use this not only for wav file but for other files.
// #include<tvgw/fileload>
// Allocate memory for result.
auto riff_file = new TVGW_RIFF_File;
// Call tvgw_LoadFile function.
int result = tvgw_LoadFile("somemusic.wav", &riff_file);
if (result == 0)
{
// Load file successfully.
}
// #include<tvgw/filewrite>
// Create format chunk.
auto format_chunk = new TVGW_File_Chunk;
tvgw_ConvertToFormatChunk(&format_chunk, &fmt);
// Create data chunk.
auto music_data_chunk = new TVGW_File_Chunk;
tvgw_ConvertToDataChunk(&music_data_chunk, dataSize, data);
// Create RIFF format data.
auto chunks = new TVGW_File_Chunk[2];
chunks[0] = format_chunk;
chunks[1] = music_data_chunk;
auto filedata = * tvgw_ConvertToWav(2, chunks);
// Call tvgw_WriteFile function
int result = tvgw_WriteFile("somemusic.wav", &filedata);
if (result == 0)
{
// Load file successfully.
}
- Go to Release Page and download the files. (or go to GitHub and download source codes)
- Include the files to your project.
Only this.
We always welcome you to join us.
And, when you want to contribute this, you can do so by doing following action.
- Fork it
- Create your feature branch (git checkout -b feature/my-change)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin feature/my-change)
- Create new Pull Request