Posted: Sun Jul 02, 2006 6:55 pm
Speex is better and coded for this taskInf0Byt3 wrote:Veeery very nice lib. And extremely usefull. Could this be used for VOIP apps ?

http://www.purebasic.com
https://www.purebasic.fr/english/
Speex is better and coded for this taskInf0Byt3 wrote:Veeery very nice lib. And extremely usefull. Could this be used for VOIP apps ?
Code: Select all
;
; ov:Lib v0.27 - FFT Example
;
; (c) :traumatic! 2004/2005/2006
;
;
OpenWindow(0, 0, 0, 256, 200, "[ov:Lib] - FFT Example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CreateImage(0, 256, 100)
CreateImage(1, 256, 100)
Dim fftData.f(2047) ; array to hold fft data
Dim pcmData.b(2047) ; array to hold pcm data
ovInitFFT()
If ovOpen("PurePower.ogg")
ovPlay()
Repeat
fftData() = ovGetSpectrumData()
pcmData() = ovGetBufferData()
; draw raw pcm data
StartDrawing(ImageOutput(0))
Box(0, 0, 256, 100)
x=0
For i=1 To 2047 Step 4
Plot(x, 50+pcmData(i), $FF00)
x+1
Next
LineXY(0, 99, 256, 99, $A0A0A0)
StopDrawing()
; draw fft data
StartDrawing(ImageOutput(1))
Box(0, 0, 256, 100,$40)
For i=1 To 256
fft.f = fftData(i)*0.0001
Box(i, 100, 1, -1+fft, $FF00)
Next
StopDrawing()
StartDrawing(WindowOutput(0))
DrawImage(ImageID(0), 0, 0)
DrawImage(ImageID(1), 0, 100)
StopDrawing()
Delay(10)
Until WindowEvent()=#PB_Event_CloseWindow Or GetAsyncKeyState_(#VK_ESCAPE)
Else
MessageRequester("ov:Lib", "Couldn't open PurePower.ogg")
EndIf
ovClose()
End
That's true, streaming multiple files is not supported. Sorry.Motu wrote:What shall I do if I want to play multiple files at the same time? The open/play function do not recive pointer or playback numbers - so it seems I only can play one file at a time...