he virtual file is not a general concept
Quotehe virtual file is not a general conceptAnd it is also a concept that I will not use.It seems to me something for hackers (you know those people who prefer to use their brain to steal vs to create).uos_AddFromMemory(...) uses a array of float as memory stream.Up to the user to create that input from what he want.Fre;D
uos_AddFromMemory(...) uses a array of float as memory stream.
This is my implementation:
Now create thisfunction Tuos_Player.AddFromMStream(ms: TMemoryStream; OutputIndex: cint32; SampleFormat: cint32 ; FramesCount: cint32 ): cint32; Replace the code that uses sf_open with sf_open_virtualCode: Pascal [Select]Streamin [x] .Data.HandleSt: = sf_open (FileName, SFM_READ, sfinfo); Streamin [x] .Data.HandleSt: = sf_open_virtual(@sfVirtual, SFM_READ, @sfInfo, @ms); is it solve for libsndfile, you only have to test all
function uos_AddFromMemory (PlayerIndex: cint32; MemoryBuffer: PDArFloat; OutputIndex: cint32; SampleFormat: cint32; SampleRate: cint32; Channels: cint32; FramesCount: cint32): cint32;It did not accept as a parameter an TMemoryStream but will be useful.
If you want to use a memorystream, it is up to you.
Quote from: Fred vS on March 02, 2017, 07:06:10 pmIf you want to use a memorystream, it is up to you.Meaning that you won't consider adding support for streams ?
OK, I will add a demo in uos to show how to do