1
0
forked from mirrors/0ad

Remove manual Close method from OggStream

The OggStream interface no longer needs the Close() method.
OpenOggNonstream returns a smart pointer (OggStreamPtr),
so resource cleanup is automatically handled by the destructor.

OggStreamImpl now calls ov_clear in its destructor, making
manual cleanup unnecessary. This commit removes the Close()
method from the interface and its implementation.
This commit is contained in:
trompetin17
2025-06-20 12:31:35 -05:00
parent e03b6ae657
commit e97292430d
3 changed files with 2 additions and 9 deletions
+1 -5
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2025 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -33,10 +33,6 @@ COggData::COggData()
COggData::~COggData()
{
AL_CHECK;
if (ogg)
ogg->Close();
AL_CHECK;
if ( m_BuffersUsed > 0 )
alDeleteBuffers(m_BuffersUsed, &m_Buffer[0]);
+1 -3
View File
@@ -156,11 +156,9 @@ public:
Open();
}
Status Close()
~OggStreamImpl()
{
ov_clear(&m_VorbisFile);
return 0;
}
virtual ALenum Format()
-1
View File
@@ -34,7 +34,6 @@ public:
virtual ALsizei SamplingRate() = 0;
virtual bool atFileEOF() = 0;
virtual Status ResetFile() = 0;
virtual Status Close() = 0;
/**
* @return bytes read (<= size) or a (negative) Status