diff --git a/code/nel/include/nel/sound/audio_decoder.h b/code/nel/include/nel/sound/audio_decoder.h index bded79cfe..3babc1de1 100644 --- a/code/nel/include/nel/sound/audio_decoder.h +++ b/code/nel/include/nel/sound/audio_decoder.h @@ -95,6 +95,9 @@ public: /// Get the total time in seconds. virtual float getLength() = 0; + + /// Set looping + virtual void setLooping(bool loop) = 0; }; /* class IAudioDecoder */ } /* namespace NLSOUND */ diff --git a/code/nel/include/nel/sound/audio_decoder_vorbis.h b/code/nel/include/nel/sound/audio_decoder_vorbis.h index c65c4de82..bd7e45019 100644 --- a/code/nel/include/nel/sound/audio_decoder_vorbis.h +++ b/code/nel/include/nel/sound/audio_decoder_vorbis.h @@ -99,6 +99,9 @@ public: /// Get the total time in seconds. virtual float getLength(); + + /// Set looping + virtual void setLooping(bool loop); }; /* class CAudioDecoderVorbis */ } /* namespace NLSOUND */ diff --git a/code/nel/src/sound/audio_decoder_vorbis.cpp b/code/nel/src/sound/audio_decoder_vorbis.cpp index 1f79b0ddc..c54ce0ade 100644 --- a/code/nel/src/sound/audio_decoder_vorbis.cpp +++ b/code/nel/src/sound/audio_decoder_vorbis.cpp @@ -219,6 +219,11 @@ float CAudioDecoderVorbis::getLength() return (float)ov_time_total(&_OggVorbisFile, -1); } +void CAudioDecoderVorbis::setLooping(bool loop) +{ + _Loop = loop; +} + } /* namespace NLSOUND */ /* end of file */