Improve audio and midi support.
This commit is contained in:
parent
9bcc0ae88e
commit
8b5f485d1e
47 changed files with 1446 additions and 634 deletions
|
@ -31,17 +31,27 @@ std::ofstream* File::GetOutHandle() const
|
|||
return mOutHandle.get();
|
||||
}
|
||||
|
||||
void File::Open()
|
||||
void File::Open(bool asBinary)
|
||||
{
|
||||
if(mAccessMode == AccessMode::Read)
|
||||
{
|
||||
auto flags = std::ifstream::in;
|
||||
if (asBinary)
|
||||
{
|
||||
flags |= std::ifstream::binary;
|
||||
}
|
||||
mInHandle = std::make_unique<std::ifstream>();
|
||||
mInHandle->open(mFullPath, std::ifstream::in);
|
||||
mInHandle->open(mFullPath, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto flags = std::ofstream::out;
|
||||
if (asBinary)
|
||||
{
|
||||
flags |= std::ofstream::binary;
|
||||
}
|
||||
mOutHandle = std::make_unique<std::ofstream>();
|
||||
mOutHandle->open(mFullPath, std::ofstream::out);
|
||||
mOutHandle->open(mFullPath, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue