Browse Source

update frames count on each write when using libsnd

master
aj_genius 21 years ago
parent
commit
348ba78f89
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      SpiralSound/RiffWav.C

+ 2
- 3
SpiralSound/RiffWav.C View File

@@ -341,6 +341,7 @@ int WavFile::Save(Sample &data)
return 0;
}

m_FileInfo.frames += data.GetLength();
return 1;
#else
if (m_Stream==NULL || data.GetLength()==0)
@@ -387,9 +388,6 @@ int WavFile::Save(short *data, int Bytes)
sf_write_short(m_FileHandle, data, Bytes*m_FileInfo.channels/2);

sf_close(m_FileHandle);
m_FileHandle = NULL;

return 1;
#else
if (m_Stream==NULL || data==NULL)
@@ -438,6 +436,7 @@ int WavFile::Save(float *left, float *right, int Length)
delete[] TempBuf;
}

m_FileInfo.frames += Length;
return 1;
#else
if (m_Stream==NULL || left==NULL || right==NULL)


Loading…
Cancel
Save