Author Topic: [Bass Net] Playing Channels 1 and 2 separatly  (Read 300 times)

pauleffect

  • Posts: 2
Hi guys.
I have a stereo *.wav file and I'd like to analyze each channel separately.
I used a piece of code I found on the documentation.

Code: [Select]
BASS_BFX_MIX swap = new BASS_BFX_MIX(BASSFXChan.BASS_BFX_CHAN2, BASSFXChan.BASS_BFX_CHAN2);
int channel = Bass.BASS_StreamCreateFile("test.wav", 0, 0, BASSFlag.BASS_DEFAULT);
int fxMix = Bass.BASS_ChannelSetFX(channel, BASSFXType.BASS_FX_BFX_MIX, 0);
Bass.BASS_FXSetParameters(fxMix, swap);
Bass.BASS_ChannelPlay(channel, false);
 

However, it doesn't seem to work. The file remains as is.
Would you kindly point me in the right direction?



pauleffect

  • Posts: 2
Re: [Bass Net] Playing Channels 1 and 2 separatly
« Reply #1 on: 15 Jul '19 - 22:46 »
Posting for future seekers. I just found the problem.

Apparently there's a second dll one needs to add to the app folder - bass_fx.dll.
And you need to call a function from BASS_FX (such as BASS_FX_GetVersion) for it to work.

Code: [Select]
                BassFx.BASS_FX_GetVersion();
                BASS_BFX_MIX swap = new BASS_BFX_MIX(BASSFXChan.BASS_BFX_CHAN2, BASSFXChan.BASS_BFX_CHAN2);
                int channel = Bass.BASS_StreamCreateFile(file, 0, 0, BASSFlag.BASS_STREAM_DECODE);
                int fxMix = Bass.BASS_ChannelSetFX(channel, BASSFXType.BASS_FX_BFX_MIX, 0);
                Console.WriteLine(Bass.BASS_ErrorGetCode());
                Bass.BASS_FXSetParameters(fxMix, swap);

Funny thing, the bass_fx.dll is not included in the library download?

Ian @ un4seen

  • Administrator
  • Posts: 22253
Re: [Bass Net] Playing Channels 1 and 2 separatly
« Reply #2 on: 16 Jul '19 - 16:59 »
The BASS_FX.DLL file is part of the BASS_FX add-on, which can be found in the "More add-ons" section of the BASS webpage.