Ders Sahibi


BARİSERDOGAN

Oluşturma Tarihi: 22.09.2019

Bu ders size yardımcı oldumu?

Evet (0) (0) Hayır

getSoundWaveData

  • Söz Dizimi
table getSoundWaveData ( element sound, int iSamples )

 

  • Client Kod
soundHandler = playSound ( "ses.mp3" )

function onSoundPlayRender ( )
    if ( soundHandler ) then
        local waveData = getSoundWaveData ( soundHandler, 256 )
	if ( waveData ) then
            for i=0,255 do
                dxDrawRectangle ( i, 128, 1, waveData[i] * 128)
            end
        end
    end
end
addEventHandler ( "onClientRender", getRootElement(), onSoundPlayRender )

 

  • Meta XML
<meta>
  <info author="BarisErdogan" type="script" version="1.0.0" />
  
  <script src="client.lua" type="client" />
  
  <file src="ses.mp3" />
  
</meta>