mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 03:55:11 +00:00
fix segfaults in libaudiofile.cpp
casted the wrong thing?
This commit is contained in:
parent
29e915e4df
commit
94db04aaf0
2 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ libaudiofile.a: audiofile.o
|
||||||
ar rcs libaudiofile.a audiofile.o
|
ar rcs libaudiofile.a audiofile.o
|
||||||
|
|
||||||
audiofile.o: audiofile.cpp audiofile.h aupvlist.h
|
audiofile.o: audiofile.cpp audiofile.h aupvlist.h
|
||||||
$(CXX) -std=c++11 -O2 -I. -c audiofile.cpp
|
$(CXX) -std=c++11 -DNDEBUG -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -O2 -I. -c audiofile.cpp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f audiofile.o libaudiofile.a
|
rm -f audiofile.o libaudiofile.a
|
||||||
|
|
|
@ -5075,7 +5075,7 @@ bool ModuleState::fileModuleHandlesSeeking() const
|
||||||
|
|
||||||
status ModuleState::setup(AFfilehandle file, Track *track)
|
status ModuleState::setup(AFfilehandle file, Track *track)
|
||||||
{
|
{
|
||||||
AFframecount fframepos = std::llrint((long double)track->nextvframe * track->f.sampleRate / track->v.sampleRate);
|
AFframecount fframepos = std::llrint(track->nextvframe * track->f.sampleRate / track->v.sampleRate);
|
||||||
bool isReading = file->m_access == _AF_READ_ACCESS;
|
bool isReading = file->m_access == _AF_READ_ACCESS;
|
||||||
|
|
||||||
if (!track->v.isUncompressed())
|
if (!track->v.isUncompressed())
|
||||||
|
@ -5146,11 +5146,11 @@ status ModuleState::setup(AFfilehandle file, Track *track)
|
||||||
if (track->totalfframes == -1)
|
if (track->totalfframes == -1)
|
||||||
track->totalvframes = -1;
|
track->totalvframes = -1;
|
||||||
else
|
else
|
||||||
track->totalvframes = std::llrint((long double)track->totalfframes *
|
track->totalvframes = std::llrint(track->totalfframes *
|
||||||
(track->v.sampleRate / track->f.sampleRate));
|
(track->v.sampleRate / track->f.sampleRate));
|
||||||
|
|
||||||
track->nextfframe = fframepos;
|
track->nextfframe = fframepos;
|
||||||
track->nextvframe = std::llrint((long double)fframepos * track->v.sampleRate / track->f.sampleRate);
|
track->nextvframe = std::llrint(fframepos * track->v.sampleRate / track->f.sampleRate);
|
||||||
|
|
||||||
m_isDirty = false;
|
m_isDirty = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue