fix sample start thrashing
This commit is contained in:
@@ -141,6 +141,7 @@ public:
|
|||||||
virtual int Seek( int offset );
|
virtual int Seek( int offset );
|
||||||
virtual RageFileObj *Copy( RageFile &p ) const;
|
virtual RageFileObj *Copy( RageFile &p ) const;
|
||||||
virtual CString GetDisplayPath() const { return path; }
|
virtual CString GetDisplayPath() const { return path; }
|
||||||
|
virtual int GetFileSize();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -411,6 +412,15 @@ int RageFileObjDirect::Seek( int offset )
|
|||||||
return lseek( fd, offset, SEEK_SET );
|
return lseek( fd, offset, SEEK_SET );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int RageFileObjDirect::GetFileSize()
|
||||||
|
{
|
||||||
|
const int OldPos = lseek( fd, 0, SEEK_CUR );
|
||||||
|
const int ret = lseek( fd, 0, SEEK_END );
|
||||||
|
lseek( fd, OldPos, SEEK_SET );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
* Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
||||||
* Glenn Maynard
|
* Glenn Maynard
|
||||||
|
|||||||
Reference in New Issue
Block a user