mirror of
https://github.com/ScrelliCopter/VGM-Tools
synced 2025-02-21 04:09:25 +11:00
reformat
This commit is contained in:
@@ -31,9 +31,7 @@ void DecodeSample ( std::ifstream& a_file, std::vector<uint8_t>& a_out )
|
||||
uint32_t sampLen = 0;
|
||||
a_file.read((char*)&sampLen, sizeof(uint32_t));
|
||||
if (sampLen < sizeof(uint64_t))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
sampLen -= sizeof(uint64_t);
|
||||
a_out.clear();
|
||||
@@ -57,16 +55,12 @@ void DumpBytes ( std::string a_path, const std::vector<uint8_t>& a_bytes )
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Open file.
|
||||
std::ifstream file(argv[1], std::ios::binary);
|
||||
if (!file.is_open())
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Search for pcm headers.
|
||||
std::vector<uint8_t> smpBytes;
|
||||
@@ -90,8 +84,7 @@ int main ( int argc, char** argv )
|
||||
path << std::hex << "smpa_" << (smpA++) << ".pcm";
|
||||
DumpBytes(path.str(), smpBytes);
|
||||
}
|
||||
else
|
||||
if ( byte == 0x83 )
|
||||
else if (byte == 0x83)
|
||||
{
|
||||
std::cout << "ADPCM-B data found at 0x" << std::hex << file.tellg() << std::endl;
|
||||
DecodeSample(file, smpBytes);
|
||||
|
||||
Reference in New Issue
Block a user