24 May '13 - 19:37 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  Developments / BASS / Re: Voice Chat on: 25 Mar '05 - 08:02
Yes, you can. I purchased a component for Delphi (I assume a similar one exists for VB) that interfaces to the Microsoft ACM (Audio Compression Manager). I recorded input from the mic, and then ran the input through the ACM to compress it to a GSM 6.1 wave sample (a codec all Windows PC's have already), and resulted in quite good audio quality at about 1.6kb/sec bandwidth requirement one-way. I send the audio in 1 second packets, and on the receiving end I buffer them myself in case their rate of arrival is not consistant. After a couple seconds of audio buffered I start playback through a user-created custom sample stream. BASS simply asks me through a callback function for more audio, I then feed it already uncompressed wave audio (again using the ACM to convert from GSM 6.1 > standard PCM wave) and it plays perfectly.

I wrote all of this in Delphi of course, but that exact same thing could be done in VB.
ReplyReply Reply with quoteQuote
2  Developments / BASS / Too many Beat Per Minute (BPM) results = 0 on: 25 Mar '05 - 07:52
I have tried using the BPM functions in BASS_FX 2.1 on a sampling of 1,000 or so of my mp3s (all musical songs). Roughly 20% of them result in a BPM of 0 (completely useless result obviously), while 4% return -1.

I also came across and older bpmf.dll Delphi lib that uses BASS but does it's own BPM. I am almost guessing that it was the basis for the one in BASS_FX now. It resulted in less 0 results, but the BPM's it returned were often poor numbers or it even had crashing of invalid floating point operations.

Am I doing something wrong or is this the best results I can get with BPM? I am trying to find a reliable way to calculate consistant BPM numbers of any mp3 (so ran multiple times on the same file will result in the exact same BPM result). I can't have a nearly 25% failure rate - so can anyone offer some help please?

BTW, I am simply using the default min / max BPM's of 45 / 230 or whatever the BASS help file says.

Thanks!
ReplyReply Reply with quoteQuote
3  Developments / BASS / Re:BASS_ChannelSetSync with Samples? on: 6 Jan '05 - 20:05
If you need to set syncs on samples, you'll have to stream them instead (BASS_StreamCreateFile). Also, if you only need to know when it has ended so that you can free it, you could use the BASS_STREAM_AUTOFREE flag instead.

Ian, in other words the only way to know when a sample is done playing is to constantly use BASS_ChannelIsActive in a loop. I still don't quite understand the difference between a sample and a stream (other than it seems when you load a sample the entire thing is loaded into memory at that time). Is there any performance reasons that I shouldn't just play everything as streams then instead (so I can know when ANY sound is done playing), or are samples more efficient?

Thanks, Dann
ReplyReply Reply with quoteQuote
4  Developments / BASS / FFT Spectrum values for entire file on: 21 Oct '03 - 17:43
I would like to analyze an entire file and save the FFT values for the whole song to another file. In other words, I want to pre-process an mp3 for instance (as quickly as possible of course too, hopefully BASS can give me this info much faster than real-time?), so that I could playback a visual spectrum analysis (like all the demos showing the bars going up / down), without having the original mp3 file itself. Can anyone point me in the right direction to get started? I am pretty familiar with BASS, just not this side of it.

Thanks!
ReplyReply Reply with quoteQuote
5  Developments / BASS / Re:VB6- ChannelGetData on: 21 Oct '03 - 15:48
I am also getting this same error, at the end of my program after the user clicks the X to close the app (it never occurs more than once, and the program does not crash with this error, it is completely whenever the user closes the program).

In Delphi, it occurs after my OnClose, OnDestroy events of the main form, and even after my entire .dpr file has been executed. I assumed it was related to something else, but this post leads me to believe it is BASS related - most likely by me not freeing something properly (I am using custom streams?). Or it could be related to the BassFree call.

Any thoughts on what might be causing this Ian?
ReplyReply Reply with quoteQuote
6  Developments / BASS / Re: BASS sets system wave volume on load on: 25 May '01 - 18:21
Ian,

Well you're right, it does work. Turns out all it was I started BASS, say wave volume at 25%. Then started winamp, turned the volume up in it to say 75%, then closed BASS, which dropped the volume back to 25% (what it was when it started). So BASS is doing it correctly, it just threw me off because all of the sudden my mp3 music volume went down in winamp Smiley.

Thanks, Dann
ReplyReply Reply with quoteQuote
7  Developments / BASS / Re: BASS sets system wave volume on load on: 24 May '01 - 21:27
Well, thanks, fixed half of the problem. It doesn't reset the wave volume on load, but when I close down BASS it sets the wave volume to 100% instead of leaving it at 25% or whatever it was. How do I fix that?
ReplyReply Reply with quoteQuote
8  Developments / BASS / BASS sets system wave volume on load on: 24 May '01 - 20:04
I noticed that when BASS starts it sets the system wave volume to 100%. It leaves the Master volume of your windows sound the same. For instance I was in winamp and the volume of the wave was at about 25%, then BASS started and immediately caused winamp to jump to 100% playback volume. Is there anyway to avoid this?

Dann
ReplyReply Reply with quoteQuote
9  Developments / BASS / Re: Saving streamed mp3s to disk as they play on: 11 Jun '01 - 20:31
Ian,

Great, would love to see that feature very soon!

Thanks!
ReplyReply Reply with quoteQuote
10  Developments / BASS / Saving streamed mp3s to disk as they play on: 8 Jun '01 - 19:31
I love the ability for BASS to stream an mp3 down and play it just by giving it a URL to any mp3 file. However, is there a way to have BASS also save that mp3 to disk (possibly as its low-grade quality and actual high-quality versions) as it downloads it, so the next time my program wants to stream that same mp3, it can play it from disk if it already has it?
ReplyReply Reply with quoteQuote
11  Developments / BASS / Re: Illegal param error on BASS_SampleLoad in ver on: 11 Jun '03 - 18:44
Thanks Ian! Much appreciated ...

Should I be passing in the exact length of only the data portion of the wave (1625 bytes), or should I pass in the total length of the entire wave data in memory including the wave header (i.e. 1665 bytes) as the length parameter?
ReplyReply Reply with quoteQuote
12  Developments / BASS / Illegal param error on BASS_SampleLoad in ver 1.8 on: 11 Jun '03 - 01:55
I havn't updated my BASS sound library since BASS 0.9, and I have code that used to work in the old version that doesn't work in 1.8.

Basically I am getting in 1625 bytes of compressed WAV data (GSM 6.1 8khz) from my TCP/IP control, which contains no wave header, just the raw compressed wave data. I have a buffer in memory with a pre-made wave header filled in with the codec definition to tell BASS it's GSM, the size, etc.

It plays perfectly fine in BASS 0.9. But if I try it in BASS 1.6 or 1.8, in the code below when I call BASS_SampleLoad, I get an error code 20 (BASS_ERROR_ILLPARAM - an illegal parameter was specified).

What am I passing in wrong, that would have worked in 0.9 but not in the newer versions of BASS?

The code looks like this:

var
     Buffer: array[0..2000] of char;


procedure TForm1.CreateWaveHeader;
var
     s: array[0..7] of char;
begin
     s := 'RIFF'; move(s, Buffer[0], 4);
     Buffer[4] := #68; Buffer[5] := #9;      // 44 09
     Buffer[6] := #0; Buffer[7] := #0;      // 00 00
     s := 'WAVEfmt '; move(s, Buffer[8], 8);
     Buffer[16] := #20; Buffer[17] := #0;      // 14 00
     Buffer[18] := #0; Buffer[19] := #0;      // 00 00
     Buffer[20] := #49; Buffer[21] := #0;      // 31 00
     Buffer[22] := #1; Buffer[23] := #0;      // 01 00
     Buffer[24] := #64; Buffer[25] := #31;      // 40 1F
     Buffer[26] := #0; Buffer[27] := #0;      // 00 00
     Buffer[28] := #89; Buffer[29] := #6;      // 59 06
     Buffer[30] := #0; Buffer[31] := #0;      // 00 00
     Buffer[32] := #65; Buffer[33] := #0;      // 41 00
     Buffer[34] := #0; Buffer[35] := #0;      // 00 00
     Buffer[36] := #2; Buffer[37] := #0;      // 02 00
     Buffer[38] := #64; Buffer[39] := #1;      // 40 01
     s := 'data'; move(s, Buffer[40], 4);
end;

procedure TForm1.PlayVoiceData(data: pointer; size: integer);
var
     mysamp: HSAMPLE;
begin
     if size <= 0 then exit;

     move(data^, Buffer[48], size);
     move(size, Buffer[44], 4);
     size := size + 40;
     move(size, Buffer[4], 4);

     mysamp := BASS_SampleLoad(TRUE, @Buffer, 0, 0, 1, BASS_SAMPLE_OVER_POS);

     if mysamp = 0 then showmessage('can''t load sample' + #13#10 + '(error code: ' + IntToStr(BASS_ErrorGetCode) + ')');

     BASS_SamplePlayEx(mysamp, 0, -1, 100, 0, FALSE);
end;
ReplyReply Reply with quoteQuote
13  Developments / BASS / Re: How to play packets of audio seamlessly? on: 13 Jun '03 - 01:29
I figured that was the best solution. It took a while but I was able to get it to work - and it work's great! Thanks again Ian! Grin
ReplyReply Reply with quoteQuote
14  Developments / BASS / How to play packets of audio seamlessly? on: 12 Jun '03 - 01:26
Related to my post about the BASS_SampleLoad illegal parameter problem, I am trying to playback 1625 bytes of GSM compressed audio that I am receiving about once a second via my TCP/IP control. Because sometimes the packets come in spaced a part, or at a much higher rate than 1 a second, I have to buffer the audio data - rather than sending the 1 second sample straight to BASS.

I have tried creating a single stream with a sync callback on it to know that the previous 1 second clip is done playing, and to go ahead and start playing the next one in the buffer. This however resulted in a very slight but quite noticeable delay between each second of audio.

So then I tried to create two different streams in BASS, alternating which stream I was playing, and in the background using the BASS_StreamPreBuf call to buffer it first to try and elminate the delay. This kind of worked but there seems like a lot of overhead in creating and destroying streams every second.

I then tried to create my own custom stream, and in the callback I gave BASS the PCM data, which I had previously converted from GSM (with a different component). I kept getting access violations because of my own flawed logic I believe of trying to write data to the wrong parts in memory.

Anyways, I'm quite frustrated and I don't know what the best method of achieving this is. I just want it to play seamlessly 1 second chunks of audio data, one after another.

Can someone please offer some insight?

Thanks.
ReplyReply Reply with quoteQuote
Pages: [1]
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines