Show Posts
|
|
Pages: [1] 2
|
|
1
|
Developments / BASS / Debugging symbols
|
on: 22 Mar '13 - 09:52
|
Hi, I have been using for quite a while bass and there were many occasions when debugging symbols were needed. I primary use Visual Studio 2010 in which makes very easy to get debuging symbols for Microsoft dll files. My biggest annoyance from time to time I will get a crash stack looking like this: bassasio.dll!00dd1f0e() [Frames below may be incorrect and/or missing, no symbols loaded for bassasio.dll] MYAPP.exe!_unlock(int locknum=4) Line 375 C > MYAPP.exe!_free_dbg(void * pUserData=0x147fa2c8, int nBlockUse=1) Line 1270 + 0x7 bytes C++ bassasio.dll!00dd1210() bassasio.dll!00dd1210() bassasio.dll!00dd1e07() MYAPP.exe!_unlock(int locknum=-842150451) Line 375 C cdcdcdcd()
Note there is a complain from the debugger about the missing symbols and it warns you that the call stack may not be valid following that line. The above example is about bassasio but I got at one time or another similar issues with the other BASS libs. My question is: Why are the symbols not delivered with bass libraries, is there a particular reason? Thank you, Cristian
|
Reply
Quote
|
|
|
3
|
Developments / BASS / Retrieve supported sample rates for a ASIO device
|
on: 17 Jul '12 - 14:06
|
|
Hello,
I see that ASIO SDK has a function to query the driver if a sample rate is supported by the driver: ASIOCanSampleRate .
I can't find this functionality in BASS ASIO the only close one I found is BASS_ASIO_SetRate but that function will also changes the rate which is not something I want on a live stream. Is there any other way to get which rates are supported?
Regards, Cristian
|
Reply
Quote
|
|
|
4
|
Developments / BASS / Re: BASS_GetDeviceInfo driver path on XP 64
|
on: 16 Jul '12 - 16:41
|
Hi, I forgot to mention I was using the 32 bit version of BASS 2.4.9.0 on windows XP x64. The result of the code you provided is: 1: [DJ Control Air] [usbaudio.sys] [] 2: [Realtek AC97 Audio] [RTKVAC64.SYS] []
I am using the same binaries on all systems. Thank you, Cristian
|
Reply
Quote
|
|
|
5
|
Developments / BASS / BASS_GetDeviceInfo driver path on XP 64
|
on: 16 Jul '12 - 13:05
|
Hello, Hi, I am using the driver path information in order to extract VID an PID from it. BASS_GetDeviceInfo(a, &info)
char *driver_path =info.driver + strlen(info.driver)+1;
This works well on XP 32, Vista 32/64 and Win7 32/64 but returns nothing on XP 64, can this be fixed please? Regards, Cristian
|
Reply
Quote
|
|
|
8
|
Developments / BASS / Re: BASS_Record... multiple inputs on one device
|
on: 9 May '12 - 18:30
|
Thank you for the dll, I tried it and it returns 4 on XP and 2 in Windows 7 with the same device even if in Windows control panel it displays 4(see screenshot above). What function are you using to query the number of channels maybe I can try a few things starting from that and get back to you. Another thing I done, on the 4 channel input device, and I can confirm it's working (on Windows 7) is that I modified the rectest bass sample and started to record in 4 channel mode: ... wf->nChannels=4; ... BASS_RecordStart(44100, 4,0,&RecordingCallback,0)) ....
Then I added sound turn by turn to each of the inputs, the saved wav file had 4 channels and each channel had different sound. So this it's working correctly in windows 7. Other things that I should mention about channel count: 1/ will this also work on Mac? 2/ can this be done with MP3 free version of BASS? Regards, Cristian
|
Reply
Quote
|
|
|
10
|
Developments / BASS / Re: BASS_Record... multiple inputs on one device
|
on: 8 May '12 - 15:50
|
|
Hi,
In Windows 7 the device is seen as a single Line in device with 4 channels see attached screenshot.
About ASIO, yes it seem to be working OK, but then again I have to also do this without ASIO because I want it to work on Mac and WDM only sound cards.
Regards, Constantin Cristian
|
Reply
Quote
|
|
|
11
|
Developments / BASS / BASS_Record... multiple inputs on one device
|
on: 8 May '12 - 14:20
|
Hello, I have a 4 channel input sound card and I am trying to capture the input from channels 3 and 4. I wrote the following code to enumerate the number of outputs: void main(int argc, char **argv) { int idx = 0; const char *i; int c; while(BASS_RecordInit(idx)) { BASS_RECORDINFO info; BASS_DEVICEINFO info2; BASS_RecordGetDeviceInfo(idx, &info2);
BASS_RecordGetInfo( &info); idx++; printf("%s intputs=%d singlein=%d\n",info2.name,info.inputs, info.singlein); for (c=0;i=BASS_RecordGetInputName(c);c++) { printf("\t %s \n",i); } } getch(); }
It seems the number of inputs (info.inputs) is always 1 no matter how many inputs the sound card has. I happens on windows XP and Windows 7(did not try it on Vista). If I try BASS_RecordSetInput(1, BASS_INPUT_ON, 0.5) with one instead of 0 it returns FALSE. What am I doing wrong?  PS: I am using BASS 2.4.9 Regards, Cristian
|
Reply
Quote
|
|
|
12
|
Developments / BASS / Re: Spliter lag
|
on: 11 Nov '11 - 10:43
|
Hello, Thank you for the reply. My biggest problem is not that the streams don not start exactly at the same moment. My problem is that they seem to drift apart while they are playing and the drift becomes so big that is noticeable. I implemented your changes and the 2 splitters seem to drift appart more slowly but they still do(I attached the modified code). As you can see from the log file attached the seem to drift by ~11111 bytes each time(as reported by BASS_Split_StreamGetAvailable). My buffer is 5 + 38 + 20 milliseconds which equals 22226.4 bytes (0.063*44100(sample per second) * 8(float stereo for output)). So I modified the line: chan=BASS_StreamCreateFile(FALSE,file,0,0,BASS_STREAM_DECODE|BASS_SAMPLE_LOOP)
and added BASS_SAMPLE_FLOAT. The effect was it started to drift apart by ~22226.4 . The drift seems to favor the second splitter(I would say always with the latest changes). I am not doing anything to the test app I just let it play. However I started some CPU intensive tasks. About BASS_CONFIG_SPLIT_BUFFER if I see that I can set it to 100 ms instead of 2000. In this sentence from bass mix documentation: determines how far splitter streams can drift apart before there are buffer overflow issues for those left behind. What do you mean by buffer overflow issues , what are those issues? PS: I am using windows 7 64bit(the test app is 32 bit) for my tests and I was able to reproduce this on 2 sound cards from different vendors. Best regards, Cristian
|
Reply
Quote
|
|
|
13
|
Developments / BASS / Re: Spliter lag
|
on: 10 Nov '11 - 10:39
|
Hello, I was finally able to reproduce this issue in "BASSmix multiple output example" delivered with bassmix. However I did some changes to it(see attached file), basically I only use one sound card output and I connect 2 mixers to the same sound card. This way you can clearly hear the echo even if the delay is not very big, however I also have very big delays(BASS_Split_StreamGetAvailable returns 81120 as you can see from the log file). The flag BASS_MIXER_NONSTOP does not influence this issue however in the BASS_CONFIG_BUFFER seems to be a factor, in the code bellow if I replace the 20 with 80 the issue still occurs however once the file is loaded I get a delay(BASS_Split_StreamGetAvailable ) between 3000 and 10000 and that delay remains constant while the song is playing and does not vary until another song is loaded. BASS_SetConfig(BASS_CONFIG_UPDATEPERIOD, 5); int config_buf = 500; BASS_INFO info; if ( BASS_GetInfo(&info) ) config_buf = info.minbuf; // get update period DWORD len = BASS_GetConfig(BASS_CONFIG_UPDATEPERIOD); // default buffer size = update period + 'minbuf' + 1ms extra margin (20ms to be safe...) config_buf = len + config_buf + 20; // set the buffer length BASS_SetConfig(BASS_CONFIG_BUFFER, config_buf);
The issue as I said is easier to reproduce while there is high CPU usage but also happens when it's not(there are probably some CPU usage spikes produced by other apps). You don't have to do anything like seeking in the attached app it just happens. Also when closing the demo app I noticed that a lot of threads are exiting is this normal? Can you please tell me what am I doing wrong it is essential for me to have BASS_CONFIG_BUFFER as small as possible. PS: I also attached a log file "log_normal_cpu_usage.txt" you can see that everything goes OK for a while just ~3000 delay and at some point it just jumps to 127608 Best regards, Cristian
|
Reply
Quote
|
|
|
14
|
Developments / BASS / Re: Equalizer artifacts
|
on: 1 Nov '11 - 16:25
|
|
Sorry for the delay in my answer I was diverted to other tasks. Yes that is the actual waveform as recorded by Bass wav encoder and loaded and displayed in audacity.
It is very hard for me to hear the issue in normal playback(no test files) but it is quite audible on the test file.
I also attached 2 more pictures depicting the issue a have bass frequency setting bound to a slider with 4096 steps(0-4096) and I am moving the slider up and down fast but not very fast. I am using a 500 Hz wave form which does not exactly contain any bass frequencies. On bass frequency I have a band on fCenter=30 and fBandwidth= 2.0 and another fCenter=100 and fBandwidth= 1.0.
In the zoom in picture you can see the form of the wave note that the wave amplitude is quite low so you can better see the issue(amplitude under +/-0.05).
If the amplitude is bigger(under +/- 0.5 the max is +/- 1.) the wave may not be above the center but the issues are still present as seen in the zoom out picture since the valley and peaks are not equally distanced from the center.
I can provide the 2 wav files for the pictures bellow if the can help you they are under 4 megabytes in size.
Can you please tell me if anything can be done to fix this issue?
Thank you, Constantin Cristian
|
Reply
Quote
|
|
|
15
|
Developments / BASS / Re: Spliter lag
|
on: 19 Oct '11 - 18:20
|
You are right, it seems it was BASS_ChannelSetDSP() with priority -1000 on the first mixer, removed it and now it is a lot better. It seems to be ok if I have the mixer on the same sound card but there is still a small delay if there are different sound cards. BASS_Split_StreamGetAvailable reports 45680 bytes for 32 bit stereo stream that means around 129ms. My BASS_CONFIG_BUFFER buffer is 96ms. I will come back with more details if I can't figure it out. I am not resetting them with BASS_Split_StreamReset because I fear for sound artifacts. mixer1 and mixer2 are sound card mixers created like this: BASS_SetDevice(id1); BASS_SetConfig(BASS_CONFIG_UPDATEPERIOD, 5); bStatus = BASS_SetConfig(BASS_CONFIG_BUFFER, 96*4); // set the buffer length mixer1 = BASS_Mixer_StreamCreate(44100, 2, BASS_MIXER_NONSTOP | BASS_SAMPLE_FLOAT | BASS_SAMPLE_SOFTWARE ); s = BASS_ChannelSetSync(mixer1, BASS_SYNC_STALL, 0, StallSyncProc,&_element); BASS_ChannelPlay(mixer1,FALSE);
BASS_SetDevice(id2); BASS_SetConfig(BASS_CONFIG_UPDATEPERIOD, 5); bStatus = BASS_SetConfig(BASS_CONFIG_BUFFER, 96*4); // set the buffer length mixer2 = BASS_Mixer_StreamCreate(44100, 2, BASS_MIXER_NONSTOP | BASS_SAMPLE_FLOAT | BASS_SAMPLE_SOFTWARE ); s = BASS_ChannelSetSync(mixer2, BASS_SYNC_STALL, 0, StallSyncProc,&_element); BASS_ChannelPlay(mixer2,FALSE);
BASS_SetDevice(0); //create spliter HSTREAM splitter1 = BASS_Split_StreamCreate(mixer, BASS_STREAM_DECODE, NULL); //connect spliter BASS_Mixer_StreamAddChannel(mixer1 , splitter1 , BASS_MIXER_BUFFER|BASS_MIXER_PAUSE|BASS_MIXER_MATRIX|BASS_SAMPLE_SOFTWARE);
//create spliter HSTREAM splitter2 = BASS_Split_StreamCreate(mixer, BASS_STREAM_DECODE, NULL); //connect spliter BASS_Mixer_StreamAddChannel(mixer2 , splitter2 , BASS_MIXER_BUFFER|BASS_MIXER_PAUSE|BASS_MIXER_MATRIX|BASS_SAMPLE_SOFTWARE);
BASS_Mixer_ChannelFlags(splitter1 , 0, BASS_MIXER_PAUSE); BASS_Mixer_ChannelFlags(splitter2 , 0, BASS_MIXER_PAUSE);
My goal is to have a nonstop playing BASS pipeline and do all the stuff in the sources, which may be destroyed played or stopped. >>Can you move your seeking outside of the STREAMPROC, and have the STREAMPROC return 0 in the meantime? The seek is done in another thread already I was just waiting for the thread to finish. I will try your idea and return 0 in the callback until the thread finishes. In the mentioned callback besides the seek there is a lot of audio processing done. Is there a way I can increase the priority for the thread that calls the callback and what priority does it normally have? Best regards, Constantin Cristian
|
Reply
Quote
|
|
|
16
|
Developments / BASS / Spliter lag
|
on: 19 Oct '11 - 13:14
|
|
Hello,
I am using bass with the following scenario:
(3 source streams) -> mixer -> spliter -> mixer1 -> spliter -> mixer2
The mixer1 and mixer2 can be on different sound cards or the same and the issue still occurs.
Under a heavy CPU usage scenario I am getting some lag between mixer1 output and mixer2 output. BASS_Split_StreamGetAvailable seems to return values that account for this delay.
The some source streams are created with BASS_StreamCreate() which uses a callback, that callback in some situations(eg. seeking) will take a small time to return. The issue is more easy to reproduce if I do a lot of seeks when high CPU usage. What I don't understand is why I don't get the same amount of lag in both mixers?
I installed a sync proc on both mixers: HSYNC s = BASS_ChannelSetSync(mixer, BASS_SYNC_STALL, 0, StallSyncProc,&_element); But it never gets called.
I am using 5ms update period but still I get the lag. BASS_SetConfig(BASS_CONFIG_UPDATEPERIOD, 5)
Any ideas how I can prevent this lag and what causes it?
Regards, Cristian
|
Reply
Quote
|
|
|
17
|
Developments / BASS / Re: Equalizer artifacts
|
on: 5 Oct '11 - 15:34
|
|
Hi Ian,
If the change is not to fast they are harder to notice but they are still there. There are not click sounds there are more like a vroom while the change is taking place.
I recorded a sample while this issue was happening and I attached to this post a picture with arrows signaling where artifacts happen.
In the picture the filter's gain is altered 2 times, each time you can see that the sine wave does not maintain it's center. The input sound contains just one sine wave and I would expect to see just variations in amplitude of the sin wave around the center.
Regards, Cristian
|
Reply
Quote
|
|
|
18
|
Developments / BASS / Equalizer artifacts
|
on: 5 Oct '11 - 10:00
|
|
Hello all,
I am trying to add a equalizer to my application with the help of BASS_FX's peaking equalizer effect(BASS_BFX_PEAKEQ) but I noticed that it produces artifacts when altering it's values.
This can be reproduced with the application delivered with BASS_FX: bass_fx24.zip\C\bin\dsp.exe . The effects are easily noticeable if you use a file with just one 500Hz tone which you can generate with Audacity(free audio editing app)... I can provide the file if needed. The artifacts can be noticed while the file above is playing in dsp.exe and you move(regardless of speed) the 125 Hz slider or 1 kHz slider(peaking eq is checked and phaser is unchecked)
Can anyone please help?
Regards, Cristian
|
Reply
Quote
|
|
|
19
|
Developments / BASS / Re: Equalization and sample rate
|
on: 26 Jul '10 - 15:49
|
Great, So, is it possible to have those 2 behaviors on the same stream? Bellow is a step by step example of the processing I want to do: 1) input stream: at 44100Hz for example 2) equalizer: applied on 0-44100Hz on the initial source 3) sample rate change: when this re-sampling is done it will affect the equalizer at 1) just as BASS_ATTRIB_FREQ does. The output of 3) should still be 44100 but re-sampled to sound like a different rate just as BASS_FX's BASS_ATTRIB_TEMPO_FREQ does. See: BASS_FX re-samples the source to sound like the requested rate 4) equalizer: applied on the output of 3) which should still be at 44100 5) output Thank you, Cristian
|
Reply
Quote
|
|
|
20
|
Developments / BASS / Re: Equalization and sample rate
|
on: 26 Jul '10 - 09:12
|
|
Hi,
I did my initial tests using the spectrum sample from bass and white noise. I expected to see the band in the graph move as slide the frequency. But probably I didn't see it move because the graph scale was also changing.(Does this mean the bandwidth is also affected?)
This is good, however I also need to somehow simulate somehow the other behavior in which the equalizer is not affected by sample rate. I need all this to simulate RIAA equalization.
input --> equalizer filter(affected by sample rate, this is a inverse RIAA equalizer filter in order to simulate original vinyl sound) --> sample rate change filter --> equalizer filter(not affected by sample rate, this is a output RIAA equalizer filter) --> output
I've noticed in the Bass FX "tempo" sample that when BASS_ATTRIB_TEMPO_FREQ was changed, a manual correction of the bands center was applied. This is not the case for BASS_ATTRIB_FREQ?
Thank you again, Cristian
|
Reply
Quote
|
|
|