Author Topic: Simple question  (Read 1251 times)

gigi0ne

  • Posts: 38
Simple question
« on: 5 Dec '11 - 15:22 »
it's possible to load with BASS_LoadSample a song in memory from http or ftp?

Explain... i need of loading in memory a number x of songs without decode (fast download)
and play the memory with bass

it's possible??

thank's

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: Simple question
« Reply #1 on: 5 Dec '11 - 17:25 »
Are you downloading a file to memory, and you want to play it afterwards? If so, yes, you could use BASS_SampleLoad (and BASS_SampleGetChannel) to play it, but it would generally be preferable to use BASS_StreamCreateFile instead. If I have misunderstood what you want to do, please give some more information on that.

gigi0ne

  • Posts: 38
Re: Simple question
« Reply #2 on: 5 Dec '11 - 17:57 »
no, i want download file with  loadsample.. it's possible?

ok for streamcreatefile but i need to download all song more fast it's possible
and if i have understand help file.. streamcreatefile reading file block to block and
decode file..


thank's for the prompt reply
« Last Edit: 5 Dec '11 - 18:08 by gigi0ne »

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: Simple question
« Reply #3 on: 6 Dec '11 - 15:41 »
No, BASS_SampleLoad doesn't support URLs, but you could use BASS_StreamCreateURL instead. If you don't use the BASS_STREAM_BLOCK or BASS_STREAM_RESTRATE flags, the file will be downloaded to memory as quickly as possible.

gigi0ne

  • Posts: 38
Re: Simple question
« Reply #4 on: 14 Dec '11 - 11:31 »
thank's ... another question..

it's possible to save audio file downloaded with ...CreateUlr to use in an other moment?
it's no necessary to save in mp3.. it's only for cache.
thank's

Ian @ un4seen

  • Administrator
  • Posts: 20437
Re: Simple question
« Reply #5 on: 14 Dec '11 - 16:37 »
Yes, you can receive the downloaded data via a DOWNLOADPROC function provided in the BASS_StreamCreateURL call. An example code snippet can be found in the DOWNLOADPROC documentation.