Recent

Author Topic: uos_AddFromURL do not support wav format?  (Read 366 times)

senglit

  • Jr. Member
  • **
  • Posts: 55
uos_AddFromURL do not support wav format?
« on: April 27, 2020, 11:02:34 am »
Hi,

I want to play a wav file from http server and I thought uos would do the work. But when I start to coding I found that uos_AddFromURL does not support wav format. The comments in uof_flat.pass says:

Code: Pascal  [Select][+][-]
  1. function uos_AddFromURL(PlayerIndex: cint32; URL: PChar; OutputIndex: cint32;
  2.   SampleFormat: cint32 ; FramesCount: cint32; AudioFormat: cint32 ; ICYon : boolean): cint32;
  3. // Add a Input from Audio URL
  4. // URL : URL of audio file
  5. // OutputIndex : OutputIndex of existing Output// -1: all output, -2: no output, other cint32 : existing Output
  6. // SampleFormat : -1 default : Int16 (0: Float32, 1:Int32, 2:Int16)
  7. // FramesCount : default : -1 (4096)
  8. // AudioFormat : default : -1 (mp3) (0: mp3, 1: opus)
  9. // ICYon : ICY data on/off  
  10. // Add a Input from Audio URL
  11. // URL : URL of audio file (like  'http://someserver/somesound.mp3')
  12. // OutputIndex : OutputIndex of existing Output// -1: all output, -2: no output, other cint32 : existing Output
  13. // SampleFormat : -1 default : Int16 (0: Float32, 1:Int32, 2:Int16)
  14. // FramesCount : default : -1 (65536)
  15. // AudioFormat : default : -1 (mp3) (0: mp3, 1: opus)
  16. // example : InputIndex := uos_AddFromURL('http://someserver/somesound.mp3',-1,-1,-1,-1, false);  
  17.  

So, I have to find another way to do it insted of uos?
I use Win10 + Lazarus 2.0.6 + FPC 3.0.4. All 64bit.

Fred vS

  • Hero Member
  • *****
  • Posts: 1760
    • StrumPract is the musicians best friend
Re: uos_AddFromURL do not support wav format?
« Reply #1 on: April 28, 2020, 10:21:50 pm »
Hello.

With uos audio streaming via internet is only possible with mp3 or ogg files.

For more info, please use the uos forum: http://uos.2369694.n4.nabble.com/

Thanks.
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

 

TinyPortal © 2005-2018