Skip to content
Snippets Groups Projects
Commit add03a46 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

read i96 samples from Sebastian

parent f8058864
No related branches found
No related tags found
No related merge requests found
...@@ -349,25 +349,17 @@ void NFileIO::Load_96( FILE *F_in, string flong ) ...@@ -349,25 +349,17 @@ void NFileIO::Load_96( FILE *F_in, string flong )
if( lin.substr(0,3)!=string("dir") ) if( lin.substr(0,3)!=string("dir") )
throw string( "tag 'dir' not found in block 2" ); throw string( "tag 'dir' not found in block 2" );
if( mystd::freadln(F_in, &lin)<=0 || lin.length()<6 || while ( mystd::freadln(F_in, &lin)>0 &&
lin.substr(0,6)!=string("&eob 2") ) !( lin.length()>=6 &&
throw string( "no valid eob 2" ); lin.substr(0,6)==string("&eob 2") ) )
;
if ( mystd::freadln(F_in, &lin)<=0 )
throw string( "missed &eob 3" );
if( mystd::freadln(F_in, &lin)<=0 || lin.length()<9 || if( lin.length()<9 || lin.substr(0,9)!=string("(a24,i16)") )
lin.substr(0,9)!=string("(a24,i16)") )
throw string( "no valid intro to block 3" ); throw string( "no valid intro to block 3" );
if( mystd::freadln(F_in, &lin)<=0 || lin.length()<24 ||
lin.substr(0,3)!=string("?cu") )
throw string( "entry ?cu not found in block 3" );
// if( lin.substr(24,1)!=string("0") )
// throw BadData( "invalid ?cu value" );
// do not check cu=0, because a24 is not respected
if( mystd::freadln(F_in, &lin)<=0 || lin.length()<24 ||
lin.substr(0,6)!=string("@fixed") )
throw string( "entry '@fixed' not found in block 3" );
while ( mystd::freadln(F_in, &lin)>0 && while ( mystd::freadln(F_in, &lin)>0 &&
!( lin.length()>=6 && !( lin.length()>=6 &&
lin.substr(0,6)==string("&eob 3") ) ) lin.substr(0,6)==string("&eob 3") ) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment