Saving to a file

Started by Thomas,

Thomas

Hi there! First of all...BASS rocks!  ;D
Now to my question: Im trying to write a progg that saves the stream WHILE listening to it. I'm using a timer every 100ms to get the data with BASS_ChannelGetData retrieving the data with a byte array at the size of 2000. When listening to the file I can hear clicks quite often...seems like the same interval as the timer. Another thing I noticed was that the volume wasn't changed despite that I changed it in real time while playing.

I tried to change the size...I tried to change the interval of the timer, and those 2 in different conjunctions to without success.

Any ideas how I can fix this?  :-/

Thomas

Oh I forgott...I'm using VB hehe  ;)

/Thomas

Azoth

Thomas,
An easier way would be to use the built in save feature of the BASS_StreamCreateURL() function. If you pass a file name as the "save" parameter it will save the data to the harddrive as it's being downloaded. If you need something more elaborate, then maybe setup a decoding stream, or a custom DSP? Both of these options will give you better results than using the BASS_ChannelGetData() function which is really only useful for visualization and such.

In VB;
STRM = BASS_StreamCreateURL(strURL, 0&, 0&, strLocalfilename)

HIH.
.Azoth.


Thomas

Tnx Azoth.  :)

I really should have explained my original plans hehe. I want to make a radioprogram where you have several decks that play music/jingles and I also want to use the microphone/line input where I talk between the songs. All that I want to save in one file as it sounds in real time. So I also need a saving mechanism for the mic too. So i can't use the streamurl for that right? Or can I?

The reason for the file I want to save is just to decode it back to mp3 so I can stream that to a shoutcast server or similar like that.

Anyone have any ideas? Ian?  ;)

P.s. I just love smileys  ;D