mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-11 17:59:02 +00:00
Changed: Allow changing looping parameter of audio decoder after init
This commit is contained in:
parent
ce06393464
commit
61de082fc8
3 changed files with 11 additions and 0 deletions
|
@ -95,6 +95,9 @@ public:
|
||||||
|
|
||||||
/// Get the total time in seconds.
|
/// Get the total time in seconds.
|
||||||
virtual float getLength() = 0;
|
virtual float getLength() = 0;
|
||||||
|
|
||||||
|
/// Set looping
|
||||||
|
virtual void setLooping(bool loop) = 0;
|
||||||
}; /* class IAudioDecoder */
|
}; /* class IAudioDecoder */
|
||||||
|
|
||||||
} /* namespace NLSOUND */
|
} /* namespace NLSOUND */
|
||||||
|
|
|
@ -99,6 +99,9 @@ public:
|
||||||
|
|
||||||
/// Get the total time in seconds.
|
/// Get the total time in seconds.
|
||||||
virtual float getLength();
|
virtual float getLength();
|
||||||
|
|
||||||
|
/// Set looping
|
||||||
|
virtual void setLooping(bool loop);
|
||||||
}; /* class CAudioDecoderVorbis */
|
}; /* class CAudioDecoderVorbis */
|
||||||
|
|
||||||
} /* namespace NLSOUND */
|
} /* namespace NLSOUND */
|
||||||
|
|
|
@ -219,6 +219,11 @@ float CAudioDecoderVorbis::getLength()
|
||||||
return (float)ov_time_total(&_OggVorbisFile, -1);
|
return (float)ov_time_total(&_OggVorbisFile, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAudioDecoderVorbis::setLooping(bool loop)
|
||||||
|
{
|
||||||
|
_Loop = loop;
|
||||||
|
}
|
||||||
|
|
||||||
} /* namespace NLSOUND */
|
} /* namespace NLSOUND */
|
||||||
|
|
||||||
/* end of file */
|
/* end of file */
|
||||||
|
|
Loading…
Reference in a new issue