CD Streaming, the revenge

Started by hedgehog,

hedgehog

hi,
i've got a problem, i use a CD ripper to read chunks from an audio CD, and play them with a Stream channel. I'm not able to sinchronize the events, so the channel expires after the first bytes are red, there'r a way to tell to BASS to wait for data? that problem is only at the beginning of the rip when the ripping has started there's no problems...

Irrational86

I was trying to do something like this, but with little luck, it played fine and then started giving errors with some CD Drives so i got pissed at it and remove the whole thing...anyways, may i ask which cd ripping library are you using to do this?

hedgehog

i'm using a DLL called CDRip3.dll. I also tried to use a pipe but it was to heavy, to obtain a good result pipe's size must be the same of the audio track (in ordeer of megabytes) all goes average good but i discarded that way, as i said before too heavy for standard PC's....

Irrational86

Ok well, to kind of asnwer your first post in this thread, you have to test and see what is the max amount of data that bass will ask for in a custom channel (an average). After this, you can dynamically calculate the buffer size and then reserve its double or triple (however you want it). After you have enough buffer, first fill it up with data from the CD ripper, then as bass keeps asking for more you keep feeding bass with the buffered data, and filling your buffer with more data from the CD Ripper. Hope this helps...

About the CDRip3.dll, where can i get an SDK for it, a Website, something?

hedgehog

yes,' i've undestood, the theory is right i could use a pipe and a semaphore and all goes well, but with delphi nothing goes well! i don't know why and how, but some problems accours, after a while the program crashes without a reason, i'll try to improve PIPE implementation id you don't have a better suggestion...
'bout cdrip3.dll Alessandro Cappelloza gave it to me with delphi header, if you need you'll find his e-mail on the writewav example of delphi section of bass demos (i can't give you his mail because i've lost it...) or try one of the author of the delphi headers: Silhwan Hyun, hsh@chollian.net
thanx