Explorar o código

update AlRenderer

mikymod %!s(int64=12) %!d(string=hai) anos
pai
achega
6412948e73
Modificáronse 2 ficheiros con 18 adicións e 1 borrados
  1. 16 0
      engine/audio/al/ALRenderer.cpp
  2. 2 1
      engine/audio/al/ALRenderer.h

+ 16 - 0
engine/audio/al/ALRenderer.cpp

@@ -360,6 +360,22 @@ float SoundRenderer::sound_rolloff(SoundSourceId id) const
 	return m_impl->m_sources[id.index].rolloff();
 }
 
+//-----------------------------------------------------------------------------
+int32_t SoundRenderer::sound_queued_buffers(SoundSourceId id) const
+{
+	CE_ASSERT(m_sources_id_table.has(id), "SoundSource does not exists");
+
+	return m_impl->m_sources[id.index].queued_buffers();
+}
+
+//-----------------------------------------------------------------------------
+int32_t SoundRenderer::sound_processed_buffers(SoundSourceId id) const
+{
+	CE_ASSERT(m_sources_id_table.has(id), "SoundSource does not exists");
+
+	return m_impl->m_sources[id.index].processed_buffers();
+}
+
 //-----------------------------------------------------------------------------
 bool SoundRenderer::sound_playing(SoundSourceId id)
 {

+ 2 - 1
engine/audio/al/ALRenderer.h

@@ -117,10 +117,11 @@ struct SoundSource
 	void create()
 	{
 		AL_CHECK(alGenSources(1, &m_id));
-
+/*
 		AL_CHECK(alSourcef(m_id, AL_PITCH, 1.0f));
 		AL_CHECK(alSourcef(m_id, AL_REFERENCE_DISTANCE, 0.1f));
 		AL_CHECK(alSourcef(m_id, AL_MAX_DISTANCE, 1000.0f));
+*/
 	}
 
 	//-----------------------------------------------------------------------------