Show Posts
|
|
Pages: [1] 2
|
|
1
|
Developments / BASS / Re: VB6 ChannelGetLevel crash - Take 2
|
on: 16 Feb '09 - 17:20
|
|
Hi all,
Thanks Ian,
To close off this thread, I have finally solved my problem, it was not Bass 2.3. or the Bass Mixer which I had just added to my program, which I was thinking may had something to do with this probem.
It was crashing due a Zero being returned in my code, once every 50,000 to 100,000 calls on my VB code which calculate the minutes and seconds left to play, by calling bass for the stream postion.
Due to taking several hour for this zero calculation to show up in my VB coding, it was hard work to track down the problem as it showed few clues where to start looking, the program would just close down like you had close it down.
It was not until, after trying many things, error coding etc, that I just try calling bass for the stream postion and by- passing my calculations code and it stopped crashing.
I now have Bass Mixer into my program with Bass 2.3 and both are running like a dream. I am leaning new tricks everyday that help me track down problems like this in my coding.
Thanks. PJDJ.
|
Reply
Quote
|
|
|
2
|
Developments / BASS / VB6 ChannelGetLevel crash - Take 2
|
on: 8 Feb '09 - 18:38
|
|
Old Thread Topic; VB6 ChannelGetLevel crash
Hi Ian,
Found an old thread on the forum about VB6 ChannelGetLevel crash, which is what I have track down my problem is, but it only seems to be on the one computer, not my other.
The old thread did not say in the end what it was or how to fix it, can inform me further as to the work around?
Windows Xp on both computers, Bass 2.3 and Bassmixer
thanks
|
Reply
Quote
|
|
|
3
|
Developments / BASS / What Bass Ver should you use with Bass mixer
|
on: 6 Feb '09 - 15:52
|
|
Hi Ian and everyone,
I have a question, I am using Bass 2.3 and Bassmixer. is this O.K.
Or is there a good reasons for me to upgrade my application to use Bass 2.4 with the Bassmixer, does it run better of faster, more reliable etc with Bass 2.4.
My application seem to be running OK on Bass 2.3, it is playing about 20 audio files randomly, when the files stop, it's restart and randomly changes the mixer matrix to change the sound card output it's playing through.
But after my application has been doing this for anything from 30 minutes - 10 hours it stops running.
Windows tells me it has to close the application, if ruining from VB, I can not pick up any errors or clauses of whats cause this and does not show errors or a problem with the coding or Bass. The computer is usually very stable and don't have the problem with any other application, so I guess it has to do my application and may be Bass.
I have been testing it for days, on one computer the application seem to run fine on this other computer it has this problem.
Both computer are ruining the XP home SP2, but do have different application install on them. I know this not much to go on, but I thought I would check about Bass Ver with Bass mixer for a start with.
|
Reply
Quote
|
|
|
5
|
Developments / BASS / Re: Two Sound Cards 4 streams, plays Ok to start with, but then @*##
|
on: 26 Jun '08 - 15:48
|
for those who maybe following this thread, I have changed my coding to the second method mention above, Basicly, I creat a Bass_Mixer (NoStop) for every playlist player and then plug and unplug each stream into the required Bass mixer, init with a sound, then set the matrix for the speaker outputs you want to use and then play the mixer stream. I guess this is meant to be the way it should work, I maybe a bit thicker than some. Everything is working well and a great step forward for me, can send any playlist song to any soundcards and to it's output channels, through the required mixer. some tinkering to do but great. 2 steps back, 3 forward
|
Reply
Quote
|
|
|
6
|
Developments / BASS / Re: Two Sound Cards 4 streams, plays Ok to start with, but then @*##
|
on: 25 Jun '08 - 16:25
|
|
Hi Ian,
The the following code is the start of my bass calls at the point where a stream has just finished playing and starts to load another playlist file into bass.
For those newer memebers, looking at this, this bit of VB code, I am trying to run a number of playlist players at once into number of sound cards, and still yet to sort it out.
Call BASS_StreamFree(VenueStreamHandle(VenuePlayerIndex)) Call BASS_StreamFree(VenueMatrixMixerHandle(VenuePlayerIndex)) Call GetVenuOutpuBttnAndSoundCard(VenuePlayerIndex) SetSoundDeviceIndex = SoundDeviceAssignedToVenuePlayer(VenuePlayerIndex) Call BASS_SetDevice(outdev(SetSoundDeviceIndex)) Call BASS_SetConfig(BASS_CONFIG_BUFFER, 1000) VenueMatrixMixerHandle(VenuePlayerIndex) = BASS_Mixer_StreamCreate(44100, 9, BASS_MIXER_NONSTOP) VenueStreamHandle(VenuePlayerIndex) = BASS_StreamCreateFile(BASSFALSE, VenueMusicFilePath(VenuePlayerIndex), 0, 0, BASS_STREAM_DECODE)
If (BASS_Mixer_StreamAddChannel(VenueMatrixMixerHandle(VenuePlayerIndex), VenueStreamHandle(VenuePlayerIndex), BASS_MIXER_MATRIX) = 0) Then Call Error_(" 1a Can't play Venue Music File" & VenuePlayerIndex) Call OnLoadSetVenueMasterVol(VenuePlayerIndex) Call SetVenueMixerMatrixFromSchemeDetails(VenuePlayerIndex, VenueOutputBttnIndex)>>>>>>>
>>>>>If (BASS_Mixer_ChannelSetMatrix(VenueStreamHandle(VenuePlayerIndex), MusicMatrix(1)) = 0) Then Call Error_("Can't Load Channel Matrix Venue Music")
If (BASS_ChannelPlay(VenueMatrixMixerHandle(VenuePlayerIndex), BASSTRUE) = 0) Then Call Error_("3a Can't play Venue Music File" & VenuePlayerIndex)
I am still not sure if I am using the Bass Mixer in the right way, I really think have not got my head around and understand the best way to use the Mixer yet.
1. Basically I have at anytime 4 different stream, each with it own mixer all playing at once independent to each other into the same or different sound cards.
2. Or is it better to have 4 NonStop Mixer assigned to each sound card and then plug each new BASS_StreamCreateFile into the required mixer and set then set the required matrix volume get the stream to the speaker output you want.
Your thoughts Ian, the more I think, the more it makes sense to do it the second way.
|
Reply
Quote
|
|
|
7
|
Developments / BASS / Two Sound Cards 4 streams, plays Ok to start with, but then @*##
|
on: 25 Jun '08 - 04:09
|
|
Hi Everyone,
I am using 2 sound cards with Bass_mixer.
If I play 4 different streams into one sound card on any of the different speaker outputs, everything works fine on either sound card.
When I play anyone of the streams into the second sound card at the same time, everything starts out fine and sounds OK,
Then shortly after, I will lose one streams audio output, on either card and then other, start to get distortion until I may have one stream totally distorted or maybe none.
All the stream are still decode it seems, I though it may be my VB code doing something, so I pausing that as soon as I start all the streams.
But it still happens, have increased the int buffer for each stream to 1000 and still happens.
As each stream is playing from a songlist and the streamFile and Stream_mixer are releast ed after each file ends and new streams and Handles are created when the next file is loaded and assigns speaker outputs, this sometimes can start the audio output to work again.
I am using the on board sound card and Creative sound card, either one will work fine only streaming to a single card at a time.
Any ideas.
PJDJ
|
Reply
Quote
|
|
|
10
|
Developments / BASS / Re: Led Metre and what did not work for me
|
on: 19 Jun '08 - 12:19
|
|
Thanks, will try that radio42,
But some questions,
How does this work, is the buffer a copy of the current data being processed from the source channel?
Does using this buffer flag increase the latency for the audio at the speaker output?
As I am not trying to mix anything in realtime with the audio at present, latency is not an issue, but it would be handy to know for future reference.
Thanks
|
Reply
Quote
|
|
|
11
|
Developments / BASS / Re: Led Metre and what did not work for me
|
on: 17 Jun '08 - 18:29
|
|
Thanks radio42,
Ah, that's why it was working all O.K. when I was not using the Bass_mixer.
Now I am, I need to change these things and why my files with just talking are OK and don't have the problem, they are not being streamed using Bass_mixer as yet.
Thank you very much.
|
Reply
Quote
|
|
|
12
|
Developments / BASS / Led Metre and what did not work for me
|
on: 13 Jun '08 - 16:37
|
|
Hi Everyone,
Some weeks ago I said, I was getting some crackles and reverberation through my sound and audio stream and seemed to have no relevance to the number or volume of the streams playing.
What I have found was causing it and was doing wrong.
I was getting the audio level to drive the LED metres from Bass_ChannelGetLevel every 250 ms which worked well for the reaction of the meter etc.
But I have found it's this calling of the Bass_ChannelGetLevel that was degrading the quality of the sound. Once I
stopped calling Bass_ChannelGetLevel, the audio quality issue was resolved straight away.
With Audio Files that have just talking on them, it did not cause this problems, only music etc.
I guess there is another way of doing this, so I will do some reading on the forum, unless someone knows the best bass funcation to call to drive a meter.
Thanks PJDJ.
|
Reply
Quote
|
|
|
14
|
Developments / BASS / Possible to send 1 Decode audio stream to 2 sound cards?
|
on: 8 Jun '08 - 18:51
|
Hi Ian and Everyone, My question, is it possible to send 1 audio file stream to 2 sound cards with Bass and Bass mix. I am trying and think it maybe possible by Sync 2 streams of the same audio file and sending the decode streams to the different Bass_ mixers each being assigned to the different sound cards. Am I on the right track with this.  If anyone has some advice as to if this will work or may be has a better way to do this, I would be grateful for the help and a quick over veiw of which way is the best. Thanks
|
Reply
Quote
|
|
|
15
|
Developments / BASS / Re: Limits for the number of streams that can flaged to a Speaker output ?
|
on: 6 Jun '08 - 17:10
|
|
That suggests that it is a hardware resource issue, eg. the earlier streams are taking up all the "hardware" channels. Did you check the BASS_INFO "freesam" value?
Thanks Ian,
Maybe of interest to readers following this thread.
Firstly,
This may be a bug or maybe it's my lack of VB knowledge, but this might help someone else.
I decided to declare the variable string that holds the Audiofilepath when calling Bass_CreateStreamFile, as a Public variable string, but this was causing a Bass error.
Public Audiofilepath as String
I then changed the variable name a few times, the error still remained.
So I changed to declaring the variable as a Dim in the calling procedure, problem and error gone.
Dim Audiofilepath As String
Secondly,
By changing the call order in my VB coding when calling BASS_ Mixer_Stream, BASS_StreamCreateFile and the calling and loading of the Audio file path into the String variable.
By making these calling order changes, I am now accessing R rearspeaker output on the on-board sound card without any problems as mention earlier about CreateStream limits in this thread.
It did not seem obvious to me at the time as I was still getting most speaker outputs working the way I wanted.
Call order that did not work properly.
Bass_SetDevice
Load AudioFilePath into the String variable,
Bass_CreateStreamFile,
BASS_Mixer_StreamsCreate,
Load Matrix Array
BASS_ Mixer_StreamsAddChannel,
BASS_ Mixer_ChannelSetMatrix
Bass_ChannelPlay
Call order that works properly for me
Load AudioFilePath into the String variable,
Bass_SetDevice
BASS_Mixer_StreamsCreate,
Bass_CreateStreamFile,
BASS_ Mixer_StreamsAddChannel,
Load Matrix Array
BASS_ Mixer_ChannelSetMatrix
Bass_ChannelPlay
Thirdly,
In Bass_Mixer_StreamCreate the DWORD "Chan" I have also found if I declared this number as 8 = 7.1 sound card it also cause problems outputting to the correct output speakers.
But by increasing the "Chan" number to 9, it solves the problem and outputting to the correct output speakers for a 7.1 sound card.
I am wondering if Bass uses the "Chan" number to identify the number of elements BASS_ Mixer_ChannelSetMatrix is to receive and reads from the matrix array string.
And if the VB array starts at 0 and not 1
would this add another element and could have something to do with this problem.
A question about Bass_Mixer Ian
Can Bass and Bass_Mixer send 1 Decode audio stream to 2 different sound cards?
|
Reply
Quote
|
|
|
16
|
Developments / BASS / Re: Limits for the number of streams that can flaged to a Speaker output ?
|
on: 4 Jun '08 - 19:53
|
|
Thanks Ian,
I have the bassmix working and it does not solve the problem even with bassmix the mix stream don't seem to be able to used the R rearspeaker output either unless the stream is created early file loading the files.
For anyone wondering about having a problem with bass, please bare in mind I am creating and load around sixty streamfile handle all with pairs and single speaker out flags, so I guess something will start to cause an issue at some point.
Back to the problem what I have worked out, this problem is not just how many stream are assigned to the R rearspeaker output, as I thought.
It seems to be about the total streams created before the stream assigned to R rearspeaker outputs is load, if it's created and loaded early, it works fine, if it create and load late it still plays and even at times outputs into another speaker output, but no audio will come out the R rearspeaker output.
I will try a couple of thing to see if I can workout what type of problem it may be, if it not a limitation of Bass.
If anyone use a sound card that seem to work well, I would be interest to know the brands and models even if they are more a pro or audio industry type cards and cost more.
I am a dog with a bone.
Thanks
|
Reply
Quote
|
|
|
17
|
Developments / BASS / Limits for the number of streams that can flaged to a Speaker output ?
|
on: 2 Jun '08 - 19:32
|
|
Hi Everyone,
Back with another quirky issue.
I am getting a limit on the number of stream I can assign to Bass_Speaker_Rear2Right output with the onboard sound card using the speakerflags to assign the speaker output.
It's only 5 streams I can assign at same time using this output. Anything flagged after the 5th StreamCreateFile just does not output any audio.
Anything after the 5th plays but it's just like you have unplugged the speaker to the output. If I load the same Audio track before the 5th stream to be assign it works fine.
Any ideas how to over come this, is it a bass, Windows or the Sound Card problem.
Thanks
|
Reply
Quote
|
|
|
18
|
Developments / BASS / Re: Matrix Mixer Code VB
|
on: 2 Jun '08 - 07:16
|
|
Hi Steve,
As to where I found the reference to the passing of the array ByRef for VB, I have not been able to refined the reference for you.
Over the last couple of day I did hours of searching and reading in so many places looking for answer to resolve the problems I was having, I only took a note about this.
I have got the whole Matrix array being passed using matrix (0,0), but further to this it also said that if you started at element 4 (Matrix (3,0)) the elements up to this element would not be past.
I have now got the Matrix working and maybe have answered some of the question you had for Ian about what are each of the element in the matrix array.
As you can see with this, I am not using 2nd Dem of the array at the moment, but this does work for Stereo and Mono Streams into the Mixer when calling the Bassmixer as already posted.
The code is chunky and now can be clean up, but have left it like this for the posting as it simple to understand.
Public Matrix(16,16) As Single
Matrix(0, 0) = 0.5 ' Channel green output left' value is for Volume 0 = Off and 1 =Full Volume Matrix(1, 0) = 0.5 ' Channel green output left' value is for Volume 0 = Off and 1 =Full Volume Matrix(2, 0) = 0.5 ' Channel green output right ' value is for Volume 0 = Off and 1 =Full Volume
Matrix(3, 0) = 0.5 ' Channel green output right ' value is for Volume 0 = Off and 1 =Full Volume Matrix(4, 0) = 0.5 ' Channel pink output left ' value is for Volume 0 = Off and 1 =Full Volume Matrix(5, 0) = 0.5 ' Channel pink output left ' value is for Volume 0 = Off and 1 =Full Volume Matrix(6, 0) = 0.5 ' Channel pink output right ' value is for Volume 0 = Off and 1 =Full Volume Matrix(7, 0) = 0.5 ' Channel pink output right ' value is for Volume 0 = Off and 1 =Full Volume Matrix(8, 0) = 0.5 ' Channel Black output Left' value is for Volume 0 = Off and 1 =Full Volume Matrix(9, 0) = 0.5 ' Channel Black output Left' value is for Volume 0 = Off and 1 =Full Volume Matrix(10, 0) = 0.5 ' Channel Black output right' value is for Volume 0 = Off and 1 =Full Volume Matrix(11, 0) = 0.5 ' Channel Black output right' value is for Volume 0 = Off and 1 =Full Volume Matrix(12, 0) = 0.5 ' Channel Blue output left ' value is for Volume 0 = Off and 1 =Full Volume Matrix(13, 0) = 0.5 ' Channel Blue output left ' value is for Volume 0 = Off and 1 =Full Volume Matrix(14, 0) = 0.5 ' Channel Blue output Right ' value is for Volume 0 = Off and 1 =Full Volume Matrix(15, 0) = 0.5 ' Channel Blue output Right ' value is for Volume 0 = Off and 1 =Full Volume
At the moment the mixer with the odd Streams (Audio track) has small amounts of crackles like an old vinyl L.P. and some tracks also have small amount of Reverderations at times, always in the same places.
Seems not to have anything to do with the dynamic level of the music. If anyone has any ideas, this be good.
I hope this is all of helps to some one else in the future.
Thanks all.
|
Reply
Quote
|
|
|
19
|
Developments / BASS / Re: Pitch / Key changing
|
on: 31 May '08 - 18:56
|
Hi Latch, Here is a Dj program that use Bass, it can be found at www.mixvibes.com it uses many features like tempo, pitch shift etc. It's the best Bass.DLL based program I have seen. It's great example of what Bass can really do, I use it in live Audio Productions at times. It convince me to use Bass for my VB project after seeing what Bass could do in the hands of the right programmer. I actually found MixVibes first, then leaned it was based on a component called Bass.dll that was some 4 years ago. I know what you are wanting with pitch shift, take the time and have a look, it conviced me that Bass was worth building my VB program on and it could deliver the goods, reliably, features and so there was only going to be one weak link in all this, my programming ablity. C'YA PJDJ.
|
Reply
Quote
|
|
|
20
|
Developments / BASS / Re: Matrix Mixer Code VB
|
on: 31 May '08 - 17:55
|
|
Well Guys,
Thanks to you both, that's a giant leap forward for me at least, after the last few days, it's now 2.30 am in the morning and I am knocking for a rum.
I have changed the StreamHandle around in BASS_Mixer_ChannelSetMatrix call and Declared the array like this in VB.
Public Matrix(7,7) as Single
and calling BASS_Mixer_ChannelSetMatrix like this.
If (BASS_Mixer_ChannelSetMatrix(AnnChannelHandle, matrix(0,0)) = 0) Then Call Error_(" 2a Can't play File")
It's all happening without errors. This array is now being pass by VB, if I make a change to the array it's changing the card outputs around, not where I want at the moment, but that will come.
One last thing, I did read in the VB knowledge base in the last few days, when selecting the array at (0,0) to pass ByRef , VB does not only sends (0,0) but the whole array is pass.
Will post final code for VB, but not tonight, today or whatever it is in your part of the world. Thanks everyone.
|
Reply
Quote
|
|
|